mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
*: Utilize newer 3.10 syntax for type hints
Tests: - mypy does not show any errors. - Installing ejabberd app works. Privileged actions run fine. - Unit tests work. - No additional testing was done as type annotations don't have any effect at runtime. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
a86a86d605
commit
38ece87c6c
29 files changed
+116
-140
No files matched your search
@@ -8,7 +8,6 @@ import importlib
|
||||
import logging
|
||||
import pathlib
|
||||
import re
|
||||
from typing import Optional
|
||||
|
||||
import django
|
||||
|
||||
@@ -142,8 +141,7 @@ def get_module_import_path(module_name: str) -> str:
|
||||
return import_path
|
||||
|
||||
|
||||
def _read_module_import_paths_from_file(
|
||||
file_path: pathlib.Path) -> Optional[str]:
|
||||
def _read_module_import_paths_from_file(file_path: pathlib.Path) -> str | None:
|
||||
"""Read a module's import path from a file."""
|
||||
with file_path.open() as file_handle:
|
||||
for line in file_handle:
|
||||
|
||||
Reference in new issue
Block a user