Skip to content

Conversation

@MilyMilo
Copy link
Contributor

  • 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 }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe needs to be PYPI_TOKEN?

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 of typing.Union and typing.Optional
  • Linter suppressions updated from bandit's # nosec to ruff's # noqa format

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
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File is opened but is not closed.

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File is opened but is not closed.

Copilot uses AI. Check for mistakes.
api = API()

new_file = ("file", open(path, mode="rb"))
new_file = ("file", open(path, mode="rb")) # noqa: SIM115
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File is opened but is not closed.

Copilot uses AI. Check for mistakes.
@ColdHeat ColdHeat merged commit 36f5112 into CTFd:master Dec 16, 2025
12 checks passed
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