diff options
author | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2022-08-02 09:23:34 +0200 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2022-08-02 09:23:34 +0200 |
commit | bd5340fa8195c41caeaaa539d49ebfdeeae3a8df (patch) | |
tree | 7abb0939f29c2864d64ebe7bb1ed2e241a8ec13d | |
parent | b614ed52a4aaf7678938448ef67f645a15ff2592 (diff) |
More explicit typehinting
-rw-r--r-- | hazwaz/command.py | 4 | ||||
-rw-r--r-- | hazwaz/mixins.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/hazwaz/command.py b/hazwaz/command.py index 1faf0fa..df8c186 100644 --- a/hazwaz/command.py +++ b/hazwaz/command.py @@ -35,11 +35,11 @@ class MainCommand: MyCommand().run() ''' - commands = () + commands: typing.Iterable["Command"] = () """ The subcommands: a tuple of :py:class:`Command` subclasses. """ - logformat = "%(levelname)s:%(name)s: %(message)s" + logformat: str = "%(levelname)s:%(name)s: %(message)s" """ The format passed to logging.Formatter. """ diff --git a/hazwaz/mixins.py b/hazwaz/mixins.py index 5a02238..443927d 100644 --- a/hazwaz/mixins.py +++ b/hazwaz/mixins.py @@ -24,7 +24,7 @@ class ExternalEditorMixin: ("vi", "vi"), ] - def edit_file_in_external_editor(self, filepath): + def edit_file_in_external_editor(self, filepath: str) -> bool: """ Open filepath in an external editor and wait for it to be closed. |