From 274c397189f182a3239b6c81540dbc98518210cb Mon Sep 17 00:00:00 2001 From: Ben Konrath Date: Thu, 2 Jan 2025 15:26:42 +0000 Subject: [PATCH] Update to latest version of prospector (#513) --- .github/workflows/test.yml | 2 +- .prospector.yaml | 5 +++++ tasks.py | 9 +++++++++ tox.ini | 5 ++--- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2cd020ef..1c762a9b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,7 +30,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: '3.12' architecture: x64 - name: Install tox run: | diff --git a/.prospector.yaml b/.prospector.yaml index 3ec3e20a..09ddbd7b 100644 --- a/.prospector.yaml +++ b/.prospector.yaml @@ -11,6 +11,11 @@ pylint: - import-outside-toplevel - no-else-return - no-else-raise + - consider-using-f-string + - raise-missing-from + # The Django settings module is only needed for finding foreign-key relationships from strings which we don't need. + - django-not-configured + - consider-using-generator pep8: options: diff --git a/tasks.py b/tasks.py index 258fdfa5..31731f68 100644 --- a/tasks.py +++ b/tasks.py @@ -64,3 +64,12 @@ def make_translations(c, locale='en'): @task def docs(c): c.run('cd docs; make html; cd ..') + +@task +def prospector(c): + c.run('prospector --profile .prospector.yaml localflavor') + +@task +def prospector_pylint(c): + """ Outputs warnings in pylint format which is useful for getting clickable links to files in some IDEs. """ + c.run('prospector --profile .prospector.yaml --output pylint localflavor') diff --git a/tox.ini b/tox.ini index 1e0760c7..2ebe6a5e 100644 --- a/tox.ini +++ b/tox.ini @@ -43,8 +43,7 @@ commands = [testenv:prospector] deps = - prospector==1.3.0 - pylint>=2.5.2,<2.6.0 + prospector~=1.13.0 -r{toxinidir}/tests/requirements.txt -basepython = python3.9 +basepython = python3.12 commands = prospector --profile .prospector.yaml {toxinidir}