-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
avoid non-standard imports #24822
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
avoid non-standard imports #24822
Conversation
Codecov Report
@@ Coverage Diff @@
## master #24822 +/- ##
=======================================
Coverage 92.38% 92.38%
=======================================
Files 166 166
Lines 52379 52379
=======================================
Hits 48392 48392
Misses 3987 3987
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #24822 +/- ##
==========================================
- Coverage 92.38% 92.38% -0.01%
==========================================
Files 166 166
Lines 52383 52383
==========================================
- Hits 48396 48395 -1
- Misses 3987 3988 +1
Continue to review full report at Codecov.
|
can you add a rule to find these in the 'patterns' section |
There are still 22 files left that do this, so itll take a couple more passes. |
would be nice to have a rule - u can comment it out for now that finds these |
Done |
@@ -112,6 +112,7 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then | |||
# Check for imports from pandas.core.common instead of `import pandas.core.common as com` | |||
MSG='Check for non-standard imports' ; echo $MSG | |||
invgrep -R --include="*.py*" -E "from pandas.core.common import " pandas | |||
# invgrep -R --include="*.py*" -E "from numpy import nan " pandas # GH#24822 not yet implemented since the offending imports have not all been removed |
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.
this might be too distinct, should literally look for something like '[=,\s+]nan[,\s+]' or something like that, but can do in future PR's
thanks |
git diff upstream/master -u -- "*.py" | flake8 --diff