diff --git a/.github/workflows/code-checks.yml b/.github/workflows/code-checks.yml index 24b2de251ce8e..937af7e49c6d3 100644 --- a/.github/workflows/code-checks.yml +++ b/.github/workflows/code-checks.yml @@ -85,7 +85,7 @@ jobs: echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV if: ${{ steps.build.outcome == 'success' && always() }} - - name: Typing + pylint + - name: Typing uses: pre-commit/action@v3.0.1 with: extra_args: --verbose --hook-stage manual --all-files diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8eec5d5515239..8c546ccae41e5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ ci: autofix_prs: false autoupdate_schedule: monthly # manual stage hooks - skip: [pylint, pyright, mypy] + skip: [pyright, mypy] repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.3.4 @@ -67,25 +67,6 @@ repos: - id: fix-encoding-pragma args: [--remove] - id: trailing-whitespace -- repo: https://github.com/pylint-dev/pylint - rev: v3.0.1 - hooks: - - id: pylint - stages: [manual] - args: [--load-plugins=pylint.extensions.redefined_loop_name, --fail-on=I0021] - - id: pylint - alias: redefined-outer-name - name: Redefining name from outer scope - files: ^pandas/ - exclude: | - (?x) - ^pandas/tests # keep excluded - |/_testing/ # keep excluded - |^pandas/util/_test_decorators\.py # keep excluded - |^pandas/_version\.py # keep excluded - |^pandas/conftest\.py # keep excluded - args: [--disable=all, --enable=redefined-outer-name] - stages: [manual] - repo: https://github.com/PyCQA/isort rev: 5.13.2 hooks: diff --git a/pandas/_libs/tslibs/__init__.py b/pandas/_libs/tslibs/__init__.py index 88a9a259ac8ec..31979b293a940 100644 --- a/pandas/_libs/tslibs/__init__.py +++ b/pandas/_libs/tslibs/__init__.py @@ -36,7 +36,7 @@ "is_supported_dtype", ] -from pandas._libs.tslibs import dtypes # pylint: disable=import-self +from pandas._libs.tslibs import dtypes from pandas._libs.tslibs.conversion import localize_pydatetime from pandas._libs.tslibs.dtypes import ( Resolution, diff --git a/pandas/core/arrays/categorical.py b/pandas/core/arrays/categorical.py index 3af4c528ceae8..8d6880fc2acb3 100644 --- a/pandas/core/arrays/categorical.py +++ b/pandas/core/arrays/categorical.py @@ -2482,7 +2482,6 @@ def unique(self) -> Self: ['b', 'a'] Categories (3, object): ['a' < 'b' < 'c'] """ - # pylint: disable=useless-parent-delegation return super().unique() def _cast_quantile_result(self, res_values: np.ndarray) -> np.ndarray: diff --git a/pandas/core/arrays/datetimelike.py b/pandas/core/arrays/datetimelike.py index c9aeaa1ce21c3..f4f076103d8c3 100644 --- a/pandas/core/arrays/datetimelike.py +++ b/pandas/core/arrays/datetimelike.py @@ -506,7 +506,6 @@ def view(self, dtype: Literal["m8[ns]"]) -> TimedeltaArray: ... @overload def view(self, dtype: Dtype | None = ...) -> ArrayLike: ... - # pylint: disable-next=useless-parent-delegation def view(self, dtype: Dtype | None = None) -> ArrayLike: # we need to explicitly call super() method as long as the `@overload`s # are present in this file. diff --git a/pandas/core/base.py b/pandas/core/base.py index f5eefe1b4ab92..95b203590b393 100644 --- a/pandas/core/base.py +++ b/pandas/core/base.py @@ -127,7 +127,7 @@ def __sizeof__(self) -> int: """ memory_usage = getattr(self, "memory_usage", None) if memory_usage: - mem = memory_usage(deep=True) # pylint: disable=not-callable + mem = memory_usage(deep=True) return int(mem if is_scalar(mem) else mem.sum()) # no memory_usage attribute, so fall back to object's 'sizeof' diff --git a/pandas/core/dtypes/common.py b/pandas/core/dtypes/common.py index aa621fea6c39a..4d8d3c2816f69 100644 --- a/pandas/core/dtypes/common.py +++ b/pandas/core/dtypes/common.py @@ -250,7 +250,7 @@ def is_scipy_sparse(arr) -> bool: """ global _is_scipy_sparse - if _is_scipy_sparse is None: # pylint: disable=used-before-assignment + if _is_scipy_sparse is None: try: from scipy.sparse import issparse as _is_scipy_sparse except ImportError: diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index b313657d33b04..c91e4233ef540 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -5014,7 +5014,7 @@ def shift( period = cast(int, period) if freq is not None: f = lambda x: x.shift( - period, # pylint: disable=cell-var-from-loop + period, freq, 0, # axis fill_value, diff --git a/pandas/core/indexes/multi.py b/pandas/core/indexes/multi.py index 2e554bc848ffe..d6149bcd6fdac 100644 --- a/pandas/core/indexes/multi.py +++ b/pandas/core/indexes/multi.py @@ -2803,7 +2803,6 @@ def get_slice_bound( label = (label,) return self._partial_tup_index(label, side=side) - # pylint: disable-next=useless-parent-delegation def slice_locs(self, start=None, end=None, step=None) -> tuple[int, int]: """ For an ordered MultiIndex, compute the slice locations for input diff --git a/pandas/core/internals/__init__.py b/pandas/core/internals/__init__.py index 31234fb1f116f..89c8a4a27ca31 100644 --- a/pandas/core/internals/__init__.py +++ b/pandas/core/internals/__init__.py @@ -6,9 +6,9 @@ ) __all__ = [ - "Block", # pylint: disable=undefined-all-variable - "DatetimeTZBlock", # pylint: disable=undefined-all-variable - "ExtensionBlock", # pylint: disable=undefined-all-variable + "Block", + "DatetimeTZBlock", + "ExtensionBlock", "make_block", "BlockManager", "SingleBlockManager", diff --git a/pandas/core/series.py b/pandas/core/series.py index 967aea15fff60..62a6178f5af4d 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1469,7 +1469,6 @@ def __repr__(self) -> str: """ Return a string representation for a particular Series. """ - # pylint: disable=invalid-repr-returned repr_params = fmt.get_series_repr_params() return self.to_string(**repr_params) @@ -2059,7 +2058,7 @@ def mode(self, dropna: bool = True) -> Series: dtype=self.dtype, ).__finalize__(self, method="mode") - def unique(self) -> ArrayLike: # pylint: disable=useless-parent-delegation + def unique(self) -> ArrayLike: """ Return unique values of Series object. diff --git a/pandas/io/formats/style.py b/pandas/io/formats/style.py index ab5f1c039b7ca..b2b0d711c6b54 100644 --- a/pandas/io/formats/style.py +++ b/pandas/io/formats/style.py @@ -3038,7 +3038,7 @@ def set_properties(self, subset: Subset | None = None, **kwargs) -> Styler: return self.map(lambda x: values, subset=subset) @Substitution(subset=subset_args) - def bar( # pylint: disable=disallowed-name + def bar( self, subset: Subset | None = None, axis: Axis | None = 0, diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index 763244c5bdf0e..60bb45d3ac1dc 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -1187,7 +1187,7 @@ def line( ) @Substitution(kind="bar") @Appender(_bar_or_line_doc) - def bar( # pylint: disable=disallowed-name + def bar( self, x: Hashable | None = None, y: Hashable | None = None, diff --git a/pandas/plotting/_matplotlib/boxplot.py b/pandas/plotting/_matplotlib/boxplot.py index 75b24cd42e062..2a28cd94b64e5 100644 --- a/pandas/plotting/_matplotlib/boxplot.py +++ b/pandas/plotting/_matplotlib/boxplot.py @@ -82,7 +82,7 @@ def __init__(self, data, return_type: str = "axes", **kwargs) -> None: self.return_type = return_type # Do not call LinePlot.__init__ which may fill nan - MPLPlot.__init__(self, data, **kwargs) # pylint: disable=non-parent-init-called + MPLPlot.__init__(self, data, **kwargs) if self.subplots: # Disable label ax sharing. Otherwise, all subplots shows last diff --git a/pandas/plotting/_matplotlib/core.py b/pandas/plotting/_matplotlib/core.py index 700136bca8da7..38a75e741d60e 100644 --- a/pandas/plotting/_matplotlib/core.py +++ b/pandas/plotting/_matplotlib/core.py @@ -297,7 +297,7 @@ def __init__( def _validate_sharex(sharex: bool | None, ax, by) -> bool: if sharex is None: # if by is defined, subplots are used and sharex should be False - if ax is None and by is None: # pylint: disable=simplifiable-if-statement + if ax is None and by is None: sharex = True else: # if we get an axis, the users should do the visibility diff --git a/pandas/plotting/_matplotlib/hist.py b/pandas/plotting/_matplotlib/hist.py index d9d1df128d199..ca635386be335 100644 --- a/pandas/plotting/_matplotlib/hist.py +++ b/pandas/plotting/_matplotlib/hist.py @@ -78,7 +78,7 @@ def __init__( self.xlabel = kwargs.get("xlabel") self.ylabel = kwargs.get("ylabel") # Do not call LinePlot.__init__ which may fill nan - MPLPlot.__init__(self, data, **kwargs) # pylint: disable=non-parent-init-called + MPLPlot.__init__(self, data, **kwargs) self.bins = self._adjust_bins(bins) @@ -236,7 +236,7 @@ def __init__( self, data, bw_method=None, ind=None, *, weights=None, **kwargs ) -> None: # Do not call LinePlot.__init__ which may fill nan - MPLPlot.__init__(self, data, **kwargs) # pylint: disable=non-parent-init-called + MPLPlot.__init__(self, data, **kwargs) self.bw_method = bw_method self.ind = ind self.weights = weights diff --git a/pandas/tests/config/test_config.py b/pandas/tests/config/test_config.py index 5b1d4cde9fb59..aaf6178866ecd 100644 --- a/pandas/tests/config/test_config.py +++ b/pandas/tests/config/test_config.py @@ -227,7 +227,6 @@ def test_validation(self): validator = cf.is_one_of_factory([None, cf.is_callable]) cf.register_option("b", lambda: None, "doc", validator=validator) - # pylint: disable-next=consider-using-f-string cf.set_option("b", "%.1f".format) # Formatter is callable cf.set_option("b", None) # Formatter is none (default) with pytest.raises(ValueError, match="Value must be a callable"): diff --git a/pandas/tests/dtypes/test_inference.py b/pandas/tests/dtypes/test_inference.py index 96a67591f6c78..668e7192c0e52 100644 --- a/pandas/tests/dtypes/test_inference.py +++ b/pandas/tests/dtypes/test_inference.py @@ -240,8 +240,6 @@ def test_is_list_like_generic(): # is_list_like was yielding false positives for Generic classes in python 3.11 T = TypeVar("T") - # https://github.com/pylint-dev/pylint/issues/9398 - # pylint: disable=multiple-statements class MyDataFrame(DataFrame, Generic[T]): ... tstc = MyDataFrame[int] diff --git a/pandas/tests/groupby/test_grouping.py b/pandas/tests/groupby/test_grouping.py index 9ce7a0818ac02..063b0ce38387f 100644 --- a/pandas/tests/groupby/test_grouping.py +++ b/pandas/tests/groupby/test_grouping.py @@ -1044,7 +1044,6 @@ def test_multi_iter_frame(self, three_group): grouped = df.groupby(["k1", "k2"]) # calling `dict` on a DataFrameGroupBy leads to a TypeError, # we need to use a dictionary comprehension here - # pylint: disable-next=unnecessary-comprehension groups = {key: gp for key, gp in grouped} # noqa: C416 assert len(groups) == 2 diff --git a/pandas/tests/indexes/datetimes/test_iter.py b/pandas/tests/indexes/datetimes/test_iter.py index a006ed79f27ba..dbd233eed908f 100644 --- a/pandas/tests/indexes/datetimes/test_iter.py +++ b/pandas/tests/indexes/datetimes/test_iter.py @@ -20,7 +20,7 @@ def test_iteration_preserves_nanoseconds(self, tz): ["2018-02-08 15:00:00.168456358", "2018-02-08 15:00:00.168456359"], tz=tz ) for i, ts in enumerate(index): - assert ts == index[i] # pylint: disable=unnecessary-list-index-lookup + assert ts == index[i] def test_iter_readonly(self): # GH#28055 ints_to_pydatetime with readonly array @@ -35,7 +35,7 @@ def test_iteration_preserves_tz(self): for i, ts in enumerate(index): result = ts - expected = index[i] # pylint: disable=unnecessary-list-index-lookup + expected = index[i] assert result == expected def test_iteration_preserves_tz2(self): @@ -45,7 +45,7 @@ def test_iteration_preserves_tz2(self): for i, ts in enumerate(index): result = ts - expected = index[i] # pylint: disable=unnecessary-list-index-lookup + expected = index[i] assert result._repr_base == expected._repr_base assert result == expected @@ -56,7 +56,7 @@ def test_iteration_preserves_tz3(self): ) for i, ts in enumerate(index): result = ts - expected = index[i] # pylint: disable=unnecessary-list-index-lookup + expected = index[i] assert result._repr_base == expected._repr_base assert result == expected diff --git a/pandas/tests/io/formats/style/test_html.py b/pandas/tests/io/formats/style/test_html.py index 2306324efb974..752b9b391f9cb 100644 --- a/pandas/tests/io/formats/style/test_html.py +++ b/pandas/tests/io/formats/style/test_html.py @@ -821,7 +821,6 @@ def test_rendered_links(type, text, exp, found): def test_multiple_rendered_links(): links = ("www.a.b", "http://a.c", "https://a.d", "ftp://a.e") - # pylint: disable-next=consider-using-f-string df = DataFrame(["text {} {} text {} {}".format(*links)]) result = df.style.format(hyperlinks="html").to_html() href = '{0}' diff --git a/pandas/tests/io/test_html.py b/pandas/tests/io/test_html.py index 2c0f19dc74ed2..f16f3a2a5c775 100644 --- a/pandas/tests/io/test_html.py +++ b/pandas/tests/io/test_html.py @@ -152,7 +152,6 @@ def test_to_html_compat(self, flavor_read_html): np.random.default_rng(2).random((4, 3)), columns=pd.Index(list("abc"), dtype=object), ) - # pylint: disable-next=consider-using-f-string .map("{:.3f}".format) .astype(float) ) @@ -1460,7 +1459,6 @@ def seek(self, offset): def seekable(self): return True - # GH 49036 pylint checks for presence of __next__ for iterators def __next__(self): ... def __iter__(self) -> Iterator: diff --git a/pandas/tests/reshape/test_pivot.py b/pandas/tests/reshape/test_pivot.py index 2ccb622c7a250..97f06b0e379f4 100644 --- a/pandas/tests/reshape/test_pivot.py +++ b/pandas/tests/reshape/test_pivot.py @@ -819,7 +819,7 @@ def test_pivot_columns_none_raise_error(self): df = DataFrame({"col1": ["a", "b", "c"], "col2": [1, 2, 3], "col3": [1, 2, 3]}) msg = r"pivot\(\) missing 1 required keyword-only argument: 'columns'" with pytest.raises(TypeError, match=msg): - df.pivot(index="col1", values="col3") # pylint: disable=missing-kwoa + df.pivot(index="col1", values="col3") @pytest.mark.xfail( reason="MultiIndexed unstack with tuple names fails with KeyError GH#19966" @@ -2600,7 +2600,7 @@ def test_pivot_columns_not_given(self): # GH#48293 df = DataFrame({"a": [1], "b": 1}) with pytest.raises(TypeError, match="missing 1 required keyword-only argument"): - df.pivot() # pylint: disable=missing-kwoa + df.pivot() @pytest.mark.xfail(using_pyarrow_string_dtype(), reason="None is cast to NaN") def test_pivot_columns_is_none(self): diff --git a/pandas/tests/scalar/timedelta/test_arithmetic.py b/pandas/tests/scalar/timedelta/test_arithmetic.py index 96721f11cb2d6..efeca375affbb 100644 --- a/pandas/tests/scalar/timedelta/test_arithmetic.py +++ b/pandas/tests/scalar/timedelta/test_arithmetic.py @@ -1180,5 +1180,5 @@ def test_ops_error_str(): with pytest.raises(TypeError, match=msg): left > right - assert not left == right # pylint: disable=unneeded-not + assert not left == right assert left != right diff --git a/pandas/tests/scalar/timestamp/test_comparisons.py b/pandas/tests/scalar/timestamp/test_comparisons.py index e7e5541cf499f..b2590c43e1ece 100644 --- a/pandas/tests/scalar/timestamp/test_comparisons.py +++ b/pandas/tests/scalar/timestamp/test_comparisons.py @@ -309,5 +309,5 @@ def __eq__(self, other) -> bool: for left, right in [(inf, timestamp), (timestamp, inf)]: assert left > right or left < right assert left >= right or left <= right - assert not left == right # pylint: disable=unneeded-not + assert not left == right assert left != right diff --git a/pandas/tests/util/test_deprecate_nonkeyword_arguments.py b/pandas/tests/util/test_deprecate_nonkeyword_arguments.py index e74ff89b11581..f81d32b574682 100644 --- a/pandas/tests/util/test_deprecate_nonkeyword_arguments.py +++ b/pandas/tests/util/test_deprecate_nonkeyword_arguments.py @@ -124,8 +124,7 @@ def test_i_signature(): class Foo: @deprecate_nonkeyword_arguments(version=None, allowed_args=["self", "bar"]) - def baz(self, bar=None, foobar=None): # pylint: disable=disallowed-name - ... + def baz(self, bar=None, foobar=None): ... def test_foo_signature(): diff --git a/pyproject.toml b/pyproject.toml index 0a0a3e8b484f0..085c054f8241a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -318,7 +318,61 @@ ignore = [ # pairwise-over-zipped (>=PY310 only) "RUF007", # mutable-class-default - "RUF012" + "RUF012", + + # Additional pylint rules + # literal-membership + "PLR6201", # 847 errors + # Method could be a function, class method, or static method + "PLR6301", # 11411 errors + # Private name import + "PLC2701", # 27 errors + # Too many positional arguments (6/5) + "PLR0917", # 470 errors + # compare-to-empty-string + "PLC1901", + # `tempfile.NamedTemporaryFile` in text mode without explicit `encoding` argument + "PLW1514", # 1 error + # Object does not implement `__hash__` method + "PLW1641", # 16 errors + # Bad or misspelled dunder method name + "PLW3201", # 69 errors, seems to be all false positive + # Unnecessary lookup of dictionary value by key + "PLR1733", # 5 errors, it seems like we wannt to ignore these + # Unnecessary lookup of list item by index + "PLR1736", # 4 errors, we're currently having inline pylint ignore + # empty-comment + "PLR2044", # autofixable + # Unpacking a dictionary in iteration without calling `.items()` + "PLE1141", # autofixable + # import-outside-toplevel + "PLC0415", + # unnecessary-dunder-call + "PLC2801", + # comparison-with-itself + "PLR0124", + # too-many-public-methods + "PLR0904", + # too-many-return-statements + "PLR0911", + # too-many-branches + "PLR0912", + # too-many-arguments + "PLR0913", + # too-many-locals + "PLR0914", + # too-many-statements + "PLR0915", + # too-many-boolean-expressions + "PLR0916", + # too-many-nested-blocks + "PLR1702", + # redefined-argument-from-local + "PLR1704", + # unnecessary-lambda + "PLW0108", + # global-statement + "PLW0603", ] exclude = [ @@ -367,110 +421,6 @@ mark-parentheses = false [tool.ruff.format] docstring-code-format = true -[tool.pylint.messages_control] -max-line-length = 88 -disable = [ - # intentionally turned off - "bad-mcs-classmethod-argument", - "broad-except", - "c-extension-no-member", - "comparison-with-itself", - "consider-using-enumerate", - "import-error", - "import-outside-toplevel", - "invalid-name", - "invalid-unary-operand-type", - "line-too-long", - "no-else-continue", - "no-else-raise", - "no-else-return", - "no-member", - "no-name-in-module", - "not-an-iterable", - "overridden-final-method", - "pointless-statement", - "redundant-keyword-arg", - "singleton-comparison", - "too-many-ancestors", - "too-many-arguments", - "too-many-boolean-expressions", - "too-many-branches", - "too-many-function-args", - "too-many-instance-attributes", - "too-many-locals", - "too-many-nested-blocks", - "too-many-public-methods", - "too-many-return-statements", - "too-many-statements", - "unexpected-keyword-arg", - "ungrouped-imports", - "unsubscriptable-object", - "unsupported-assignment-operation", - "unsupported-membership-test", - "unused-import", - "use-dict-literal", - "use-implicit-booleaness-not-comparison", - "use-implicit-booleaness-not-len", - "wrong-import-order", - "wrong-import-position", - "redefined-loop-name", - - # misc - "abstract-class-instantiated", - "no-value-for-parameter", - "undefined-variable", - "unpacking-non-sequence", - "used-before-assignment", - - # pylint type "C": convention, for programming standard violation - "missing-class-docstring", - "missing-function-docstring", - "missing-module-docstring", - "superfluous-parens", - "too-many-lines", - "unidiomatic-typecheck", - "unnecessary-dunder-call", - "unnecessary-lambda-assignment", - - # pylint type "R": refactor, for bad code smell - "consider-using-with", - "cyclic-import", - "duplicate-code", - "inconsistent-return-statements", - "redefined-argument-from-local", - "too-few-public-methods", - - # pylint type "W": warning, for python specific problems - "abstract-method", - "arguments-differ", - "arguments-out-of-order", - "arguments-renamed", - "attribute-defined-outside-init", - "broad-exception-raised", - "comparison-with-callable", - "dangerous-default-value", - "deprecated-module", - "eval-used", - "expression-not-assigned", - "fixme", - "global-statement", - "invalid-overridden-method", - "keyword-arg-before-vararg", - "possibly-unused-variable", - "protected-access", - "raise-missing-from", - "redefined-builtin", - "redefined-outer-name", - "self-cls-assignment", - "signature-differs", - "super-init-not-called", - "try-except-raise", - "unnecessary-lambda", - "unused-argument", - "unused-variable", - "using-constant-test" -] - [tool.pytest.ini_options] # sync minversion with pyproject.toml & install.rst minversion = "7.3.2" diff --git a/scripts/tests/data/deps_minimum.toml b/scripts/tests/data/deps_minimum.toml index ca1dc0c961c42..ed7b9affe9a50 100644 --- a/scripts/tests/data/deps_minimum.toml +++ b/scripts/tests/data/deps_minimum.toml @@ -231,104 +231,6 @@ exclude = [ "env", ] -[tool.pylint.messages_control] -max-line-length = 88 -disable = [ - # intentionally turned off - "broad-except", - "c-extension-no-member", - "comparison-with-itself", - "import-error", - "import-outside-toplevel", - "invalid-name", - "invalid-unary-operand-type", - "line-too-long", - "no-else-continue", - "no-else-raise", - "no-else-return", - "no-member", - "no-name-in-module", - "not-an-iterable", - "overridden-final-method", - "pointless-statement", - "redundant-keyword-arg", - "singleton-comparison", - "too-many-ancestors", - "too-many-arguments", - "too-many-boolean-expressions", - "too-many-branches", - "too-many-function-args", - "too-many-instance-attributes", - "too-many-locals", - "too-many-nested-blocks", - "too-many-public-methods", - "too-many-return-statements", - "too-many-statements", - "unexpected-keyword-arg", - "ungrouped-imports", - "unsubscriptable-object", - "unsupported-assignment-operation", - "unsupported-membership-test", - "unused-import", - "use-implicit-booleaness-not-comparison", - "use-implicit-booleaness-not-len", - "wrong-import-order", - "wrong-import-position", - - # misc - "abstract-class-instantiated", - "no-value-for-parameter", - "undefined-variable", - "unpacking-non-sequence", - - # pylint type "C": convention, for programming standard violation - "missing-class-docstring", - "missing-function-docstring", - "missing-module-docstring", - "too-many-lines", - "unidiomatic-typecheck", - "unnecessary-dunder-call", - "unnecessary-lambda-assignment", - - # pylint type "R": refactor, for bad code smell - "consider-using-with", - "cyclic-import", - "duplicate-code", - "inconsistent-return-statements", - "redefined-argument-from-local", - "too-few-public-methods", - - # pylint type "W": warning, for python specific problems - "abstract-method", - "arguments-differ", - "arguments-out-of-order", - "arguments-renamed", - "attribute-defined-outside-init", - "comparison-with-callable", - "dangerous-default-value", - "deprecated-module", - "eval-used", - "expression-not-assigned", - "fixme", - "global-statement", - "invalid-overridden-method", - "keyword-arg-before-vararg", - "possibly-unused-variable", - "protected-access", - "raise-missing-from", - "redefined-builtin", - "redefined-outer-name", - "self-cls-assignment", - "signature-differs", - "super-init-not-called", - "try-except-raise", - "unnecessary-lambda", - "unspecified-encoding", - "unused-argument", - "unused-variable", - "using-constant-test" -] - [tool.pytest.ini_options] # sync minversion with pyproject.toml & install.rst minversion = "7.0"