diff --git a/hikka/_types.py b/hikka/_types.py index 1ac0bd4..18d9bd3 100644 --- a/hikka/_types.py +++ b/hikka/_types.py @@ -108,9 +108,7 @@ class CoreUnloadError(Exception): super().__init__() def __str__(self) -> str: - return ( - f"Module {self.module} will not be unloaded, because it's core" - ) + return f"Module {self.module} will not be unloaded, because it's core" class SelfUnload(Exception): diff --git a/hikka/loader.py b/hikka/loader.py index 363d95f..ac80fc2 100644 --- a/hikka/loader.py +++ b/hikka/loader.py @@ -1056,9 +1056,9 @@ class Modules: ver = tuple( map( int, - re.search(r"# ?scope: ?hikka_min ((\d+\.){2}\d+)", code)[ - 1 - ].split("."), + re.search(r"# ?scope: ?hikka_min ((\d+\.){2}\d+)", code)[1].split( + "." + ), ) ) @@ -1146,8 +1146,7 @@ class Modules: if ( all( - line.replace(" ", "") != "#scope:no_stats" - for line in code.splitlines() + line.replace(" ", "") != "#scope:no_stats" for line in code.splitlines() ) and self._db.get("hikka.main", "stats", True) and url is not None diff --git a/hikka/main.py b/hikka/main.py index 701f4f8..bb8d281 100755 --- a/hikka/main.py +++ b/hikka/main.py @@ -535,7 +535,9 @@ class Hikka: ) self.sessions.remove(session) except InteractiveAuthRequired: - logging.error(f"Session {session} was terminated and re-auth is required") + logging.error( + f"Session {session} was terminated and re-auth is required" + ) self.sessions.remove(session) return bool(self.sessions) diff --git a/hikka/modules/help.py b/hikka/modules/help.py index 9606e93..0e46b05 100755 --- a/hikka/modules/help.py +++ b/hikka/modules/help.py @@ -192,7 +192,6 @@ class HelpMod(loader.Module): else utils.escape_html(name) ) - reply = self.strings("single_mod_header").format(_name) if module.__doc__: reply += "\nℹ️ " + utils.escape_html(inspect.getdoc(module)) + "\n"