diff options
author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2023-04-03 19:51:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-03 19:51:18 +0200 |
commit | c46d7e0f56105e8db67bf54888531f32120a070c (patch) | |
tree | 3098a8e0a8912a88742db9c446f1482c04af1170 | |
parent | 779c3e0eecab5413f92a4022b7c98dd6eefbef9f (diff) | |
download | astroid-git-c46d7e0f56105e8db67bf54888531f32120a070c.tar.gz |
Don't add typing stubs for packages that we only use in tests (#2080)
-rw-r--r-- | .pre-commit-config.yaml | 9 | ||||
-rw-r--r-- | requirements_test.txt | 1 | ||||
-rw-r--r-- | requirements_test_brain.txt | 3 | ||||
-rw-r--r-- | tests/brain/test_attr.py | 2 | ||||
-rw-r--r-- | tests/brain/test_dateutil.py | 2 | ||||
-rw-r--r-- | tests/brain/test_regex.py | 2 | ||||
-rw-r--r-- | tests/brain/test_six.py | 2 | ||||
-rw-r--r-- | tests/test_inference.py | 2 | ||||
-rw-r--r-- | tests/test_modutils.py | 2 | ||||
-rw-r--r-- | tests/test_object_model.py | 2 | ||||
-rw-r--r-- | tests/test_scoped_nodes.py | 2 |
11 files changed, 9 insertions, 20 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 28a2d845..7d17d7b3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -63,14 +63,7 @@ repos: types: [python] args: [] require_serial: true - additional_dependencies: - [ - "types-pkg_resources==0.1.3", - "types-six", - "types-attrs", - "types-python-dateutil", - "types-typed-ast", - ] + additional_dependencies: ["types-typed-ast"] exclude: tests/testdata| # exclude everything, we're not ready - repo: https://github.com/pre-commit/mirrors-prettier rev: v3.0.0-alpha.6 diff --git a/requirements_test.txt b/requirements_test.txt index 6e329149..b13c5357 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -3,4 +3,3 @@ contributors-txt>=0.7.4 tbump~=6.9.0 types-typed-ast; implementation_name=="cpython" and python_version<"3.8" -types-pkg_resources==0.1.3 diff --git a/requirements_test_brain.txt b/requirements_test_brain.txt index b4778bae..5287772e 100644 --- a/requirements_test_brain.txt +++ b/requirements_test_brain.txt @@ -1,12 +1,9 @@ attrs -types-attrs nose numpy>=1.17.0; python_version<"3.11" python-dateutil PyQt6 regex -types-python-dateutil six -types-six urllib3 typing_extensions>=4.4.0 diff --git a/tests/brain/test_attr.py b/tests/brain/test_attr.py index d1ebb920..88d78c7a 100644 --- a/tests/brain/test_attr.py +++ b/tests/brain/test_attr.py @@ -10,7 +10,7 @@ import astroid from astroid import nodes try: - import attr as attr_module # pylint: disable=unused-import + import attr # type: ignore[import] # pylint: disable=unused-import HAS_ATTR = True except ImportError: diff --git a/tests/brain/test_dateutil.py b/tests/brain/test_dateutil.py index 3e6c72e1..a31128f3 100644 --- a/tests/brain/test_dateutil.py +++ b/tests/brain/test_dateutil.py @@ -9,7 +9,7 @@ import unittest from astroid import builder try: - import dateutil # pylint: disable=unused-import + import dateutil # type: ignore[import] # pylint: disable=unused-import HAS_DATEUTIL = True except ImportError: diff --git a/tests/brain/test_regex.py b/tests/brain/test_regex.py index ab83ad17..c3e0bbe7 100644 --- a/tests/brain/test_regex.py +++ b/tests/brain/test_regex.py @@ -3,7 +3,7 @@ # Copyright (c) https://github.com/pylint-dev/astroid/blob/main/CONTRIBUTORS.txt try: - import regex + import regex # type: ignore[import] HAS_REGEX = True except ImportError: diff --git a/tests/brain/test_six.py b/tests/brain/test_six.py index e924ff1c..c7c9db76 100644 --- a/tests/brain/test_six.py +++ b/tests/brain/test_six.py @@ -12,7 +12,7 @@ from astroid import MANAGER, builder, nodes from astroid.nodes.scoped_nodes import ClassDef try: - import six # pylint: disable=unused-import + import six # type: ignore[import] # pylint: disable=unused-import HAS_SIX = True except ImportError: diff --git a/tests/test_inference.py b/tests/test_inference.py index a8262ce2..84017ea1 100644 --- a/tests/test_inference.py +++ b/tests/test_inference.py @@ -36,7 +36,7 @@ from astroid.objects import ExceptionInstance from . import resources try: - import six # pylint: disable=unused-import + import six # type: ignore[import] # pylint: disable=unused-import HAS_SIX = True except ImportError: diff --git a/tests/test_modutils.py b/tests/test_modutils.py index c22da534..be99bdb1 100644 --- a/tests/test_modutils.py +++ b/tests/test_modutils.py @@ -26,7 +26,7 @@ from astroid.interpreter._import import spec from . import resources try: - import urllib3 # pylint: disable=unused-import + import urllib3 # type: ignore[import] # pylint: disable=unused-import HAS_URLLIB3 = True except ImportError: diff --git a/tests/test_object_model.py b/tests/test_object_model.py index 56f1348d..81c6ba5c 100644 --- a/tests/test_object_model.py +++ b/tests/test_object_model.py @@ -13,7 +13,7 @@ from astroid.const import PY311_PLUS from astroid.exceptions import InferenceError try: - import six # pylint: disable=unused-import + import six # type: ignore[import] # pylint: disable=unused-import HAS_SIX = True except ImportError: diff --git a/tests/test_scoped_nodes.py b/tests/test_scoped_nodes.py index 15906f58..63fe0af7 100644 --- a/tests/test_scoped_nodes.py +++ b/tests/test_scoped_nodes.py @@ -47,7 +47,7 @@ from astroid.nodes.scoped_nodes.scoped_nodes import _is_metaclass from . import resources try: - import six # pylint: disable=unused-import + import six # type: ignore[import] # pylint: disable=unused-import HAS_SIX = True except ImportError: |