mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
*: Add type hints for app init methods
- This is so that the methods will be checked by mypy. This should help identify any incorrect initialization of components. - Remove unused self.repos in GitwebApp. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
3a7dd4e812
commit
f9b186e14f
66 files changed
+72
-74
No files matched your search
@@ -60,7 +60,7 @@ class DateTimeApp(app_module.App):
|
||||
|
||||
return self._time_managed
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self) -> None:
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
@@ -77,9 +77,9 @@ class DateTimeApp(app_module.App):
|
||||
packages = Packages('packages-datetime', ['systemd-timesyncd'])
|
||||
self.add(packages)
|
||||
|
||||
daemon = RelatedDaemon('daemon-datetime-timedated',
|
||||
'systemd-timedated')
|
||||
self.add(daemon)
|
||||
related_daemon = RelatedDaemon('daemon-datetime-timedated',
|
||||
'systemd-timedated')
|
||||
self.add(related_daemon)
|
||||
|
||||
if self._is_time_managed():
|
||||
daemon = Daemon('daemon-datetime', 'systemd-timesyncd')
|
||||
|
||||
Reference in new issue
Block a user