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
codespell: init at 1.15.0 #63673
codespell: init at 1.15.0 #63673
Conversation
This package could also contain the |
Good idea, thanks! Like this? |
The tests are pretty simple to enable:
|
How's that? |
WFM non-nixos linux x86_64 |
@risicle You can leave a review, even if you don't have commit access, just go to the "Files changed" tab. |
This pull request has been mentioned on Nix community. There might be relevant details there: |
''; | ||
|
||
meta = { | ||
description = "Fix common misspellings in text files"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upstream: "check code for common misspellings"
So "text files" doesn't seem quite right to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, that's better. I chose the first sentence of the upstream README.
@@ -724,6 +724,8 @@ in | |||
|
|||
chkcrontab = callPackage ../tools/admin/chkcrontab { }; | |||
|
|||
codespell = with python3Packages; toPythonApplication codespell; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does toPythonApplication
do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pkgs/top-level/python-packages.nix
Outdated
@@ -342,6 +342,8 @@ in { | |||
|
|||
cozy = callPackage ../development/python-modules/cozy { }; | |||
|
|||
codespell = callPackage ../development/tools/codespell { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Top level comment in python-packages.nix
:
# Expressions for Python libraries are supposed to be in `pkgs/development/python-modules/<name>/default.nix`.
# Python packages that do not need to be available for each interpreter version do not belong in this packages set.
IIRC (not sure about this) its generally preferred for python libraries but for a different reason. I think its because FRidth's automated update tooling only works with Otherwise I'd personally prefer to fetch straight from version control, precisely because it contains more files (documentation, tests). |
Thanks! Sorry for the delay. |
Motivation for this change
With codespell it's easy to check the spelling of variables and comments in source code.
Hint: Can easily be tried on nixpkgs (
./result/bin/codespell ~/clone/nixpkgs
)- I might open a PR fixing spelling mistakes in nixpkgs.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)fetchPypi
is preferred for Python projects overfetchFromGitHub
(or other repo fetchers) because it usually contains the same code but possibly less other unnecessary files for running the program (e.g. documentation), right?