From c4c890c5a9c999c794be402a4df5aa87c7ad8ba4 Mon Sep 17 00:00:00 2001 From: Tomasz Kwiatkowski Date: Mon, 2 Dec 2024 17:59:32 +0100 Subject: [PATCH] Formatter and test setup --- .github/workflows/formatter.yml | 4 ++-- pyproject.toml | 1 + setup.cfg | 1 - src/sio3pack/django/sinolpack/handler.py | 1 - src/sio3pack/packages/sinolpack/model.py | 3 ++- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/formatter.yml b/.github/workflows/formatter.yml index 6b37756..2ce093c 100644 --- a/.github/workflows/formatter.yml +++ b/.github/workflows/formatter.yml @@ -1,9 +1,9 @@ name: Python Formatter (isort & black) on: + push: + branches: 'main' pull_request: - branches: [main] - jobs: formatting: runs-on: ubuntu-latest diff --git a/pyproject.toml b/pyproject.toml index d78f6bd..8dcf968 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,3 +9,4 @@ include_trailing_comma = true [tool.black] line_length = 120 +exclude = "migrations/" diff --git a/setup.cfg b/setup.cfg index 4ea2237..53698c9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,7 +32,6 @@ tests = pytest pytest-cov pytest-xdist - pytest-django django_tests = pytest-django django = diff --git a/src/sio3pack/django/sinolpack/handler.py b/src/sio3pack/django/sinolpack/handler.py index 2b47e46..0ae67e7 100644 --- a/src/sio3pack/django/sinolpack/handler.py +++ b/src/sio3pack/django/sinolpack/handler.py @@ -4,7 +4,6 @@ class SinolpackDjangoHandler(DjangoHandler): - def save_to_db(self): """ Save the package to the database. diff --git a/src/sio3pack/packages/sinolpack/model.py b/src/sio3pack/packages/sinolpack/model.py index 55fa144..9d31864 100644 --- a/src/sio3pack/packages/sinolpack/model.py +++ b/src/sio3pack/packages/sinolpack/model.py @@ -215,7 +215,8 @@ def get_submittable_extensions(self): Returns a list of extensions that are submittable. """ return self.config.get( - "submittable_langs", self._get_from_django_settings("SUBMITTABLE_LANGUAGES", ["c", "cpp", "cc", "cxx", "py"]) + "submittable_langs", + self._get_from_django_settings("SUBMITTABLE_LANGUAGES", ["c", "cpp", "cc", "cxx", "py"]), ) def get_model_solution_regex(self):