Skip to content

Commit

Permalink
fix black by specifying target-version
Browse files Browse the repository at this point in the history
  • Loading branch information
oplatek committed Nov 12, 2024
1 parent 8532c1e commit 3232bde
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/black_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
pip install black==24.10.0
- name: Run Black
run: |
black --check . --line-length 120
black --check .
7 changes: 4 additions & 3 deletions factgenie/datasets/rotowire_shared_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import markdown
import textwrap


class RotowireSharedTask(Dataset):
def load_examples(self, split, data_path):
examples = []
Expand All @@ -15,7 +16,7 @@ def load_examples(self, split, data_path):
examples.append(summary)

return examples

def render(self, example):
html = markdown.markdown(example, extensions=["markdown.extensions.tables"])
html = html.replace("<table>", '<table class="table table-hover table-sm">')
Expand Down Expand Up @@ -94,7 +95,7 @@ def json_to_markdown_tables(self, data):
markdown += "\n"
markdown += self.create_player_stats_tables(data)
return markdown

def add_explanations(self, html):
abbr_mappings = {
"Minutes": "The number of minutes played",
Expand All @@ -115,4 +116,4 @@ def add_explanations(self, html):
for term, explanation in abbr_mappings.items():
html = html.replace(term, f'<abbr title="{explanation}">{term}</abbr>')

return html
return html
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[tool.black]
line-length = 120
target-version = ['py39']

0 comments on commit 3232bde

Please sign in to comment.