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):