Skip to content

Commit 384cdfb

Browse files
authored
feat: combine as imports (#197)
Signed-off-by: nstarman <[email protected]>
1 parent 463acd9 commit 384cdfb

File tree

5 files changed

+19
-16
lines changed

5 files changed

+19
-16
lines changed

conftest.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@
44

55
import pytest
66
from sybil import Sybil
7-
from sybil.parsers.myst import DocTestDirectiveParser as MarkdownDocTestParser
8-
from sybil.parsers.myst import PythonCodeBlockParser as MarkdownPythonCodeBlockParser
9-
from sybil.parsers.myst import SkipParser as MarkdownSkipParser
10-
from sybil.parsers.rest import DocTestParser as ReSTDocTestParser
11-
from sybil.parsers.rest import PythonCodeBlockParser as ReSTPythonCodeBlockParser
12-
from sybil.parsers.rest import SkipParser as ReSTSkipParser
7+
from sybil.parsers.myst import (
8+
DocTestDirectiveParser as MarkdownDocTestParser,
9+
PythonCodeBlockParser as MarkdownPythonCodeBlockParser,
10+
SkipParser as MarkdownSkipParser,
11+
)
12+
from sybil.parsers.rest import (
13+
DocTestParser as ReSTDocTestParser,
14+
PythonCodeBlockParser as ReSTPythonCodeBlockParser,
15+
SkipParser as ReSTSkipParser,
16+
)
1317

1418
OPTIONS = ELLIPSIS | NORMALIZE_WHITESPACE
1519

plum/__init__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
from functools import partial
55
from typing import Dict, List, Tuple, Union # noqa: F401
66

7-
from beartype import BeartypeConf as _BeartypeConf
8-
from beartype import BeartypeStrategy as _BeartypeStrategy
9-
from beartype.door import TypeHint as _TypeHint
10-
from beartype.door import is_bearable as _is_bearable
7+
from beartype import (
8+
BeartypeConf as _BeartypeConf,
9+
BeartypeStrategy as _BeartypeStrategy,
10+
)
11+
from beartype.door import TypeHint as _TypeHint, is_bearable as _is_bearable
1112

1213
from ._version import __version__ # noqa: F401
1314
from .alias import * # noqa: F401, F403

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ select = [
8989
ignore = ["F811", "B018"]
9090

9191
[tool.ruff.lint.isort]
92+
combine-as-imports = true
9293
known-first-party = ["beartype"]
9394
known-local-folder = ["plum"]
9495

tests/test_autoreload.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import pytest
22

3-
from plum import Dispatcher
4-
from plum import autoreload as ar
3+
from plum import Dispatcher, autoreload as ar
54
from plum.function import NotFoundLookupError
65

76

tests/test_signature.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import inspect
22
import operator
3-
from numbers import Number as Num
4-
from numbers import Real as Re
3+
from numbers import Number as Num, Real as Re
54
from typing import Any, Tuple
65

76
import pytest
87

98
from plum.dispatcher import Dispatcher
109
from plum.resolver import AmbiguousLookupError
11-
from plum.signature import Signature as Sig
12-
from plum.signature import append_default_args, inspect_signature
10+
from plum.signature import Signature as Sig, append_default_args, inspect_signature
1311
from plum.util import Missing
1412

1513

0 commit comments

Comments
 (0)