-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Add all previous modules for backward compatibility
- Loading branch information
Showing
34 changed files
with
617 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"""Deprecated. Import from `griffe` directly.""" | ||
|
||
from __future__ import annotations | ||
|
||
import warnings | ||
from typing import Any | ||
|
||
import griffe | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
warnings.warn( | ||
"Importing from `griffe.agents` is deprecated. Import from `griffe` directly instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return getattr(griffe, name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"""Deprecated. Import from `griffe` directly.""" | ||
|
||
from __future__ import annotations | ||
|
||
import warnings | ||
from typing import Any | ||
|
||
import griffe | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
warnings.warn( | ||
"Importing from `griffe.agents.inspector` is deprecated. Import from `griffe` directly instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return getattr(griffe, name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"""Deprecated. Import from `griffe` directly.""" | ||
|
||
from __future__ import annotations | ||
|
||
import warnings | ||
from typing import Any | ||
|
||
import griffe | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
warnings.warn( | ||
"Importing from `griffe.agents.nodes` is deprecated. Import from `griffe` directly instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
if name == "Name": | ||
warnings.warn( | ||
"The `Name` class was renamed `ExportedName`.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return griffe.ExportedName | ||
return getattr(griffe, name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"""Deprecated. Import from `griffe` directly.""" | ||
|
||
from __future__ import annotations | ||
|
||
import warnings | ||
from typing import Any | ||
|
||
import griffe | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
warnings.warn( | ||
"Importing from `griffe.agents.visitor` is deprecated. Import from `griffe` directly instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return getattr(griffe, name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"""Deprecated. Import from `griffe` directly.""" | ||
|
||
from __future__ import annotations | ||
|
||
import warnings | ||
from typing import Any | ||
|
||
import griffe | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
warnings.warn( | ||
"Importing from `griffe.c3linear` is deprecated. Import from `griffe` directly instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return getattr(griffe, name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"""Deprecated. Import from `griffe` directly.""" | ||
|
||
from __future__ import annotations | ||
|
||
import warnings | ||
from typing import Any | ||
|
||
import griffe | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
warnings.warn( | ||
"Importing from `griffe.cli` is deprecated. Import from `griffe` directly instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return getattr(griffe, name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"""Deprecated. Import from `griffe` directly.""" | ||
|
||
from __future__ import annotations | ||
|
||
import warnings | ||
from typing import Any | ||
|
||
import griffe | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
warnings.warn( | ||
"Importing from `griffe.collections` is deprecated. Import from `griffe` directly instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return getattr(griffe, name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"""Deprecated. Import from `griffe` directly.""" | ||
|
||
from __future__ import annotations | ||
|
||
import warnings | ||
from typing import Any | ||
|
||
import griffe | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
warnings.warn( | ||
"Importing from `griffe.dataclasses` is deprecated. Import from `griffe` directly instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return getattr(griffe, name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"""Deprecated. Import from `griffe` directly.""" | ||
|
||
from __future__ import annotations | ||
|
||
import warnings | ||
from typing import Any | ||
|
||
import griffe | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
warnings.warn( | ||
"Importing from `griffe.diff` is deprecated. Import from `griffe` directly instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return getattr(griffe, name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"""Deprecated. Import from `griffe` directly.""" | ||
|
||
from __future__ import annotations | ||
|
||
import warnings | ||
from typing import Any | ||
|
||
import griffe | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
warnings.warn( | ||
"Importing from `griffe.docstrings` is deprecated. Import from `griffe` directly instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return getattr(griffe, name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"""Deprecated. Import from `griffe` directly.""" | ||
|
||
from __future__ import annotations | ||
|
||
import warnings | ||
from typing import Any | ||
|
||
import griffe | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
warnings.warn( | ||
"Importing from `griffe.docstrings.dataclasses` is deprecated. Import from `griffe` directly instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return getattr(griffe, name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"""Deprecated. Import from `griffe` directly.""" | ||
|
||
from __future__ import annotations | ||
|
||
import warnings | ||
from typing import Any | ||
|
||
import griffe | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
warnings.warn( | ||
"Importing from `griffe.docstrings.google` is deprecated. Import from `griffe` directly instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
if name == "parse": | ||
warnings.warn( | ||
"The 'parse' function was renamed 'parse_google'.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return griffe.parse_google | ||
return getattr(griffe, name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"""Deprecated. Import from `griffe` directly.""" | ||
|
||
from __future__ import annotations | ||
|
||
import warnings | ||
from typing import Any | ||
|
||
import griffe | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
warnings.warn( | ||
"Importing from `griffe.docstrings.numpy` is deprecated. Import from `griffe` directly instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
if name == "parse": | ||
warnings.warn( | ||
"The 'parse' function was renamed 'parse_numpy'.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return griffe.parse_numpy | ||
return getattr(griffe, name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"""Deprecated. Import from `griffe` directly.""" | ||
|
||
from __future__ import annotations | ||
|
||
import warnings | ||
from typing import Any | ||
|
||
import griffe | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
warnings.warn( | ||
"Importing from `griffe.docstrings.parsers` is deprecated. Import from `griffe` directly instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return getattr(griffe, name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"""Deprecated. Import from `griffe` directly.""" | ||
|
||
from __future__ import annotations | ||
|
||
import warnings | ||
from typing import Any | ||
|
||
import griffe | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
warnings.warn( | ||
"Importing from `griffe.docstrings.sphinx` is deprecated. Import from `griffe` directly instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
if name == "parse": | ||
warnings.warn( | ||
"The 'parse' function was renamed 'parse_sphinx'.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return griffe.parse_sphinx | ||
return getattr(griffe, name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
"""Deprecated. Import from `griffe` directly.""" | ||
|
||
from __future__ import annotations | ||
|
||
import warnings | ||
from typing import Any | ||
|
||
import griffe | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
warnings.warn( | ||
"Importing from `griffe.docstrings.utils` is deprecated. Import from `griffe` directly instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
if name == "WarningCallable": | ||
warnings.warn( | ||
"The 'WarningCallable' class was renamed 'DocstringWarningCallable'.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return griffe.DocstringWarningCallable | ||
if name == "warning": | ||
warnings.warn( | ||
"The 'warning' function was renamed 'docstring_warning'.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return griffe.docstring_warning | ||
if name == "parse_annotation": | ||
warnings.warn( | ||
"The 'parse_annotation' function was renamed 'parse_docstring_annotation'.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return griffe.parse_docstring_annotation | ||
return getattr(griffe, name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"""Deprecated. Import from `griffe` directly.""" | ||
|
||
from __future__ import annotations | ||
|
||
import warnings | ||
from typing import Any | ||
|
||
import griffe | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
warnings.warn( | ||
"Importing from `griffe.encoders` is deprecated. Import from `griffe` directly instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return getattr(griffe, name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"""Deprecated. Import from `griffe` directly.""" | ||
|
||
from __future__ import annotations | ||
|
||
import warnings | ||
from typing import Any | ||
|
||
import griffe | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
warnings.warn( | ||
"Importing from `griffe.enumerations` is deprecated. Import from `griffe` directly instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return getattr(griffe, name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"""Deprecated. Import from `griffe` directly.""" | ||
|
||
from __future__ import annotations | ||
|
||
import warnings | ||
from typing import Any | ||
|
||
import griffe | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
warnings.warn( | ||
"Importing from `griffe.exceptions` is deprecated. Import from `griffe` directly instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return getattr(griffe, name) |
Oops, something went wrong.