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

Switch from flake8 to ruff #414

Merged
merged 6 commits into from
May 29, 2024
Merged

Switch from flake8 to ruff #414

merged 6 commits into from
May 29, 2024

Conversation

AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented May 28, 2024

Obviously I work at Astral, so I'm biased -- but I do think using linting tools written in another language is a particularly good fit for us at typing_extensions. Most linters (including many flake8 plugins) can't really be installed into the same environment you'd want to use locally for testing typing_extensions, as it's pretty hard to find a linter written in Python that doesn't depend (directly or indirectly) on typing_extensions. If you then use the same environment to run tests as you used for running the linter, you're never sure whether you're actually testing your local copy of typing_extensions or the installed version in site-packages.

As well as switching from flake8 to ruff, this PR also deletes the test-requirements.txt; development dependencies are now listed in a dev extra in pyproject.toml.

@srittau
Copy link
Collaborator

srittau commented May 28, 2024

As well as switching from flake8 to ruff, this PR also deletes the test-requirements.txt; development dependencies are now listed in a dev extra in pyproject.toml.

Considering these are two quite separate concerns, I think this should be split in to two PRs. That said, I'm +0 on using ruff here for the reason you outlined: Ensuring that the linter tools don't use typing-extensions. (Although I still have reservations against using ruff for Python infrastructure projects. But considering the state of flake8, it's not an easy choice.)

@AlexWaygood
Copy link
Member Author

Considering these are two quite separate concerns, I think this should be split in to two PRs.

sure

pyproject.toml Outdated Show resolved Hide resolved
Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

LGTM, although I'd like @JelleZijlstra's opinion.

@srittau srittau requested a review from JelleZijlstra May 28, 2024 15:53
@AlexWaygood AlexWaygood requested a review from JelleZijlstra May 28, 2024 23:14
@JelleZijlstra JelleZijlstra merged commit d76f591 into python:main May 29, 2024
21 checks passed
@AlexWaygood AlexWaygood deleted the ruff branch May 29, 2024 14: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.

3 participants