From c1df8e5a7270b33a1754cec51f79dbcdba17029d Mon Sep 17 00:00:00 2001 From: BJ Dierkes Date: Wed, 17 Jul 2024 19:36:18 -0500 Subject: [PATCH] Final Type Annotations Complete!!! Resolves PR #628 --- cement/cli/controllers/base.py | 2 +- cement/cli/main.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cement/cli/controllers/base.py b/cement/cli/controllers/base.py index 41281f58..ef3daabc 100644 --- a/cement/cli/controllers/base.py +++ b/cement/cli/controllers/base.py @@ -15,5 +15,5 @@ class Meta: (['-v', '--version'], {'action': 'version', 'version': BANNER}), ] - def _default(self): + def _default(self) -> None: self.app.args.print_help() diff --git a/cement/cli/main.py b/cement/cli/main.py index d6b71239..b5d31fda 100644 --- a/cement/cli/main.py +++ b/cement/cli/main.py @@ -1,6 +1,8 @@ +from __future__ import annotations import os import sys +from typing import Optional, List sys.path.append(os.path.join(os.path.dirname(__file__), 'contrib')) from cement import App, CaughtSignal # noqa: E402 @@ -29,12 +31,12 @@ class Meta: class CementTestApp(CementApp): class Meta: - argv = [] - config_files = [] + argv: List[str] = [] + config_files: List[str] = [] exit_on_close = False -def main(argv=None): +def main(argv: Optional[List[str]] = None) -> None: with CementApp() as app: try: app.run()