From 0540c0b0b89430865700045d898843f1aeb5c632 Mon Sep 17 00:00:00 2001 From: Viktor Tyshchenko Date: Sun, 15 Oct 2023 19:40:18 +0300 Subject: [PATCH] Add ruff linter. (#956) --- .circleci/config.yml | 20 ++++++++ README.md | 2 +- manage.py | 17 +------ maps/factories.py | 14 +++++- maps/management/commands/cache.py | 2 +- maps/models/__init__.py | 3 ++ maps/tests/test_decoder.py | 1 + pdm.lock | 83 ++++++++++++++++++++----------- pyproject.toml | 15 ++++++ 9 files changed, 109 insertions(+), 48 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fad2dbdf..b7e5b56e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -143,6 +143,23 @@ jobs: name: Run pylint command: PYTHONPATH="$PYTHONPATH:." pylint --rcfile pyproject.toml common maps mercator puzzle quiz users workshop + ruff: + docker: + - image: tyvik/geopuzzle:backend-tester + environment: + DJANGO_SETTINGS_MODULE: "mercator.settings.circleci" + SECRET_KEY: "mY_sup#r_sec3t+KEY" + working_directory: ~/repo + resource_class: small + steps: + - checkout + - run: + name: Prepare environment + command: mkdir ~/repo/logs + - run: + name: Run ruff + command: PYTHONPATH="$PYTHONPATH:." ruff check . + messages: docker: - image: tyvik/geopuzzle:backend @@ -214,6 +231,9 @@ workflows: - pylint: requires: - build-backend + - ruff: + requires: + - build-backend - messages: requires: - build-backend diff --git a/README.md b/README.md index 99001a7c..231a34ae 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=Fbm86tXoBBqACUnFaJqP)](https://www.browserstack.com/automate/public-build/Fbm86tXoBBqACUnFaJqP) [![codecov](https://codecov.io/gh/TyVik/geopuzzle/branch/develop/graph/badge.svg)](https://codecov.io/gh/TyVik/geopuzzle) [![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/pylint-dev/pylint) - +[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=TyVik_geopuzzle&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=TyVik_geopuzzle) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=TyVik_geopuzzle&metric=alert_status)](https://sonarcloud.io/dashboard?id=TyVik_geopuzzle) diff --git a/manage.py b/manage.py index e6249571..67af78f8 100755 --- a/manage.py +++ b/manage.py @@ -2,22 +2,9 @@ import os import sys +from django.core.management import execute_from_command_line + if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mercator.settings.development") - try: - from django.core.management import execute_from_command_line - except ImportError: - # The above import may fail for some other reason. Ensure that the - # issue is really that Django is missing to avoid masking other - # exceptions on Python 2. - try: - import django # lgtm [py/unused-import] - except ImportError: - raise ImportError( - "Couldn't import Django. Are you sure it's installed and " - "available on your PYTHONPATH environment variable? Did you " - "forget to activate a virtual environment?" - ) - raise execute_from_command_line(sys.argv) diff --git a/maps/factories.py b/maps/factories.py index 8daaf6ef..8242fbbf 100644 --- a/maps/factories.py +++ b/maps/factories.py @@ -9,8 +9,18 @@ from .models import Region, RegionTranslation POINTS = ( - ([-2.4610019, 49.4612907], [-2.4610233, 49.4613325], [-2.4628043, 49.4608862], [-2.4634051, 49.4606073], [-2.4640274, 49.4606491], [-2.4642205, 49.4599378], [-2.4651432, 49.4597984], [-2.4651861, 49.4587523], [-2.4658513, 49.4584455], [-2.4653149, 49.4574273], [-2.4653149, 49.4564509], [-2.4643064, 49.4562138], [-2.4639845, 49.4557954], [-2.4626756, 49.4559349], [-2.462461, 49.4563533], [-2.4618816, 49.4569531], [-2.4607658, 49.456967], [-2.46068, 49.4574691], [-2.4605298, 49.4577063], [-2.46068, 49.4578178], [-2.460444, 49.4580828], [-2.4600363, 49.4579434], [-2.4595642, 49.4580828], [-2.4595213, 49.4583339], [-2.4594784, 49.458836], [-2.4592209, 49.4590452], [-2.4592209, 49.4593242], [-2.4590921, 49.4595055], [-2.4593067, 49.4597147], [-2.4596715, 49.4599239], [-2.45965, 49.4602168], [-2.4598861, 49.4603981], [-2.4602509, 49.4604678], [-2.4603367, 49.460677], [-2.4608088, 49.4609002], [-2.4610019, 49.4612907]), # pylint: disable=line-too-long - ([-2.4636197, 49.4623646], [-2.4636412, 49.4626086], [-2.4640059, 49.4627411], [-2.4646497, 49.4634384], [-2.4650359, 49.4632292], [-2.4655938, 49.4631734], [-2.4655402, 49.462769], [-2.4655831, 49.4624761], [-2.4647677, 49.4621205], [-2.4640918, 49.4624831], [-2.4636197, 49.4623646]) # pylint: disable=line-too-long + ([-2.4610019, 49.4612907], [-2.4610233, 49.4613325], [-2.4628043, 49.4608862], [-2.4634051, 49.4606073], + [-2.4640274, 49.4606491], [-2.4642205, 49.4599378], [-2.4651432, 49.4597984], [-2.4651861, 49.4587523], + [-2.4658513, 49.4584455], [-2.4653149, 49.4574273], [-2.4653149, 49.4564509], [-2.4643064, 49.4562138], + [-2.4639845, 49.4557954], [-2.4626756, 49.4559349], [-2.462461, 49.4563533], [-2.4618816, 49.4569531], + [-2.4607658, 49.456967], [-2.46068, 49.4574691], [-2.4605298, 49.4577063], [-2.46068, 49.4578178], + [-2.460444, 49.4580828], [-2.4600363, 49.4579434], [-2.4595642, 49.4580828], [-2.4595213, 49.4583339], + [-2.4594784, 49.458836], [-2.4592209, 49.4590452], [-2.4592209, 49.4593242], [-2.4590921, 49.4595055], + [-2.4593067, 49.4597147], [-2.4596715, 49.4599239], [-2.45965, 49.4602168], [-2.4598861, 49.4603981], + [-2.4602509, 49.4604678], [-2.4603367, 49.460677], [-2.4608088, 49.4609002], [-2.4610019, 49.4612907]), + ([-2.4636197, 49.4623646], [-2.4636412, 49.4626086], [-2.4640059, 49.4627411], [-2.4646497, 49.4634384], + [-2.4650359, 49.4632292], [-2.4655938, 49.4631734], [-2.4655402, 49.462769], [-2.4655831, 49.4624761], + [-2.4647677, 49.4621205], [-2.4640918, 49.4624831], [-2.4636197, 49.4623646]) ) INFOBOX = { "area": "178", diff --git a/maps/management/commands/cache.py b/maps/management/commands/cache.py index caefcd23..69a20504 100644 --- a/maps/management/commands/cache.py +++ b/maps/management/commands/cache.py @@ -1,7 +1,7 @@ import json from django.core.cache import cache -from django.core.management import BaseCommand, CommandError +from django.core.management import BaseCommand from tqdm import tqdm from maps.models import Region diff --git a/maps/models/__init__.py b/maps/models/__init__.py index fc1f7465..54bbf8be 100644 --- a/maps/models/__init__.py +++ b/maps/models/__init__.py @@ -1,3 +1,6 @@ from .game import Game, GameTranslation from .region import Region, RegionInterface, RegionTranslation, RegionCache from .tag import Tag + + +__all__ = ["Game", "GameTranslation", "Region", "RegionInterface", "RegionTranslation", "RegionCache", "Tag"] diff --git a/maps/tests/test_decoder.py b/maps/tests/test_decoder.py index b8d9d5fb..4c7d3eac 100644 --- a/maps/tests/test_decoder.py +++ b/maps/tests/test_decoder.py @@ -1,3 +1,4 @@ +# ruff: noqa: E501 import json from typing import List from unittest import TestCase diff --git a/pdm.lock b/pdm.lock index 2ce75c4b..13231990 100644 --- a/pdm.lock +++ b/pdm.lock @@ -6,7 +6,7 @@ groups = ["default", "develop", "lint", "test"] cross_platform = true static_urls = false lock_version = "4.3" -content_hash = "sha256:4941c58c4219c0a6ee3ee4b78a7d1dbf377f5a5293487dd6f4e7cd344b2c688c" +content_hash = "sha256:641106fc6fe534b9a82d49b028d36144b475a53e6533669a36518a5c6d195f81" [[package]] name = "asgiref" @@ -773,37 +773,37 @@ files = [ [[package]] name = "pillow" -version = "10.0.1" +version = "10.1.0" requires_python = ">=3.8" summary = "Python Imaging Library (Fork)" files = [ - {file = "Pillow-10.0.1-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:fd2a5403a75b54661182b75ec6132437a181209b901446ee5724b589af8edef1"}, - {file = "Pillow-10.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2d7e91b4379f7a76b31c2dda84ab9e20c6220488e50f7822e59dac36b0cd92b1"}, - {file = "Pillow-10.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:19e9adb3f22d4c416e7cd79b01375b17159d6990003633ff1d8377e21b7f1b21"}, - {file = "Pillow-10.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:93139acd8109edcdeffd85e3af8ae7d88b258b3a1e13a038f542b79b6d255c54"}, - {file = "Pillow-10.0.1-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:92a23b0431941a33242b1f0ce6c88a952e09feeea9af4e8be48236a68ffe2205"}, - {file = "Pillow-10.0.1-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:cbe68deb8580462ca0d9eb56a81912f59eb4542e1ef8f987405e35a0179f4ea2"}, - {file = "Pillow-10.0.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:522ff4ac3aaf839242c6f4e5b406634bfea002469656ae8358644fc6c4856a3b"}, - {file = "Pillow-10.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:84efb46e8d881bb06b35d1d541aa87f574b58e87f781cbba8d200daa835b42e1"}, - {file = "Pillow-10.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:898f1d306298ff40dc1b9ca24824f0488f6f039bc0e25cfb549d3195ffa17088"}, - {file = "Pillow-10.0.1-cp312-cp312-macosx_10_10_x86_64.whl", hash = "sha256:bcf1207e2f2385a576832af02702de104be71301c2696d0012b1b93fe34aaa5b"}, - {file = "Pillow-10.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5d6c9049c6274c1bb565021367431ad04481ebb54872edecfcd6088d27edd6ed"}, - {file = "Pillow-10.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:28444cb6ad49726127d6b340217f0627abc8732f1194fd5352dec5e6a0105635"}, - {file = "Pillow-10.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:de596695a75496deb3b499c8c4f8e60376e0516e1a774e7bc046f0f48cd620ad"}, - {file = "Pillow-10.0.1-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:2872f2d7846cf39b3dbff64bc1104cc48c76145854256451d33c5faa55c04d1a"}, - {file = "Pillow-10.0.1-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:4ce90f8a24e1c15465048959f1e94309dfef93af272633e8f37361b824532e91"}, - {file = "Pillow-10.0.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ee7810cf7c83fa227ba9125de6084e5e8b08c59038a7b2c9045ef4dde61663b4"}, - {file = "Pillow-10.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:b1be1c872b9b5fcc229adeadbeb51422a9633abd847c0ff87dc4ef9bb184ae08"}, - {file = "Pillow-10.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:98533fd7fa764e5f85eebe56c8e4094db912ccbe6fbf3a58778d543cadd0db08"}, - {file = "Pillow-10.0.1-pp310-pypy310_pp73-macosx_10_10_x86_64.whl", hash = "sha256:32bec7423cdf25c9038fef614a853c9d25c07590e1a870ed471f47fb80b244db"}, - {file = "Pillow-10.0.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b7cf63d2c6928b51d35dfdbda6f2c1fddbe51a6bc4a9d4ee6ea0e11670dd981e"}, - {file = "Pillow-10.0.1-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:f6d3d4c905e26354e8f9d82548475c46d8e0889538cb0657aa9c6f0872a37aa4"}, - {file = "Pillow-10.0.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:847e8d1017c741c735d3cd1883fa7b03ded4f825a6e5fcb9378fd813edee995f"}, - {file = "Pillow-10.0.1-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:7f771e7219ff04b79e231d099c0a28ed83aa82af91fd5fa9fdb28f5b8d5addaf"}, - {file = "Pillow-10.0.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:459307cacdd4138edee3875bbe22a2492519e060660eaf378ba3b405d1c66317"}, - {file = "Pillow-10.0.1-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:b059ac2c4c7a97daafa7dc850b43b2d3667def858a4f112d1aa082e5c3d6cf7d"}, - {file = "Pillow-10.0.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:d6caf3cd38449ec3cd8a68b375e0c6fe4b6fd04edb6c9766b55ef84a6e8ddf2d"}, - {file = "Pillow-10.0.1.tar.gz", hash = "sha256:d72967b06be9300fed5cfbc8b5bafceec48bf7cdc7dab66b1d2549035287191d"}, + {file = "Pillow-10.1.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:1fb29c07478e6c06a46b867e43b0bcdb241b44cc52be9bc25ce5944eed4648e7"}, + {file = "Pillow-10.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2cdc65a46e74514ce742c2013cd4a2d12e8553e3a2563c64879f7c7e4d28bce7"}, + {file = "Pillow-10.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50d08cd0a2ecd2a8657bd3d82c71efd5a58edb04d9308185d66c3a5a5bed9610"}, + {file = "Pillow-10.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:062a1610e3bc258bff2328ec43f34244fcec972ee0717200cb1425214fe5b839"}, + {file = "Pillow-10.1.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:61f1a9d247317fa08a308daaa8ee7b3f760ab1809ca2da14ecc88ae4257d6172"}, + {file = "Pillow-10.1.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:a646e48de237d860c36e0db37ecaecaa3619e6f3e9d5319e527ccbc8151df061"}, + {file = "Pillow-10.1.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:47e5bf85b80abc03be7455c95b6d6e4896a62f6541c1f2ce77a7d2bb832af262"}, + {file = "Pillow-10.1.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:a92386125e9ee90381c3369f57a2a50fa9e6aa8b1cf1d9c4b200d41a7dd8e992"}, + {file = "Pillow-10.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:0f7c276c05a9767e877a0b4c5050c8bee6a6d960d7f0c11ebda6b99746068c2a"}, + {file = "Pillow-10.1.0-cp312-cp312-macosx_10_10_x86_64.whl", hash = "sha256:a89b8312d51715b510a4fe9fc13686283f376cfd5abca8cd1c65e4c76e21081b"}, + {file = "Pillow-10.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:00f438bb841382b15d7deb9a05cc946ee0f2c352653c7aa659e75e592f6fa17d"}, + {file = "Pillow-10.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3d929a19f5469b3f4df33a3df2983db070ebb2088a1e145e18facbc28cae5b27"}, + {file = "Pillow-10.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9a92109192b360634a4489c0c756364c0c3a2992906752165ecb50544c251312"}, + {file = "Pillow-10.1.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:0248f86b3ea061e67817c47ecbe82c23f9dd5d5226200eb9090b3873d3ca32de"}, + {file = "Pillow-10.1.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:9882a7451c680c12f232a422730f986a1fcd808da0fd428f08b671237237d651"}, + {file = "Pillow-10.1.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:1c3ac5423c8c1da5928aa12c6e258921956757d976405e9467c5f39d1d577a4b"}, + {file = "Pillow-10.1.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:806abdd8249ba3953c33742506fe414880bad78ac25cc9a9b1c6ae97bedd573f"}, + {file = "Pillow-10.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:eaed6977fa73408b7b8a24e8b14e59e1668cfc0f4c40193ea7ced8e210adf996"}, + {file = "Pillow-10.1.0-pp310-pypy310_pp73-macosx_10_10_x86_64.whl", hash = "sha256:937bdc5a7f5343d1c97dc98149a0be7eb9704e937fe3dc7140e229ae4fc572a7"}, + {file = "Pillow-10.1.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1c25762197144e211efb5f4e8ad656f36c8d214d390585d1d21281f46d556ba"}, + {file = "Pillow-10.1.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:afc8eef765d948543a4775f00b7b8c079b3321d6b675dde0d02afa2ee23000b4"}, + {file = "Pillow-10.1.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:883f216eac8712b83a63f41b76ddfb7b2afab1b74abbb413c5df6680f071a6b9"}, + {file = "Pillow-10.1.0-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:b920e4d028f6442bea9a75b7491c063f0b9a3972520731ed26c83e254302eb1e"}, + {file = "Pillow-10.1.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1c41d960babf951e01a49c9746f92c5a7e0d939d1652d7ba30f6b3090f27e412"}, + {file = "Pillow-10.1.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:1fafabe50a6977ac70dfe829b2d5735fd54e190ab55259ec8aea4aaea412fa0b"}, + {file = "Pillow-10.1.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:3b834f4b16173e5b92ab6566f0473bfb09f939ba14b23b8da1f54fa63e4b623f"}, + {file = "Pillow-10.1.0.tar.gz", hash = "sha256:e6bf8de6c36ed96c86ea3b6e1d5273c53f46ef518a062464cd7ef5dd2cf92e38"}, ] [[package]] @@ -1048,6 +1048,31 @@ files = [ {file = "requests_oauthlib-1.3.1-py2.py3-none-any.whl", hash = "sha256:2577c501a2fb8d05a304c09d090d6e47c306fef15809d102b327cf8364bddab5"}, ] +[[package]] +name = "ruff" +version = "0.0.292" +requires_python = ">=3.7" +summary = "An extremely fast Python linter, written in Rust." +files = [ + {file = "ruff-0.0.292-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:02f29db018c9d474270c704e6c6b13b18ed0ecac82761e4fcf0faa3728430c96"}, + {file = "ruff-0.0.292-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:69654e564342f507edfa09ee6897883ca76e331d4bbc3676d8a8403838e9fade"}, + {file = "ruff-0.0.292-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c3c91859a9b845c33778f11902e7b26440d64b9d5110edd4e4fa1726c41e0a4"}, + {file = "ruff-0.0.292-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f4476f1243af2d8c29da5f235c13dca52177117935e1f9393f9d90f9833f69e4"}, + {file = "ruff-0.0.292-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:be8eb50eaf8648070b8e58ece8e69c9322d34afe367eec4210fdee9a555e4ca7"}, + {file = "ruff-0.0.292-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:9889bac18a0c07018aac75ef6c1e6511d8411724d67cb879103b01758e110a81"}, + {file = "ruff-0.0.292-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6bdfabd4334684a4418b99b3118793f2c13bb67bf1540a769d7816410402a205"}, + {file = "ruff-0.0.292-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aa7c77c53bfcd75dbcd4d1f42d6cabf2485d2e1ee0678da850f08e1ab13081a8"}, + {file = "ruff-0.0.292-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8e087b24d0d849c5c81516ec740bf4fd48bf363cfb104545464e0fca749b6af9"}, + {file = "ruff-0.0.292-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:f160b5ec26be32362d0774964e218f3fcf0a7da299f7e220ef45ae9e3e67101a"}, + {file = "ruff-0.0.292-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:ac153eee6dd4444501c4bb92bff866491d4bfb01ce26dd2fff7ca472c8df9ad0"}, + {file = "ruff-0.0.292-py3-none-musllinux_1_2_i686.whl", hash = "sha256:87616771e72820800b8faea82edd858324b29bb99a920d6aa3d3949dd3f88fb0"}, + {file = "ruff-0.0.292-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:b76deb3bdbea2ef97db286cf953488745dd6424c122d275f05836c53f62d4016"}, + {file = "ruff-0.0.292-py3-none-win32.whl", hash = "sha256:e854b05408f7a8033a027e4b1c7f9889563dd2aca545d13d06711e5c39c3d003"}, + {file = "ruff-0.0.292-py3-none-win_amd64.whl", hash = "sha256:f27282bedfd04d4c3492e5c3398360c9d86a295be00eccc63914438b4ac8a83c"}, + {file = "ruff-0.0.292-py3-none-win_arm64.whl", hash = "sha256:7f67a69c8f12fbc8daf6ae6d36705037bde315abf8b82b6e1f4c9e74eb750f68"}, + {file = "ruff-0.0.292.tar.gz", hash = "sha256:1093449e37dd1e9b813798f6ad70932b57cf614e5c2b5c51005bf67d55db33ac"}, +] + [[package]] name = "s3transfer" version = "0.7.0" diff --git a/pyproject.toml b/pyproject.toml index a1e67de9..426b37d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,7 @@ lint = [ "django-stubs", "pylint", "pylint-django", + "ruff" ] test = [ "codecov", @@ -146,3 +147,17 @@ ignore-imports = false [tool.pylint.IMPORTS] deprecated-modules = ["optparse", "tkinter.tix"] + +[tool.ruff] +line-length = 120 +target-version = "py311" +exclude = [ + ".git", + ".mypy_cache", + ".ruff_cache", + "__pypackages__", + "node_modules", + "migrations", + "pgdata", + "settings" +] \ No newline at end of file