Skip to content

Commit be1c547

Browse files
committed
Fix typos
1 parent ceb3b2a commit be1c547

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

sphinx/ext/autodoc/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2540,7 +2540,7 @@ def is_uninitialized_instance_attribute(self, parent: Any) -> bool:
25402540
return self.objpath[-1] in annotations
25412541

25422542
def import_object(self, raiseerror: bool = False) -> bool:
2543-
"""Check the exisitence of uninitialized instance attribute when failed to import
2543+
"""Check the existence of uninitialized instance attribute when failed to import
25442544
the attribute.
25452545
"""
25462546
try:
@@ -2761,7 +2761,7 @@ def can_document_member(
27612761
return False
27622762

27632763
def import_object(self, raiseerror: bool = False) -> bool:
2764-
"""Check the exisitence of uninitialized instance attribute when failed to import
2764+
"""Check the existence of uninitialized instance attribute when failed to import
27652765
the attribute.
27662766
"""
27672767
ret = super().import_object(raiseerror)
@@ -2834,7 +2834,7 @@ def _get_property_getter(self) -> Callable | None:
28342834

28352835
def autodoc_attrgetter(app: Sphinx, obj: Any, name: str, *defargs: Any) -> Any:
28362836
"""Alternative getattr() for types"""
2837-
for typ, func in app.registry.autodoc_attrgettrs.items():
2837+
for typ, func in app.registry.autodoc_attrgetter.items():
28382838
if isinstance(obj, typ):
28392839
return func(obj, name, *defargs)
28402840

sphinx/registry.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
class SphinxComponentRegistry:
6060
def __init__(self) -> None:
6161
#: special attrgetter for autodoc; class object -> attrgetter
62-
self.autodoc_attrgettrs: dict[type, Callable[[Any, str, Any], Any]] = {}
62+
self.autodoc_attrgetters: dict[type, Callable[[Any, str, Any], Any]] = {}
6363

6464
#: builders; a dict of builder name -> builder class
6565
self.builders: dict[str, type[Builder]] = {}
@@ -117,7 +117,7 @@ def __init__(self) -> None:
117117
#: post transforms; list of transforms
118118
self.post_transforms: list[type[Transform]] = []
119119

120-
#: source paresrs; file type -> parser class
120+
#: source parsers; file type -> parser class
121121
self.source_parsers: dict[str, type[Parser]] = {}
122122

123123
#: source suffix: suffix -> file type
@@ -381,7 +381,7 @@ def add_documenter(self, objtype: str, documenter: type[Documenter]) -> None:
381381

382382
def add_autodoc_attrgetter(self, typ: type,
383383
attrgetter: Callable[[Any, str, Any], Any]) -> None:
384-
self.autodoc_attrgettrs[typ] = attrgetter
384+
self.autodoc_attrgetters[typ] = attrgetter
385385

386386
def add_css_files(self, filename: str, **attributes: Any) -> None:
387387
self.css_files.append((filename, attributes))

0 commit comments

Comments
 (0)