diff options
| -rw-r--r-- | .pre-commit-config.yaml | 11 | ||||
| -rw-r--r-- | astroid/brain/brain_multiprocessing.py | 1 | ||||
| -rw-r--r-- | astroid/brain/brain_numpy_ndarray.py | 1 | ||||
| -rw-r--r-- | astroid/brain/brain_pkg_resources.py | 2 | ||||
| -rw-r--r-- | astroid/brain/brain_ssl.py | 2 |
5 files changed, 11 insertions, 6 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a0d04193..521a8966 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,15 @@ repos: + - repo: https://github.com/myint/autoflake + rev: v1.4 + hooks: + - id: autoflake + exclude: tests/testdata|astroid/__init__.py + args: + - --in-place + - --remove-all-unused-imports + - --expand-star-imports + - --remove-duplicate-keys + - --remove-unused-variables - repo: https://github.com/asottile/pyupgrade rev: v2.12.0 hooks: diff --git a/astroid/brain/brain_multiprocessing.py b/astroid/brain/brain_multiprocessing.py index 1b83f24e..dcd7b3b9 100644 --- a/astroid/brain/brain_multiprocessing.py +++ b/astroid/brain/brain_multiprocessing.py @@ -7,7 +7,6 @@ # Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html # For details: https://github.com/PyCQA/astroid/blob/master/LICENSE -import sys import astroid from astroid import exceptions diff --git a/astroid/brain/brain_numpy_ndarray.py b/astroid/brain/brain_numpy_ndarray.py index b0a6e9d3..c404c27f 100644 --- a/astroid/brain/brain_numpy_ndarray.py +++ b/astroid/brain/brain_numpy_ndarray.py @@ -8,7 +8,6 @@ """Astroid hooks for numpy ndarray class.""" -import functools import astroid diff --git a/astroid/brain/brain_pkg_resources.py b/astroid/brain/brain_pkg_resources.py index 82b25725..c0d0cd84 100644 --- a/astroid/brain/brain_pkg_resources.py +++ b/astroid/brain/brain_pkg_resources.py @@ -5,9 +5,7 @@ # For details: https://github.com/PyCQA/astroid/blob/master/LICENSE -import astroid from astroid import parse -from astroid import inference_tip from astroid import register_module_extender from astroid import MANAGER diff --git a/astroid/brain/brain_ssl.py b/astroid/brain/brain_ssl.py index 9f86fa47..6c8fd3ee 100644 --- a/astroid/brain/brain_ssl.py +++ b/astroid/brain/brain_ssl.py @@ -10,8 +10,6 @@ """Astroid hooks for the ssl library.""" from astroid import MANAGER, register_module_extender -from astroid.builder import AstroidBuilder -from astroid import nodes from astroid import parse |
