1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-11 01:10:37 +02:00

type annotation cleanup

This commit is contained in:
Kelly Brazil
2022-10-19 13:32:16 -07:00
parent 1559c4751e
commit 14a237749c
5 changed files with 6 additions and 3 deletions

View File

@ -7,6 +7,7 @@ jc changelog
display until `iso-datetime` is removed in a future version. display until `iso-datetime` is removed in a future version.
- refactor cli module - refactor cli module
- optimize timestamps - optimize timestamps
- add more type annotations
- add support for deprecating parsers - add support for deprecating parsers
20220926 v1.22.0 20220926 v1.22.0

View File

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# type: ignore
# Copyright (c) 2005-2010 ActiveState Software Inc. # Copyright (c) 2005-2010 ActiveState Software Inc.
# Copyright (c) 2013 Eddy Petrișor # Copyright (c) 2013 Eddy Petrișor

View File

@ -685,7 +685,7 @@ class JcCli():
self.set_custom_colors() self.set_custom_colors()
if self.verbose_debug: if self.verbose_debug:
tracebackplus.enable(context=11) tracebackplus.enable(context=11) # type: ignore
if self.about: if self.about:
self.data_out = self.about_jc() self.data_out = self.about_jc()

View File

@ -200,7 +200,7 @@ def _modname_to_cliname(parser_mod_name: str) -> str:
# override parsers from <user_data_dir>/jc/jcparsers/*.py. # override parsers from <user_data_dir>/jc/jcparsers/*.py.
# Once this list is created, extend the parsers list with it. # Once this list is created, extend the parsers list with it.
local_parsers: List[str] = [] 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') local_parsers_dir = os.path.join(data_dir, 'jcparsers')
if os.path.isdir(local_parsers_dir): if os.path.isdir(local_parsers_dir):
sys.path.append(data_dir) sys.path.append(data_dir)

View File

@ -1,3 +1,5 @@
# type: ignore
"""More comprehensive traceback formatting for Python scripts. """More comprehensive traceback formatting for Python scripts.
To enable this module, do: To enable this module, do:
import tracebackplus; tracebackplus.enable() 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 agrees to be bound by the terms and conditions of this License
Agreement. Agreement.
''' '''
import inspect import inspect
import keyword import keyword
import linecache import linecache