Skip to content

fix: make ruff check and format pass - #151

Open
AlexanderWillner wants to merge 4 commits into
thingsapi:mainfrom
AlexanderWillner:ruff-fix-36c7acf
Open

AlexanderWillner wants to merge 4 commits into
thingsapi:mainfrom
AlexanderWillner:ruff-fix-36c7acf

Conversation

@AlexanderWillner

Copy link
Copy Markdown
Contributor

Follow-up to 36c7acf: ruff check . reported 44 findings (mostly pre-existing) and ruff format --check flagged two files.

  • Add ruff.toml with target-version py38 (matches python_requires>=3.7 and CI 3.8-3.14), so no syntax rewrites that break old Pythons.
  • Ignore FA100 (keep runtime annotations) and TRY004 (ValueError is API contract: api.get() catches it, tests expect it).
  • Mark C901 as external so the intentional flake8 noqa in api.py stays.
  • Remove unused blanket noqa directives, sort imports, normalize quotes via ruff format.
  • Drop stray shebang in tests/test_things.py and executable bit on things/database.py.

Verified: ruff check and ruff format --check pass, 37/37 unittests green.

Add ruff.toml with target-version py38 (matches python_requires
and CI), remove unused noqa directives, sort imports, normalize
quotes via ruff format, drop stray shebang and executable bit.
3.8-3.10 are EOL, and 3.8 is no longer provided on ubuntu-26.04,
which broke CI at setup-python. Drop them from the test matrix,
bump python_requires and Pipfile, retarget Ruff to py311 and
modernize annotations (PEP 585/604).
pipenv treats python_version as an exact requirement, not a
minimum, so "3.11" broke deps-install on 3.12+. The minimum
version lives in setup.py (python_requires >= 3.11).
@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant