Skip to content

Commit 5a06d0e

Browse files
committed
fix mypy typing issues
1 parent 64cb445 commit 5a06d0e

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

mkdocs_git_authors_plugin/git/author.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
from .page import Page
33
from .commit import Commit
44

5+
from typing import Dict
6+
57

68
class Author(AbstractRepoObject):
79
"""
@@ -20,7 +22,7 @@ def __init__(self, repo: Repo, name: str, email: str):
2022
super().__init__(repo)
2123
self._name = name
2224
self._email = email
23-
self._pages = {}
25+
self._pages: Dict[str, dict] = dict()
2426

2527
def add_lines(self, page: Page, commit: Commit, lines: int = 1):
2628
"""

mkdocs_git_authors_plugin/git/page.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
from .repo import Repo, AbstractRepoObject
55
from .command import GitCommand, GitCommandError
66

7+
from typing import List
8+
79
logger = logging.getLogger("mkdocs.plugins")
810

911

@@ -28,7 +30,7 @@ def __init__(self, repo: Repo, path: Path):
2830
self._path = path
2931
self._sorted = False
3032
self._total_lines = 0
31-
self._authors = []
33+
self._authors: List[dict] = list()
3234
try:
3335
self._process_git_blame()
3436
except GitCommandError:

mkdocs_git_authors_plugin/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ def page_authors_summary(page, config: dict):
6464
author_name = author.name()
6565
authors_summary.append("%s%s" % (author_name, contrib))
6666

67-
authors_summary = ", ".join(authors_summary)
68-
return "<span class='git-page-authors git-authors'>%s</span>" % authors_summary
67+
authors_summary_str = ", ".join(authors_summary)
68+
return "<span class='git-page-authors git-authors'>%s</span>" % authors_summary_str
6969

7070

7171
def site_authors_summary(authors, config: dict):

0 commit comments

Comments
 (0)