Skip to content

Commit

Permalink
feat: combine as imports
Browse files Browse the repository at this point in the history
Signed-off-by: nstarman <[email protected]>
  • Loading branch information
nstarman committed Nov 18, 2024
1 parent 463acd9 commit 7ee2ec0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 deletions.
16 changes: 10 additions & 6 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@

import pytest
from sybil import Sybil
from sybil.parsers.myst import DocTestDirectiveParser as MarkdownDocTestParser
from sybil.parsers.myst import PythonCodeBlockParser as MarkdownPythonCodeBlockParser
from sybil.parsers.myst import SkipParser as MarkdownSkipParser
from sybil.parsers.rest import DocTestParser as ReSTDocTestParser
from sybil.parsers.rest import PythonCodeBlockParser as ReSTPythonCodeBlockParser
from sybil.parsers.rest import SkipParser as ReSTSkipParser
from sybil.parsers.myst import (
DocTestDirectiveParser as MarkdownDocTestParser,
PythonCodeBlockParser as MarkdownPythonCodeBlockParser,
SkipParser as MarkdownSkipParser,
)
from sybil.parsers.rest import (
DocTestParser as ReSTDocTestParser,
PythonCodeBlockParser as ReSTPythonCodeBlockParser,
SkipParser as ReSTSkipParser,
)

OPTIONS = ELLIPSIS | NORMALIZE_WHITESPACE

Expand Down
9 changes: 5 additions & 4 deletions plum/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
from functools import partial
from typing import Dict, List, Tuple, Union # noqa: F401

from beartype import BeartypeConf as _BeartypeConf
from beartype import BeartypeStrategy as _BeartypeStrategy
from beartype.door import TypeHint as _TypeHint
from beartype.door import is_bearable as _is_bearable
from beartype import (
BeartypeConf as _BeartypeConf,
BeartypeStrategy as _BeartypeStrategy,
)
from beartype.door import TypeHint as _TypeHint, is_bearable as _is_bearable

from ._version import __version__ # noqa: F401
from .alias import * # noqa: F401, F403
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ select = [
ignore = ["F811", "B018"]

[tool.ruff.lint.isort]
combine-as-imports = true
known-first-party = ["beartype"]
known-local-folder = ["plum"]

Expand Down
3 changes: 1 addition & 2 deletions tests/test_autoreload.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import pytest

from plum import Dispatcher
from plum import autoreload as ar
from plum import Dispatcher, autoreload as ar
from plum.function import NotFoundLookupError


Expand Down
6 changes: 2 additions & 4 deletions tests/test_signature.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import inspect
import operator
from numbers import Number as Num
from numbers import Real as Re
from numbers import Number as Num, Real as Re
from typing import Any, Tuple

import pytest

from plum.dispatcher import Dispatcher
from plum.resolver import AmbiguousLookupError
from plum.signature import Signature as Sig
from plum.signature import append_default_args, inspect_signature
from plum.signature import Signature as Sig, append_default_args, inspect_signature
from plum.util import Missing


Expand Down

0 comments on commit 7ee2ec0

Please sign in to comment.