@@ -46,7 +46,7 @@ def format_commit(self, commit: pygit2.Commit) -> str:
46
46
return f"[`{ short_sha2 } `](https://github.com/transprogrammer/rodhaj/commit/{ commit_id } ) { short } ({ offset } )"
47
47
48
48
def get_last_commits (self , count : int = 5 ):
49
- repo = pygit2 .Repository (".git" )
49
+ repo = pygit2 .Repository (".git" ) # type: ignore # It technically is
50
50
commits = list (
51
51
itertools .islice (repo .walk (repo .head .target , SortMode .TOPOLOGICAL ), count )
52
52
)
@@ -55,7 +55,7 @@ def get_last_commits(self, count: int = 5):
55
55
def get_current_branch (
56
56
self ,
57
57
) -> str :
58
- repo = pygit2 .Repository (".git" )
58
+ repo = pygit2 .Repository (".git" ) # type: ignore
59
59
return repo .head .shorthand
60
60
61
61
async def fetch_num_active_tickets (self ) -> int :
@@ -83,6 +83,7 @@ async def about(self, ctx: RoboContext) -> None:
83
83
# R. Danny's way of doing it is probably close enough anyways
84
84
memory_usage = self .process .memory_full_info ().uss / 1024 ** 2
85
85
cpu_usage = self .process .cpu_percent () / psutil .cpu_count ()
86
+ bot_user : discord .ClientUser = self .bot .user # type: ignore
86
87
87
88
revisions = "See [GitHub](https://github.com/transprogrammer/rodhaj)"
88
89
working_branch = "Docker"
@@ -96,9 +97,7 @@ async def about(self, ctx: RoboContext) -> None:
96
97
f"Made with discord.py v{ discord .__version__ } | Running Python { platform .python_version ()} "
97
98
)
98
99
embed = Embed ()
99
- embed .set_author (
100
- name = self .bot .user .name , icon_url = self .bot .user .display_avatar .url
101
- ) # type: ignore
100
+ embed .set_author (name = bot_user .name , icon_url = bot_user .display_avatar .url )
102
101
embed .title = "Rodhaj"
103
102
embed .description = (
104
103
"Rodhaj is a modern, improved ModMail bot designed exclusively for "
0 commit comments