Skip to content

Commit e1b577a

Browse files
Remove pylint disables and resolves TODO in pylintrc (#2175)
1 parent 2cd9e90 commit e1b577a

File tree

6 files changed

+3
-7
lines changed

6 files changed

+3
-7
lines changed

astroid/decorators.py

-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ def inner(
9191
except StopIteration as error:
9292
# generator is empty
9393
if error.args:
94-
# pylint: disable=not-a-mapping
9594
raise InferenceError(**error.args[0]) from error
9695
raise InferenceError(
9796
"StopIteration raised without any error information."

astroid/manager.py

-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ def zip_import_data(self, filepath: str) -> nodes.Module | None:
262262
except ValueError:
263263
continue
264264
try:
265-
# pylint: disable-next=no-member
266265
importer = zipimport.zipimporter(eggpath + ext)
267266
zmodname = resource.replace(os.path.sep, ".")
268267
if importer.is_package(resource):

astroid/nodes/scoped_nodes/scoped_nodes.py

-1
Original file line numberDiff line numberDiff line change
@@ -1751,7 +1751,6 @@ def get_wrapping_class(node):
17511751
return klass
17521752

17531753

1754-
# pylint: disable=too-many-instance-attributes
17551754
class ClassDef(
17561755
_base_nodes.FilterStmtsBaseNode, LocalsDictNodeNG, _base_nodes.Statement
17571756
):

pylintrc

+1-2
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,7 @@ mixin-class-rgx=.*Mix[Ii]n
259259
# List of members which are set dynamically and missed by pylint inference
260260
# system, and so shouldn't trigger E0201 when accessed. Python regular
261261
# expressions are accepted.
262-
# TODO: Remove ast.Match pattern once https://github.com/pylint-dev/pylint/issues/6594 is fixed
263-
generated-members=REQUEST,acl_users,aq_parent,argparse.Namespace,ast\.([mM]atch.*|pattern)
262+
generated-members=REQUEST,acl_users,aq_parent,argparse.Namespace
264263

265264

266265
[VARIABLES]

tests/brain/test_typing_extensions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from astroid import builder, nodes
1010

1111
try:
12-
import typing_extensions # pylint: disable=unused-import
12+
import typing_extensions
1313

1414
HAS_TYPING_EXTENSIONS = True
1515
HAS_TYPING_EXTENSIONS_TYPEVAR = hasattr(typing_extensions, "TypeVar")

tests/test_modutils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from . import resources
2727

2828
try:
29-
import urllib3 # type: ignore[import] # pylint: disable=unused-import
29+
import urllib3 # type: ignore[import]
3030

3131
HAS_URLLIB3_V1 = urllib3.__version__.startswith("1")
3232
except ImportError:

0 commit comments

Comments
 (0)