Skip to content

Commit

Permalink
Add: move module level import to top of the file once again
Browse files Browse the repository at this point in the history
  • Loading branch information
Balou9 authored and greenbonebot committed Jul 31, 2024
1 parent 339496b commit 722e7dc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
9 changes: 5 additions & 4 deletions autohooks/plugins/isort/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,23 @@

import os
import tempfile
from .isort import precommit as precommit
from contextlib import contextmanager
from pathlib import Path
from typing import (
# Any,
AsyncIterator,
# Awaitable,
Generator,
# Iterable,
# Optional,
# Union,
)

# Iterable,
# Optional,
# Union,
from pontos.git._git import exec_git
from pontos.helper import add_sys_path, ensure_unload_module, unload_module

from .isort import precommit as precommit

__all__ = (
"AsyncIteratorMock",
"add_sys_path",
Expand Down
2 changes: 1 addition & 1 deletion autohooks/plugins/isort/isort.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import subprocess
from typing import Iterable, List, Union, Optional
from typing import Iterable, List, Optional, Union

from autohooks.api import error, ok
from autohooks.api.git import (
Expand Down
5 changes: 3 additions & 2 deletions tests/isort_test.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# pylint: disable-all
from io import StringIO, BytesIO, FileIO # pylint: disable=unused-import
import subprocess # pylint: disable=
import sys
from io import BytesIO, FileIO, StringIO # pylint: disable=unused-import

import black

import autohooks

cmd = ["pylint", "autohooks/plugins/pylint/pylint.py"]
import subprocess # pylint: disable=

# status = subprocess.call(cmd)
iofile = "tmp.txt"
Expand Down
4 changes: 1 addition & 3 deletions tests/test_isort.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import sys

from pathlib import Path
from unittest import TestCase
from unittest.mock import patch

from autohooks.config import load_config_from_pyproject_toml
from autohooks.api.git import StatusEntry

from autohooks.config import load_config_from_pyproject_toml
from autohooks.plugins.isort.isort import (
DEFAULT_ARGUMENTS,
DEFAULT_INCLUDE,
Expand Down

0 comments on commit 722e7dc

Please sign in to comment.