STYLE Increase coverage of inconsistent-namespace-usage #39992
Comments
I ran the script for "extension" and it made no change to files in that folder. I checked my procedure against your example above to make sure this was not the result of a bad manipulation. When changing to series I get the same output as in your post. |
Currently working on indexes, will submit a PR as there were changes on that folder. |
Fix inconsistent namespace in apply directory.
Fix inconsistent namespace in apply directory.
Fix inconsistent namespace in apply directory.
@MarcoGorelli the automatic script only changes it from |
@jorisvandenbossche if there's both, it'll choose the non- e.g. import pandas as pd
def test_0():
pd.DataFrame()
def test_1():
pd.DataFrame() would be left untouched (i.e. it would keep being consistent within the file), but import pandas as pd
from pandas import DataFrame
def test_0():
pd.DataFrame()
def test_1():
DataFrame() would become import pandas as pd
from pandas import DataFrame
def test_0():
DataFrame()
def test_1():
DataFrame() |
libs and tslibs passed without fixes, |
computation passed without fixes |
can someone please tell me whether this issue is fixed or not . |
If you already have experience contributing, then please leave this issue to newcomers - thanks👍
In
.pre-commit-config.yaml
, the checkinconsistent-namespace-usage
is limited topandas/tests/frame/
. Let's expand it to the rest ofpandas/tests/
.The task here is:
series
) and add it to the check in.pre-commit-config.yaml
. E.g., if you choseseries
, that would be:tokenize-rt
as an additional dependency and--replace
as an arg (these will be removed later):Check that the other hooks still pass - if you enable pre-commit (
pre-commit install
), then this will happen automatically when you try to commit your changes (see step 6).pre-commit-config.yaml
(we'll update it once these changes are all so as to avoid a barrage of merge conflicts)Here are the folders in
pandas/tests
which this check needs expanding to:No need to ask for permission to work on this, just leave a comment letting people know which folder(s) from the list above you're working on
The text was updated successfully, but these errors were encountered: