Skip to content
This repository was archived by the owner on Feb 19, 2023. It is now read-only.

Commit 56e309c

Browse files
committed
fixup readme
1 parent c72c2a0 commit 56e309c

12 files changed

+27
-25
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@ a linter for pandas usage, please see [pandas-vet](https://github.com/deppen8/pa
1818

1919
| Code | Description |
2020
|--------|-------------------------------------------------------------------------|
21-
| PDF001 | found import from collections.abc (use 'from collections import abc') |
22-
| PDF002 | builtin filter function used |
23-
| PDF003 | builtin exec used |
21+
| PDF001 | found import from 'collections.abc' (use 'from collections import abc') |
22+
| PDF002 | builtin 'filter' function used |
23+
| PDF003 | builtin 'exec' function used |
2424
| PDF004 | 'foo.\_\_class\_\_' used, (use 'type(foo)' instead) |
2525
| PDF005 | leading space in concatenated strings |
2626
| PDF006 | Found '{foo!r}' formatted value (instead, use 'repr(foo)') |
2727
| PDF007 | line split in two unnecessarily by 'black' formatter |
2828
| PDF008 | found 'os.remove' (use 'tm.ensure_clean' instead) |
2929
| PDF009 | 'pytest.raises' used without 'match=' |
3030
| PDF010 | 'pytest.raises' used outside of context manager |
31-
| PDF011 | found pytest.warns (use pandas._testing.assert_produces_warning) |
32-
| PDF012 | found pytest.xfail (use pytest.mark.xfail instead) |
31+
| PDF011 | found 'pytest.warns' (use 'pandas._testing.assert_produces_warning') |
32+
| PDF012 | found 'pytest.xfail' (use 'pytest.mark.xfail' instead) |
3333
| PDF013 | import from 'conftest' found |
3434
| PDF014 | found import from 'pandas._testing' (use 'import pandas._testing as tm')|
35-
| PDF015 | don't import from pandas.testing |
35+
| PDF015 | from import from 'pandas.testing' (use 'import pandas._testing as tm') |
3636
| PDF016 | found 'unittest.mock' (use 'pytest.monkeypatch' instead) |
3737
| PDF017 | 'pd.api.types' used (import from 'pandas.api.types' instead) |
3838
| PDF018 | 'common' imported from 'pandas.core' without 'comm' alias |

pandas_dev_flaker/_plugins_tree/builtin_filter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from pandas_dev_flaker._data_tree import State, register
55

6-
MSG = "PDF002 builtin filter function used"
6+
MSG = "PDF002 builtin 'filter' function used"
77

88

99
@register(ast.Call)

pandas_dev_flaker/_plugins_tree/collections_abc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from pandas_dev_flaker._data_tree import State, register
55

66
MSG = (
7-
"PDF001 found import from collections.abc "
7+
"PDF001 found import from 'collections.abc' "
88
"(use 'from collections import abc')"
99
)
1010

pandas_dev_flaker/_plugins_tree/exec_usage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from pandas_dev_flaker._data_tree import State, register
55

6-
MSG = "PDF003 builtin exec used"
6+
MSG = "PDF003 builtin 'exec' function used"
77

88

99
@register(ast.Call)

pandas_dev_flaker/_plugins_tree/pytest_warns.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
from pandas_dev_flaker._data_tree import State, register
55

66
MSG = (
7-
"PDF011 found pytest.warns "
8-
"(use pandas._testing.assert_produces_warning)"
7+
"PDF011 found 'pytest.warns' "
8+
"(use 'pandas._testing.assert_produces_warning')"
99
)
1010

1111

pandas_dev_flaker/_plugins_tree/pytest_xfail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from pandas_dev_flaker._data_tree import State, register
55

6-
MSG = "PDF012 found pytest.xfail (use pytest.mark.xfail instead)"
6+
MSG = "PDF012 found 'pytest.xfail' (use 'pytest.mark.xfail' instead)"
77

88

99
@register(ast.FunctionDef)

tests/builtin_exec_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def test_noop(source):
3535
(
3636
pytest.param(
3737
"exec('str')",
38-
"1:0: PDF003 builtin exec used",
38+
"1:0: PDF003 builtin 'exec' function used",
3939
id="builtin exec",
4040
),
4141
),

tests/builtin_filter_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def test_noop(source):
3535
(
3636
pytest.param(
3737
"lst = [1,2,3]\n" "filter(lambda x: x, lst)",
38-
"2:0: PDF002 builtin filter function used",
38+
"2:0: PDF002 builtin 'filter' function used",
3939
id="builtin filter",
4040
),
4141
),

tests/collections_abc_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,25 +35,25 @@ def test_noop(source):
3535
(
3636
pytest.param(
3737
"from collections.abc.Generator import foo",
38-
"1:0: PDF001 found import from collections.abc "
38+
"1:0: PDF001 found import from 'collections.abc' "
3939
"(use 'from collections import abc')",
4040
id="3rd level 'from' import",
4141
),
4242
pytest.param(
4343
"from collections.abc import Generator",
44-
"1:0: PDF001 found import from collections.abc "
44+
"1:0: PDF001 found import from 'collections.abc' "
4545
"(use 'from collections import abc')",
4646
id="2nd level 'from' import",
4747
),
4848
pytest.param(
4949
"import collections.abc.Generator",
50-
"1:0: PDF001 found import from collections.abc "
50+
"1:0: PDF001 found import from 'collections.abc' "
5151
"(use 'from collections import abc')",
5252
id="3rd level import",
5353
),
5454
pytest.param(
5555
"import collections.abc",
56-
"1:0: PDF001 found import from collections.abc "
56+
"1:0: PDF001 found import from 'collections.abc' "
5757
"(use 'from collections import abc')",
5858
id="2nd level import",
5959
),

tests/pandas_testing_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def test_noop(source):
4343
"from pandas.testing import foo",
4444
"1:0: PDF015 found import from 'pandas.testing' "
4545
"(use 'import pandas._testing as tm')",
46-
id="import from pandas.testing",
46+
id="import from 'pandas.testing'",
4747
),
4848
pytest.param(
4949
"import pandas\n" "pandas.testing.foo",

tests/pytest_warns_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ def test_noop(source):
3535
(
3636
pytest.param(
3737
"from pytest import warns\n",
38-
"1:0: PDF011 found pytest.warns "
39-
"(use pandas._testing.assert_produces_warning)",
38+
"1:0: PDF011 found 'pytest.warns' "
39+
"(use 'pandas._testing.assert_produces_warning')",
4040
id="warns used, imported from pytest",
4141
),
4242
pytest.param(
4343
"import pytest\n" "with pytest.warns(): pass",
44-
"2:5: PDF011 found pytest.warns "
45-
"(use pandas._testing.assert_produces_warning)",
44+
"2:5: PDF011 found 'pytest.warns' "
45+
"(use 'pandas._testing.assert_produces_warning')",
4646
id="pytest.warns used",
4747
),
4848
),

tests/pytest_xfail_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ def test_noop(source):
3535
(
3636
pytest.param(
3737
"from pytest import xfail\n",
38-
"1:0: PDF012 found pytest.xfail (use pytest.mark.xfail instead)",
38+
"1:0: PDF012 found 'pytest.xfail' "
39+
"(use 'pytest.mark.xfail' instead)",
3940
id="xfail used, imported from pytest",
4041
),
4142
pytest.param(
4243
"import pytest\n" "@pytest.xfail\n" "def testme(): ...",
43-
"3:0: PDF012 found pytest.xfail (use pytest.mark.xfail instead)",
44+
"3:0: PDF012 found 'pytest.xfail' "
45+
"(use 'pytest.mark.xfail' instead)",
4446
id="pytest.xfail used",
4547
),
4648
),

0 commit comments

Comments
 (0)