Skip to content

Commit 304d744

Browse files
author
Christian Knittl-Frank
committed
Fix typos
1 parent 7e4be3f commit 304d744

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/sphinxcontrib/scm/directives.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class ContribsDirective(SphinxDirective, Helper):
2727

2828
def run(self) -> list[Node]:
2929
"""Directive to list all SCM contributors"""
30-
contributors = self.get_contibutors()
30+
contributors = self.get_contributors()
3131
contributors_str = (
3232
",\n ".join(contributors)
3333
if contributors

src/sphinxcontrib/scm/roles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class ContribsRole(SphinxRole, Helper):
1616
def run(self) -> tuple[list[Node], list[system_message]]:
1717
"""Role to list all SCM contributors"""
18-
contributors = self.get_contibutors()
18+
contributors = self.get_contributors()
1919
contributors_str = (
2020
", ".join(contributors) if contributors else "<no SCM contributors found>"
2121
)

src/sphinxcontrib/scm/util.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def get_source_info(self, lineno: int | None = None) -> tuple[str, int]:
2121
def config(self) -> Config:
2222
raise NotImplementedError
2323

24-
def get_contibutors(self) -> list[str]:
24+
def get_contributors(self) -> list[str]:
2525
"""Return list of Git contributors for given path using `git shortlog`
2626
2727
:path: Path of which to get contributors
@@ -30,9 +30,9 @@ def get_contibutors(self) -> list[str]:
3030
docfile_path = Path(self.get_source_info()[0]).resolve()
3131
docfile_name = docfile_path.name
3232
docdir_path = docfile_path.parent
33-
min_commits = self.optn_over_conf("min_commits", "scm_contribs_min_commits")
33+
min_commits = self.option_over_conf("min_commits", "scm_contribs_min_commits")
3434

35-
limit_authors = self.optn_over_conf(
35+
limit_authors = self.option_over_conf(
3636
"limit_authors", "scm_contribs_limit_authors"
3737
)
3838
if limit_authors is not None and limit_authors < 1:
@@ -44,19 +44,19 @@ def get_contibutors(self) -> list[str]:
4444
flags: list[str] = []
4545

4646
contribs_email = directives.choice(
47-
self.optn_over_conf("email", "scm_contribs_email"),
47+
self.option_over_conf("email", "scm_contribs_email"),
4848
("true", "false"),
4949
)
5050
flags += ["-e"] if contribs_email == "true" else []
5151

5252
contribs_sort = directives.choice(
53-
self.optn_over_conf("sort", "scm_contribs_sort"),
53+
self.option_over_conf("sort", "scm_contribs_sort"),
5454
("name", "num"),
5555
)
5656
flags += ["-n"] if contribs_sort == "num" else []
5757

5858
contribs_type = directives.choice(
59-
self.optn_over_conf("type", "scm_contribs_type"),
59+
self.option_over_conf("type", "scm_contribs_type"),
6060
("author", "committer"),
6161
)
6262
flags += ["-c"] if contribs_type == "committer" else []
@@ -76,7 +76,7 @@ def get_contibutors(self) -> list[str]:
7676

7777
return contributors[:limit_authors]
7878

79-
def optn_over_conf(self, option_name: str, config_value: str) -> Any:
79+
def option_over_conf(self, option_name: str, config_value: str) -> Any:
8080
"""Return option if option is set, else return config value"""
8181
# logger.debug("Option '%s': '%s'", option_name, self.options.get(option_name))
8282
# logger.debug("Config '%s': '%s'", config_value, self.config[config_value])

0 commit comments

Comments
 (0)