Skip to content

Commit

Permalink
chore: Clean up imports
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Aug 16, 2024
1 parent aad7c86 commit d0ab96a
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docs/guide/users/how-to/parse-docstrings.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Then you can build a `Docstring` instance and call its `parse` method,
choosing the parsing-style to use:

```python
from griffe.dataclasses import Docstring
from griffe import Docstring

text = "Hello I'm a docstring!"
docstring = Docstring(text, lineno=1)
Expand All @@ -19,7 +19,7 @@ annotations from the object from which the docstring originates,
you can manually create the parent objects and link them to the docstring:

```python
from griffe.dataclasses import Docstring, Function, Parameters, Parameter, ParameterKind
from griffe import Docstring, Function, Parameters, Parameter, ParameterKind

function = Function(
"func",
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/users/navigating.md
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ You can write some code below and print annotations or attribute values with [Ri
[rich]: https://rich.readthedocs.io/en/stable/

```pyodide install="griffe,rich" theme="tomorrow,dracula"
from griffe.tests import temporary_visited_module
from griffe import temporary_visited_module
from rich.pretty import pprint

code = """
Expand Down
2 changes: 1 addition & 1 deletion duties.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ def fuzz(
from pysource_codegen import generate
from pysource_minimize import minimize

from griffe.agents.visitor import visit
from griffe import visit

warnings.simplefilter("ignore", SyntaxWarning)

Expand Down
3 changes: 1 addition & 2 deletions tests/test_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
if TYPE_CHECKING:
import ast

from griffe.agents.nodes import ObjectNode
from griffe.dataclasses import Attribute, Class, Function, Module, Object
from griffe import ObjectNode, Attribute, Class, Function, Module, Object


class ExtensionTest(Extension): # noqa: D101
Expand Down
2 changes: 1 addition & 1 deletion tests/test_inheritance.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from griffe import ModulesCollection, temporary_inspected_module, temporary_visited_module

if TYPE_CHECKING:
from griffe.dataclasses import Class
from griffe import Class


def _mro_paths(cls: Class) -> list[str]:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
if TYPE_CHECKING:
from pathlib import Path

from griffe.dataclasses import Alias
from griffe import Alias


def test_has_docstrings_does_not_try_to_resolve_alias() -> None:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_stdlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from griffe import GriffeLoader, LoadingError

if TYPE_CHECKING:
from griffe.dataclasses import Alias, Object
from griffe import Alias, Object


def _access_inherited_members(obj: Object | Alias) -> None:
Expand Down

0 comments on commit d0ab96a

Please sign in to comment.