Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to pyproject.toml #138

Merged
merged 1 commit into from
Mar 14, 2025

Conversation

sharkdp
Copy link
Contributor

@sharkdp sharkdp commented Mar 14, 2025

I'm not sure if this is a desired change for this project. Please feel free to close this without comment if you think it's unnecessary. mypy_primer works fine without this.

The idea is to replace the setup.py-based configuration with a pyproject.toml file. The main motivating reasons for this PR are:

  • Being able to just use uv/poetry/pdm run mypy_primer.
  • To declare the development dependencies so that I can run them without having to install them locally
  • Being able to run test.sh without having to install black/flake8/isort/mypy globally
  • To lock the dependencies to make sure that every developer uses the same version of black/flake8/isort/mypy when working on this project

I verified that it is still possible to install mypy_primer using pip, like it's done in the mypy CI pipeline here.

Disclaimer: I work for @astral-sh. It's certainly not my goal to promote uv with this PR. I saw that mypy_primer already uses uv internally, for its testing, and in the CI pipeline. So I thought it would be fine to double-down on that decision. This PR also adds a uv.lock file to make sure everyone uses the same versions of the dev tools. I can also remove it if a tool-specific lock file (while we wait for PEP-751) is not desirable for some reason.

Copy link
Owner

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Thank you! And yeah, using uv internally made mypy_primer much faster :-)

@hauntsaninja hauntsaninja merged commit 488a9d9 into hauntsaninja:master Mar 14, 2025
1 check passed
@AlexWaygood AlexWaygood deleted the pyproject-toml branch March 14, 2025 22:31
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