log21 3.3.3__tar.gz → 3.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {log21-3.3.3 → log21-3.5.0}/PKG-INFO +1 -2
- {log21-3.3.3 → log21-3.5.0}/README.md +0 -1
- {log21-3.3.3 → log21-3.5.0}/pyproject.toml +1 -1
- {log21-3.3.3 → log21-3.5.0}/src/log21/__init__.py +1 -1
- {log21-3.3.3 → log21-3.5.0}/src/log21/argparse.py +15 -2
- log21-3.5.0/src/log21/argumentify.py +1062 -0
- log21-3.3.3/src/log21/argumentify.py +0 -534
- {log21-3.3.3 → log21-3.5.0}/src/log21/_argparse.py +0 -0
- {log21-3.3.3 → log21-3.5.0}/src/log21/_module_helper.py +0 -0
- {log21-3.3.3 → log21-3.5.0}/src/log21/colors.py +0 -0
- {log21-3.3.3 → log21-3.5.0}/src/log21/crash_reporter/__init__.py +0 -0
- {log21-3.3.3 → log21-3.5.0}/src/log21/crash_reporter/formatters.py +0 -0
- {log21-3.3.3 → log21-3.5.0}/src/log21/crash_reporter/reporters.py +0 -0
- {log21-3.3.3 → log21-3.5.0}/src/log21/file_handler.py +0 -0
- {log21-3.3.3 → log21-3.5.0}/src/log21/formatters.py +0 -0
- {log21-3.3.3 → log21-3.5.0}/src/log21/helper_types.py +0 -0
- {log21-3.3.3 → log21-3.5.0}/src/log21/levels.py +0 -0
- {log21-3.3.3 → log21-3.5.0}/src/log21/logger.py +0 -0
- {log21-3.3.3 → log21-3.5.0}/src/log21/logging_window.py +0 -0
- {log21-3.3.3 → log21-3.5.0}/src/log21/manager.py +0 -0
- {log21-3.3.3 → log21-3.5.0}/src/log21/pprint.py +0 -0
- {log21-3.3.3 → log21-3.5.0}/src/log21/progress_bar.py +0 -0
- {log21-3.3.3 → log21-3.5.0}/src/log21/stream_handler.py +0 -0
- {log21-3.3.3 → log21-3.5.0}/src/log21/tree_print.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: log21
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.5.0
|
|
4
4
|
Summary: A simple logging package
|
|
5
5
|
Keywords: python,log,colorize,color,logging,Python3,CodeWriter21
|
|
6
6
|
Author: CodeWriter21(Mehrad Pooryoussof)
|
|
@@ -29,7 +29,6 @@ log21
|
|
|
29
29
|
|
|
30
30
|

|
|
31
31
|
[](https://gitlab.com/CodeWriter21/log21/-/commits/master)
|
|
32
|
-
[](https://gitlab.com/CodeWriter21/log21)
|
|
33
32
|
|
|
34
33
|
A simple logging package that helps you log colorized messages in Windows console and
|
|
35
34
|
other operating systems.
|
|
@@ -3,7 +3,6 @@ log21
|
|
|
3
3
|
|
|
4
4
|

|
|
5
5
|
[](https://gitlab.com/CodeWriter21/log21/-/commits/master)
|
|
6
|
-
[](https://gitlab.com/CodeWriter21/log21)
|
|
7
6
|
|
|
8
7
|
A simple logging package that helps you log colorized messages in Windows console and
|
|
9
8
|
other operating systems.
|
|
@@ -33,7 +33,7 @@ from .stream_handler import StreamHandler, ColorizingStreamHandler
|
|
|
33
33
|
# yapf: enable
|
|
34
34
|
|
|
35
35
|
__author__ = 'CodeWriter21 (Mehrad Pooryoussof)'
|
|
36
|
-
__version__ = '3.
|
|
36
|
+
__version__ = '3.5.0'
|
|
37
37
|
__github__ = 'https://GitHub.com/MPCodeWriter21/log21'
|
|
38
38
|
__all__ = [
|
|
39
39
|
'ColorizingStreamHandler', 'DecolorizingFileHandler', 'ColorizingFormatter',
|
|
@@ -612,13 +612,17 @@ class _ActionsContainer(_argparse._ActionsContainer): # novm
|
|
|
612
612
|
else:
|
|
613
613
|
func_type = func_type.__args__ # type: ignore
|
|
614
614
|
|
|
615
|
-
# Handle `List` as a type (e.g. `List[int]`)
|
|
615
|
+
# Handle `List` as a type (e.g. `List[int]` and builtin `list[int]`)
|
|
616
616
|
elif (hasattr(_typing, '_GenericAlias')
|
|
617
617
|
and isinstance(func_type, _typing._GenericAlias) # type: ignore
|
|
618
618
|
and func_type.__origin__ is list) or (
|
|
619
619
|
hasattr(_typing, '_GenericAlias')
|
|
620
620
|
and isinstance(func_type, _typing._GenericAlias) # type: ignore
|
|
621
|
-
and func_type.__origin__ is collections.abc.Sequence)
|
|
621
|
+
and func_type.__origin__ is collections.abc.Sequence) or (
|
|
622
|
+
hasattr(_types, 'GenericAlias')
|
|
623
|
+
and isinstance(func_type, _types.GenericAlias)
|
|
624
|
+
and getattr(func_type, '__origin__', None) in
|
|
625
|
+
(list, collections.abc.Sequence)):
|
|
622
626
|
func_type = func_type.__args__[0]
|
|
623
627
|
if kwargs.get('nargs') is None:
|
|
624
628
|
action.nargs = '+'
|
|
@@ -668,6 +672,15 @@ class _ActionsContainer(_argparse._ActionsContainer): # novm
|
|
|
668
672
|
_types.UnionType,
|
|
669
673
|
))):
|
|
670
674
|
func_type = self._validate_func_type(action, func_type, kwargs, level + 1)
|
|
675
|
+
elif (hasattr(_types, 'GenericAlias')
|
|
676
|
+
and isinstance(func_type, _types.GenericAlias)
|
|
677
|
+
and getattr(func_type, '__origin__', None) in
|
|
678
|
+
(list, collections.abc.Sequence)):
|
|
679
|
+
# Builtin `list[T]` unwrapped from a PEP 604 optional (e.g.
|
|
680
|
+
# `list[str] | None`): route it through the `List` branch above.
|
|
681
|
+
# Restricted to list/Sequence origins so other generics (e.g.
|
|
682
|
+
# `dict[str, int]`) cannot recurse forever.
|
|
683
|
+
func_type = self._validate_func_type(action, func_type, kwargs, level + 1)
|
|
671
684
|
else:
|
|
672
685
|
func_type = (func_type, )
|
|
673
686
|
|