@@ -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