Skip to content

Modernize python tooling#54

Open
JavierGOrdonnez wants to merge 4 commits intomfarragher:mainfrom
JavierGOrdonnez:claude/modernize-python-tooling-CxU6B
Open

Modernize python tooling#54
JavierGOrdonnez wants to merge 4 commits intomfarragher:mainfrom
JavierGOrdonnez:claude/modernize-python-tooling-CxU6B

Conversation

@JavierGOrdonnez
Copy link

@JavierGOrdonnez JavierGOrdonnez commented Mar 11, 2026

This PR introduces modern python tooling practices & tools:

  • pyproject.toml
  • uv
  • ruff for formatting & linting

Requirements & rules have been preserved.

All changes to code come from automatic linters (not AI). Functionality has been manually verified - tests run.

claude and others added 4 commits March 5, 2026 13:16
- Replace setup.py + requirements*.txt with a single pyproject.toml
  using hatchling as build backend
- Add [tool.uv] dev-dependencies for uv-managed dev workflow
- Add [tool.ruff] config for linting (E/W/F/I/UP/B/C4/SIM) and
  formatting (replaces any prior flake8/black/isort setup)
- Add [tool.ty] config for static type checking with ty
- Add [tool.pytest.ini_options] and [tool.coverage] sections
- Update CI to use astral-sh/setup-uv and uv sync/run, upgrade
  actions/checkout to v4, add dedicated lint and typecheck jobs

uv.lock will be generated automatically on first `uv sync`.

https://claude.ai/code/session_01G13wzGLvmoog4E73fUairt
- Fix F401: use explicit re-export syntax in __init__.py (as api, etc.)
- Fix I001: sort all import blocks to isort standard
- Fix C416/C404/C405: replace unnecessary comprehensions with simpler
  equivalents (dict(), list(), set literals)
- Fix SIM118: remove .keys() in dict membership tests
- Fix UP032: convert .format() calls to f-strings
- Fix B006: replace mutable default arg with None sentinel in
  html_processing._remove_main_formatting
- Fix B028: add stacklevel=2 to warnings.warn in api.py
- Fix E722: replace bare except with except Exception in md_utils.py
- Fix W291: suppress intentional trailing whitespace in test string literal
  via per-file-ignores in pyproject.toml
- Run ruff format over all 23 files (consistent style)
- Remove --cov flags from pytest addopts (added by CI, not hardcoded)

https://claude.ai/code/session_01G13wzGLvmoog4E73fUairt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants