Skip to content

Commit db17631

Browse files
authored
Merge pull request #408 from nicoddemus/isort-config
Fix ruff isort configuration
2 parents e43ab19 + 1662868 commit db17631

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
exclude: '^($|.*\.bin)'
22
repos:
3-
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v4.5.0
5-
hooks:
6-
- id: trailing-whitespace
7-
- id: end-of-file-fixer
83
- repo: local
94
hooks:
105
- id: rst
@@ -17,7 +12,7 @@ repos:
1712
rev: v0.1.14
1813
hooks:
1914
- id: ruff
20-
args: [ --fix ]
15+
args: ["--fix"]
2116
- id: ruff-format
2217
- repo: https://github.com/pre-commit/mirrors-mypy
2318
rev: v1.8.0

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,9 @@ requires = [
55
]
66
build-backend = "setuptools.build_meta"
77

8-
[tool.ruff]
8+
[tool.ruff.lint]
9+
extend-select = ["I001"]
10+
11+
[tool.ruff.lint.isort]
12+
force-single-line = true
13+
known-third-party = ["src"]

src/pytest_mock/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
from pytest_mock.plugin import MockerFixture
2+
from pytest_mock.plugin import PytestMockWarning
13
from pytest_mock.plugin import class_mocker
24
from pytest_mock.plugin import mocker
3-
from pytest_mock.plugin import MockerFixture
45
from pytest_mock.plugin import module_mocker
56
from pytest_mock.plugin import package_mocker
67
from pytest_mock.plugin import pytest_addoption
78
from pytest_mock.plugin import pytest_configure
8-
from pytest_mock.plugin import PytestMockWarning
99
from pytest_mock.plugin import session_mocker
1010

1111
MockFixture = MockerFixture # backward-compatibility only (#204)

src/pytest_mock/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
import warnings
88
from typing import Any
99
from typing import Callable
10-
from typing import cast
1110
from typing import Dict
1211
from typing import Generator
1312
from typing import Iterable
1413
from typing import List
1514
from typing import Mapping
1615
from typing import Optional
17-
from typing import overload
1816
from typing import Tuple
1917
from typing import Type
2018
from typing import TypeVar
2119
from typing import Union
20+
from typing import cast
21+
from typing import overload
2222

2323
import pytest
2424

tests/test_pytest_mock.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from unittest.mock import MagicMock
1313

1414
import pytest
15-
1615
from pytest_mock import MockerFixture
1716
from pytest_mock import PytestMockWarning
1817

0 commit comments

Comments
 (0)