forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.cfg
105 lines (103 loc) · 2.99 KB
/
setup.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
[flake8]
max-line-length = 88
ignore =
# space before : (needed for how black formats slicing)
E203,
# line break before binary operator
W503,
# line break after binary operator
W504,
# module level import not at top of file
E402,
# do not assign a lambda expression, use a def
E731,
# found modulo formatter (incorrect picks up mod operations)
S001,
# controversial
B006,
# controversial
B007,
# controversial
B008,
# setattr is used to side-step mypy
B009,
# getattr is used to side-step mypy
B010,
# tests use assert False
B011,
# tests use comparisons but not their returned value
B015,
# false positives
B019,
# Use of functools.lru_cache or functools.cache on methods can lead to memory leaks.
B020
# Loop control variable overrides iterable it iterates
B023
# Functions defined inside a loop must not use variables redefined in the loop
B301,
# single-letter variables
PDF023,
# "use 'pandas._testing' instead" in non-test code
PDF025,
# If test must be a simple comparison against sys.platform or sys.version_info
Y002,
# Use "_typeshed.Self" instead of class-bound TypeVar
Y019,
# Docstrings should not be included in stubs
Y021,
# Use typing_extensions.TypeAlias for type aliases
Y026,
# Use "collections.abc.*" instead of "typing.*" (PEP 585 syntax)
Y027,
# while int | float can be shortened to float, the former is more explicit
Y041
exclude =
doc/sphinxext/*.py,
doc/build/*.py,
doc/temp/*.py,
.eggs/*.py,
versioneer.py,
# exclude asv benchmark environments from linting
env
per-file-ignores =
# private import across modules
pandas/tests/*:PDF020
# pytest.raises without match=
pandas/tests/extension/*:PDF009
# os.remove
doc/make.py:PDF008
# import from pandas._testing
pandas/testing.py:PDF014
# can't use fixtures in asv
asv_bench/*:PDF016
[flake8-rst]
max-line-length = 84
bootstrap =
import numpy as np
import pandas as pd
# avoiding error when importing again numpy or pandas
np
# (in some cases we want to do it to show users)
pd
ignore =
# space before : (needed for how black formats slicing)
E203,
# module level import not at top of file
E402,
# line break before binary operator
W503,
# Classes/functions in different blocks can generate those errors
# expected 2 blank lines, found 0
E302,
# expected 2 blank lines after class or function definition, found 0
E305,
# We use semicolon at the end to avoid displaying plot objects
# statement ends with a semicolon
E703,
# comparison to none should be 'if cond is none:'
E711,
exclude =
doc/source/development/contributing_docstring.rst,
# work around issue of undefined variable warnings
# https://github.com/pandas-dev/pandas/pull/38837#issuecomment-752884156
doc/source/getting_started/comparison/includes/*.rst