Conversation
MilyMilo
commented
Dec 15, 2025
- use uv instead of poetry
- update and use ruff format instead of black / isort
- update github actions
- address new liner config
- drop support for python 3.9 as it's EOL by now
| run: | | ||
| poetry config pypi-token.pypi "$PYPI_TOKEN" | ||
| poetry publish | ||
| UV_PUBLISH_TOKEN: ${{ secrets.PYPI_PASSWORD }} |
There was a problem hiding this comment.
Pull request overview
This pull request migrates the project's build system from Poetry to uv and consolidates code formatting tools by replacing black and isort with ruff. The PR also drops support for Python 3.9 (now EOL) and raises the minimum version to Python 3.10. The changes include modernizing type hints to use Python 3.10+ syntax (PEP 604 union types) and updating linter suppression comments to work with ruff.
Key changes:
- Build system migrated from Poetry to uv with hatchling backend
- Code formatter consolidated to ruff (replacing black and isort)
- Python version requirement updated from >=3.8 to >=3.10
- Type hints modernized to use
|union syntax instead oftyping.Unionandtyping.Optional - Linter suppressions updated from bandit's
# nosecto ruff's# noqaformat
Reviewed changes
Copilot reviewed 31 out of 33 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Complete rewrite from Poetry to uv format with PEP 621 metadata and ruff configuration |
| uv.lock | New lockfile generated by uv replacing poetry.lock |
| poetry.lock | Removed in favor of uv.lock |
| preprocess.py | Deleted as no longer needed |
| Makefile | Updated lint/format commands to use ruff instead of black/isort |
| tests/core/*.py | Type hints modernized and formatting applied |
| ctfcli/**/*.py | Type hints modernized, formatting applied, linter suppressions updated |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| def _create_file(self, local_path: Path): | ||
| new_file = ("file", open(local_path, mode="rb")) | ||
| new_file = ("file", open(local_path, mode="rb")) # noqa: SIM115 |
There was a problem hiding this comment.
File is opened but is not closed.
| files = self.get("files") or [] | ||
| for challenge_file in files: | ||
| new_files.append(("file", open(self.challenge_directory / challenge_file, mode="rb"))) | ||
| new_files.append(("file", open(self.challenge_directory / challenge_file, mode="rb"))) # noqa: SIM115 |
There was a problem hiding this comment.
File is opened but is not closed.
| api = API() | ||
|
|
||
| new_file = ("file", open(path, mode="rb")) | ||
| new_file = ("file", open(path, mode="rb")) # noqa: SIM115 |
There was a problem hiding this comment.
File is opened but is not closed.