Skip to content

Commit

Permalink
FIX: avoid links to frozendict API
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Dec 19, 2024
1 parent e32e78c commit df3efb1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
19 changes: 7 additions & 12 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from _extend_docstrings import extend_docstrings # noqa: PLC2701


def pick_newtype_attrs(some_type: type) -> list:
def __get_newtypes(some_type: type) -> list:
return [
attr
for attr in dir(some_type)
Expand Down Expand Up @@ -278,25 +278,20 @@ def pick_newtype_attrs(some_type: type) -> list:
nb_execution_show_tb = True
nb_execution_timeout = -1
nb_output_stderr = "remove"


nitpick_temp_names = [
*pick_newtype_attrs(EdgeQuantumNumbers),
*pick_newtype_attrs(NodeQuantumNumbers),
]
nitpick_temp_patterns = [
(r"py:(class|obj)", r"qrules\.quantum_numbers\." + name)
for name in nitpick_temp_names
]
nitpick_ignore_regex = [
(r"py:(class|obj)", "json.encoder.JSONEncoder"),
(r"py:(class|obj)", r"frozendict(\.frozendict)?"),
(r"py:(class|obj)", r"qrules\.topology\.EdgeType"),
(r"py:(class|obj)", r"qrules\.topology\.KT"),
(r"py:(class|obj)", r"qrules\.topology\.NewEdgeType"),
(r"py:(class|obj)", r"qrules\.topology\.NewNodeType"),
(r"py:(class|obj)", r"qrules\.topology\.NodeType"),
(r"py:(class|obj)", r"qrules\.topology\.VT"),
*nitpick_temp_patterns,
*[
(r"py:(class|obj)", r"qrules\.quantum_numbers\." + name)
for name in __get_newtypes(EdgeQuantumNumbers)
+ __get_newtypes(NodeQuantumNumbers)
],
]
nitpicky = True
primary_domain = "py"
Expand Down
2 changes: 1 addition & 1 deletion src/qrules/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __lt__(self, other: Any) -> bool: ...

@total_ordering
class FrozenDict(frozendict, Generic[KT, VT]):
"""A sortable version of `frozendict <https://pypi.org/project/frozendict>_`."""
"""A sortable version of :code:`frozendict`."""

def _repr_pretty_(self, p: PrettyPrinter, cycle: bool) -> None:
class_name = type(self).__name__
Expand Down

0 comments on commit df3efb1

Please sign in to comment.