Skip to content

Commit

Permalink
Merge pull request #408 from nicoddemus/isort-config
Browse files Browse the repository at this point in the history
Fix ruff isort configuration
  • Loading branch information
nicoddemus committed Jan 31, 2024
2 parents e43ab19 + 1662868 commit db17631
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
7 changes: 1 addition & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
exclude: '^($|.*\.bin)'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: local
hooks:
- id: rst
Expand All @@ -17,7 +12,7 @@ repos:
rev: v0.1.14
hooks:
- id: ruff
args: [ --fix ]
args: ["--fix"]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
Expand Down
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@ requires = [
]
build-backend = "setuptools.build_meta"

[tool.ruff]
[tool.ruff.lint]
extend-select = ["I001"]

[tool.ruff.lint.isort]
force-single-line = true
known-third-party = ["src"]
4 changes: 2 additions & 2 deletions src/pytest_mock/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from pytest_mock.plugin import MockerFixture
from pytest_mock.plugin import PytestMockWarning
from pytest_mock.plugin import class_mocker
from pytest_mock.plugin import mocker
from pytest_mock.plugin import MockerFixture
from pytest_mock.plugin import module_mocker
from pytest_mock.plugin import package_mocker
from pytest_mock.plugin import pytest_addoption
from pytest_mock.plugin import pytest_configure
from pytest_mock.plugin import PytestMockWarning
from pytest_mock.plugin import session_mocker

MockFixture = MockerFixture # backward-compatibility only (#204)
Expand Down
4 changes: 2 additions & 2 deletions src/pytest_mock/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
import warnings
from typing import Any
from typing import Callable
from typing import cast
from typing import Dict
from typing import Generator
from typing import Iterable
from typing import List
from typing import Mapping
from typing import Optional
from typing import overload
from typing import Tuple
from typing import Type
from typing import TypeVar
from typing import Union
from typing import cast
from typing import overload

import pytest

Expand Down
1 change: 0 additions & 1 deletion tests/test_pytest_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from unittest.mock import MagicMock

import pytest

from pytest_mock import MockerFixture
from pytest_mock import PytestMockWarning

Expand Down

0 comments on commit db17631

Please sign in to comment.