Skip to content

Commit

Permalink
Remove pylint disables and resolves TODO in pylintrc (#2175)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls authored May 12, 2023
1 parent 2cd9e90 commit e1b577a
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion astroid/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ def inner(
except StopIteration as error:
# generator is empty
if error.args:
# pylint: disable=not-a-mapping
raise InferenceError(**error.args[0]) from error
raise InferenceError(
"StopIteration raised without any error information."
Expand Down
1 change: 0 additions & 1 deletion astroid/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ def zip_import_data(self, filepath: str) -> nodes.Module | None:
except ValueError:
continue
try:
# pylint: disable-next=no-member
importer = zipimport.zipimporter(eggpath + ext)
zmodname = resource.replace(os.path.sep, ".")
if importer.is_package(resource):
Expand Down
1 change: 0 additions & 1 deletion astroid/nodes/scoped_nodes/scoped_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1751,7 +1751,6 @@ def get_wrapping_class(node):
return klass


# pylint: disable=too-many-instance-attributes
class ClassDef(
_base_nodes.FilterStmtsBaseNode, LocalsDictNodeNG, _base_nodes.Statement
):
Expand Down
3 changes: 1 addition & 2 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,7 @@ mixin-class-rgx=.*Mix[Ii]n
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E0201 when accessed. Python regular
# expressions are accepted.
# TODO: Remove ast.Match pattern once https://github.com/pylint-dev/pylint/issues/6594 is fixed
generated-members=REQUEST,acl_users,aq_parent,argparse.Namespace,ast\.([mM]atch.*|pattern)
generated-members=REQUEST,acl_users,aq_parent,argparse.Namespace


[VARIABLES]
Expand Down
2 changes: 1 addition & 1 deletion tests/brain/test_typing_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from astroid import builder, nodes

try:
import typing_extensions # pylint: disable=unused-import
import typing_extensions

HAS_TYPING_EXTENSIONS = True
HAS_TYPING_EXTENSIONS_TYPEVAR = hasattr(typing_extensions, "TypeVar")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_modutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from . import resources

try:
import urllib3 # type: ignore[import] # pylint: disable=unused-import
import urllib3 # type: ignore[import]

HAS_URLLIB3_V1 = urllib3.__version__.startswith("1")
except ImportError:
Expand Down

0 comments on commit e1b577a

Please sign in to comment.