Skip to content

Conversation

@binka-dev
Copy link

Hi all,

for my team it is best practice to specify the version of a requirement within the requirements.txt file.
We do this mainly to prevent issues introduced by incompatible dependency updates.

This pull request aims to include a new feature within the requirements-txt-fixer hook to check for version specifications in requirements files. It fails if a dependency is listed without a version specified. This behavior is optional and can be turned on or off.

Feel free to adjust the code or provide feedback :)

Best regards

Yannik

@asottile
Copy link
Member

asottile commented Mar 5, 2025

please in the future discuss feature ideas before wasting time on them

this makes no sense here -- this is a fixer not a linter.

@asottile asottile closed this Mar 5, 2025
@binka-dev
Copy link
Author

@asottile Thank you for your feedback. Don't be worried that I wasted time.
It is useful for our team beside of the probably incorrect naming.

Do you think such a functionality would be interesting for this repository as part of an independent "linter"?
I think it is useful in general and didn't find a comparable hook so far.

@asottile
Copy link
Member

asottile commented Mar 5, 2025

I can't imagine using it myself so it doesn't meet the bar for universally useful and so it wouldn't end up here

also you shouldn't need code for this, you can accomplish the same thing with a pygrep hook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants