Skip to content

Split requirements files into sections - #10309

Merged
srittau merged 6 commits into
python:mainfrom
srittau:reorg-reqs
Jun 12, 2023
Merged

Split requirements files into sections#10309
srittau merged 6 commits into
python:mainfrom
srittau:reorg-reqs

Conversation

@srittau

@srittau srittau commented Jun 12, 2023

Copy link
Copy Markdown
Collaborator

Also note that type checkers and linters should be pinned to a specific version.

See typeshed-internal/stub_uploader#96 for context.

srittau and others added 2 commits June 12, 2023 19:21
Also note that type checkers and linters should be pinned to a specific
version.
@AlexWaygood

Copy link
Copy Markdown
Member

We'll need to get rid of the requirements-txt-fixer pre-commit hook if we want to do this 😄

Comment thread requirements-tests.txt
Comment on lines 19 to 20
pycln==2.1.5 # must match .pre-commit-config.yaml
pytype==2023.6.2; platform_system != "Windows" and python_version < "3.11"

@Avasam Avasam Jun 12, 2023

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Small comment: Given pycln is a formatter and pytype a type-checker, I would've expected to see them in the above section with black/isort and mypy/flake8.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

That was the case before pre-commit destroyed the order. I'll see if I can fix this.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

oh lol, I see.

Might be worth requesting "sort only within groups" as a feature. It feels like a common use-case (I myself am making groups in my requirements file and not using the fixer in my pre-commit for that exact reason).

Removing it atm seems reasonable.

Comment thread requirements-tests.txt Outdated
@srittau
srittau merged commit ce222e5 into python:main Jun 12, 2023
@srittau
srittau deleted the reorg-reqs branch June 12, 2023 18:18
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