diff --git a/.github/workflows/black_check.yml b/.github/workflows/black_check.yml index b08e4625..542da966 100644 --- a/.github/workflows/black_check.yml +++ b/.github/workflows/black_check.yml @@ -23,4 +23,4 @@ jobs: pip install black==24.10.0 - name: Run Black run: | - black --check . --line-length 120 + black --check . diff --git a/factgenie/datasets/rotowire_shared_task.py b/factgenie/datasets/rotowire_shared_task.py index ace69ae9..3ab808da 100644 --- a/factgenie/datasets/rotowire_shared_task.py +++ b/factgenie/datasets/rotowire_shared_task.py @@ -3,6 +3,7 @@ import markdown import textwrap + class RotowireSharedTask(Dataset): def load_examples(self, split, data_path): examples = [] @@ -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("", '
') @@ -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", @@ -115,4 +116,4 @@ def add_explanations(self, html): for term, explanation in abbr_mappings.items(): html = html.replace(term, f'{term}') - return html \ No newline at end of file + return html diff --git a/pyproject.toml b/pyproject.toml index 55ec8d78..f83c639e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,2 +1,3 @@ [tool.black] line-length = 120 +target-version = ['py39']