diff --git a/CHANGELOG b/CHANGELOG index 189704a7..2f211622 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,6 +7,7 @@ jc changelog display until `iso-datetime` is removed in a future version. - refactor cli module - optimize timestamps +- add more type annotations - add support for deprecating parsers 20220926 v1.22.0 diff --git a/jc/appdirs.py b/jc/appdirs.py index c43501ec..73075765 100644 --- a/jc/appdirs.py +++ b/jc/appdirs.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +# type: ignore # Copyright (c) 2005-2010 ActiveState Software Inc. # Copyright (c) 2013 Eddy Petrișor diff --git a/jc/cli.py b/jc/cli.py index d8cd6bdb..c9b757ff 100644 --- a/jc/cli.py +++ b/jc/cli.py @@ -685,7 +685,7 @@ class JcCli(): self.set_custom_colors() if self.verbose_debug: - tracebackplus.enable(context=11) + tracebackplus.enable(context=11) # type: ignore if self.about: self.data_out = self.about_jc() diff --git a/jc/lib.py b/jc/lib.py index ebcff0a0..56525f34 100644 --- a/jc/lib.py +++ b/jc/lib.py @@ -200,7 +200,7 @@ def _modname_to_cliname(parser_mod_name: str) -> str: # override parsers from /jc/jcparsers/*.py. # Once this list is created, extend the parsers list with it. local_parsers: List[str] = [] -data_dir = appdirs.user_data_dir('jc', 'jc') +data_dir = appdirs.user_data_dir('jc', 'jc') # type: ignore local_parsers_dir = os.path.join(data_dir, 'jcparsers') if os.path.isdir(local_parsers_dir): sys.path.append(data_dir) diff --git a/jc/tracebackplus.py b/jc/tracebackplus.py index 8ac15274..ca356906 100644 --- a/jc/tracebackplus.py +++ b/jc/tracebackplus.py @@ -1,3 +1,5 @@ +# type: ignore + """More comprehensive traceback formatting for Python scripts. To enable this module, do: import tracebackplus; tracebackplus.enable() @@ -69,7 +71,6 @@ products or services of Licensee, or any third party. agrees to be bound by the terms and conditions of this License Agreement. ''' - import inspect import keyword import linecache