Task is:
- check the contributing guide for how to set up your environment
- remove
PLR5501
from
https://github.com/pandas-dev/pandas/blob/4d18871d398248c5876035f5aa139292e6a05279/pyproject.toml#L274-L275
- run
pre-commit run ruff --all-files
- fixup the errors it flags
- stage, commit, push, open pull request
Comment From: ahmad-04
Hi! can i help with this problem.
Comment From: MarcoGorelli
go ahead
Comment From: ahmad-04
How can i run code to check for errors?
Comment From: MarcoGorelli
step 3 from https://github.com/pandas-dev/pandas/issues/51709#issue-1604509032
Comment From: ahmad-04
hey! soory to bother again. i am having this issue i hav pre commit installed but whenever i use it this error comes up pre-commit : The term 'pre-commit' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again
do u know solution??
Comment From: MarcoGorelli
did you follow the contributing guide? https://pandas.pydata.org/docs/dev/development/contributing_environment.html
Comment From: ahmad-04
Yes i did I installed with docker
Comment From: MarcoGorelli
perhaps try gitpod then
Comment From: ahmad-04
sure i will give it a try thanks for help
Comment From: ahmad-04
does this issue want to remove "PLR5501" from whole code???
Comment From: MarcoGorelli
you could add pandas/core/*
to the per-file-ignores
(in pyproject.toml) for this code and just do the rest if it's too much to do in one go. that might be better actually
Comment From: MarcoGorelli
as in, to add
# to be enabled gradually
"pandas/core/*" = ["PLR5501"]
here in this section:
https://github.com/pandas-dev/pandas/blob/4d18871d398248c5876035f5aa139292e6a05279/pyproject.toml#L288-L290
Then there shouldn't be too many to fixup
Comment From: ahmad-04
sure thanks
Comment From: ahmad-04
ok so it says "Found 30 errors." should i start with this
Comment From: MarcoGorelli
yup, thanks!
Comment From: ahmad-04
Ok I will start tomorrow its 11pm rn.
Comment From: MarcoGorelli
😄 sure thing, good night 🛌
Comment From: ahmad-04
Take
Comment From: ahmad-04
Hey, wanted to ask how can i use --fix
Comment From: MarcoGorelli
i don't think you can for this particular code, you'll have to do it manually
Comment From: ahmad-04
no i left some blank space i wanted to use it for that
Comment From: ahmad-04
*] 4 potentially fixable with the --fix option.
Comment From: MarcoGorelli
you can run it via the command line, just make sure you have the same version installed as is in the pre-commit-config.yaml file
Comment From: ahmad-04
Hey, i passed those tests. should i fix rest of those errors now after removing "pandas/core/*" = ["PLR5501"] ???
Comment From: MarcoGorelli
you can open a PR
Comment From: ahmad-04
ok
Comment From: ahmad-04
my branch is few commit behind what sholud i do?
Comment From: MarcoGorelli
you can just open a pr
Comment From: ahmad-04
Done PR that took some time it was first PR ever.