-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Contributor guideline should guide contributors for expected local mypy failures #34902
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
Comments
|
Thanks @oguzhanogreden , might be good to add a line mentioning this to the "pre-commit" section of the contributing guide https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#pre-commit |
take |
Need some input for this, based on the discussion in gitter (see link in message by OP), we should use
But this does not work for me, I had to use
Which one are we going for and should I add to the docs? |
Why not just remove mypy from the pre-commit check? I think this has been an ongoing issue with the interaction of those tools @TomAugspurger I think brought up originally |
If it (mypy check) is not needed, @WillAyd 's suggestion makes more sense to me. |
Another option would be to only run mypy before a push instead of on every commit. This might be achievable with specifying the stage in the config |
Not sure that work would - see below (pandas-dev) marco@marco-Predator-PH315-52:~/pandas-dev$ git fetch upstream master
From https://github.com/pandas-dev/pandas
* branch master -> FETCH_HEAD
(pandas-dev) marco@marco-Predator-PH315-52:~/pandas-dev$ git reset --hard upstream/master
HEAD is now at 0159cba6e CLN: dont consolidate in indexing (#34679)
(pandas-dev) marco@marco-Predator-PH315-52:~/pandas-dev$ pre-commit run --all
black....................................................................Passed
flake8...................................................................Passed
flake8-pyx...............................................................Passed
flake8-pxd...............................................................Passed
isort....................................................................Failed
- hook id: isort
- files were modified by this hook
Fixing /home/marco/pandas-dev/web/pandas_web.py
mypy.....................................................................Failed
- hook id: mypy
- exit code: 1
pandas/core/dtypes/generic.py:10: error: unused 'type: ignore' comment
pandas/core/resample.py:970: error: unused 'type: ignore' comment
Found 2 errors in 2 files (checked 1043 source files)
(pandas-dev) marco@marco-Predator-PH315-52:~/pandas-dev$ mypy pandas
Success: no issues found in 1024 source files IMHO it could be removed from |
I'm fine with removing mypy from pre-commit. |
Location of the documentation
Location.
Documentation problem
See conversation here.
Suggested fix for documentation
This 'failing' of mypy should be noted so that inexperienced contributors don't have to Google around and experienced ones don't have to explain repeatedly.
I came across this in this context.
The text was updated successfully, but these errors were encountered: