@@ -21,7 +21,7 @@ def get_source_info(self, lineno: int | None = None) -> tuple[str, int]:
21
21
def config (self ) -> Config :
22
22
raise NotImplementedError
23
23
24
- def get_contibutors (self ) -> list [str ]:
24
+ def get_contributors (self ) -> list [str ]:
25
25
"""Return list of Git contributors for given path using `git shortlog`
26
26
27
27
:path: Path of which to get contributors
@@ -30,9 +30,9 @@ def get_contibutors(self) -> list[str]:
30
30
docfile_path = Path (self .get_source_info ()[0 ]).resolve ()
31
31
docfile_name = docfile_path .name
32
32
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" )
34
34
35
- limit_authors = self .optn_over_conf (
35
+ limit_authors = self .option_over_conf (
36
36
"limit_authors" , "scm_contribs_limit_authors"
37
37
)
38
38
if limit_authors is not None and limit_authors < 1 :
@@ -44,19 +44,19 @@ def get_contibutors(self) -> list[str]:
44
44
flags : list [str ] = []
45
45
46
46
contribs_email = directives .choice (
47
- self .optn_over_conf ("email" , "scm_contribs_email" ),
47
+ self .option_over_conf ("email" , "scm_contribs_email" ),
48
48
("true" , "false" ),
49
49
)
50
50
flags += ["-e" ] if contribs_email == "true" else []
51
51
52
52
contribs_sort = directives .choice (
53
- self .optn_over_conf ("sort" , "scm_contribs_sort" ),
53
+ self .option_over_conf ("sort" , "scm_contribs_sort" ),
54
54
("name" , "num" ),
55
55
)
56
56
flags += ["-n" ] if contribs_sort == "num" else []
57
57
58
58
contribs_type = directives .choice (
59
- self .optn_over_conf ("type" , "scm_contribs_type" ),
59
+ self .option_over_conf ("type" , "scm_contribs_type" ),
60
60
("author" , "committer" ),
61
61
)
62
62
flags += ["-c" ] if contribs_type == "committer" else []
@@ -76,7 +76,7 @@ def get_contibutors(self) -> list[str]:
76
76
77
77
return contributors [:limit_authors ]
78
78
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 :
80
80
"""Return option if option is set, else return config value"""
81
81
# logger.debug("Option '%s': '%s'", option_name, self.options.get(option_name))
82
82
# logger.debug("Config '%s': '%s'", config_value, self.config[config_value])
0 commit comments