log21 3.3.2__tar.gz → 3.3.3__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.2 → log21-3.3.3}/PKG-INFO +20 -21
- {log21-3.3.2 → log21-3.3.3}/README.md +15 -17
- {log21-3.3.2 → log21-3.3.3}/pyproject.toml +5 -4
- {log21-3.3.2 → log21-3.3.3}/src/log21/__init__.py +1 -1
- {log21-3.3.2 → log21-3.3.3}/src/log21/argparse.py +16 -2
- {log21-3.3.2 → log21-3.3.3}/src/log21/_argparse.py +0 -0
- {log21-3.3.2 → log21-3.3.3}/src/log21/_module_helper.py +0 -0
- {log21-3.3.2 → log21-3.3.3}/src/log21/argumentify.py +0 -0
- {log21-3.3.2 → log21-3.3.3}/src/log21/colors.py +0 -0
- {log21-3.3.2 → log21-3.3.3}/src/log21/crash_reporter/__init__.py +0 -0
- {log21-3.3.2 → log21-3.3.3}/src/log21/crash_reporter/formatters.py +0 -0
- {log21-3.3.2 → log21-3.3.3}/src/log21/crash_reporter/reporters.py +0 -0
- {log21-3.3.2 → log21-3.3.3}/src/log21/file_handler.py +0 -0
- {log21-3.3.2 → log21-3.3.3}/src/log21/formatters.py +0 -0
- {log21-3.3.2 → log21-3.3.3}/src/log21/helper_types.py +0 -0
- {log21-3.3.2 → log21-3.3.3}/src/log21/levels.py +0 -0
- {log21-3.3.2 → log21-3.3.3}/src/log21/logger.py +0 -0
- {log21-3.3.2 → log21-3.3.3}/src/log21/logging_window.py +0 -0
- {log21-3.3.2 → log21-3.3.3}/src/log21/manager.py +0 -0
- {log21-3.3.2 → log21-3.3.3}/src/log21/pprint.py +0 -0
- {log21-3.3.2 → log21-3.3.3}/src/log21/progress_bar.py +0 -0
- {log21-3.3.2 → log21-3.3.3}/src/log21/stream_handler.py +0 -0
- {log21-3.3.2 → log21-3.3.3}/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.
|
|
3
|
+
Version: 3.3.3
|
|
4
4
|
Summary: A simple logging package
|
|
5
5
|
Keywords: python,log,colorize,color,logging,Python3,CodeWriter21
|
|
6
6
|
Author: CodeWriter21(Mehrad Pooryoussof)
|
|
@@ -18,19 +18,18 @@ Classifier: Operating System :: MacOS :: MacOS X
|
|
|
18
18
|
Requires-Dist: webcolors
|
|
19
19
|
Requires-Dist: docstring-parser
|
|
20
20
|
Requires-Python: >=3.9
|
|
21
|
-
Project-URL: Donations, https://
|
|
22
|
-
Project-URL: Homepage, https://
|
|
23
|
-
Project-URL:
|
|
21
|
+
Project-URL: Donations, https://gitlab.com/CodeWriter21/log21/-/blob/master/DONATE.md
|
|
22
|
+
Project-URL: Homepage, https://gitlab.com/CodeWriter21/log21
|
|
23
|
+
Project-URL: Repository, https://gitlab.com/CodeWriter21/log21
|
|
24
|
+
Project-URL: Source, https://gitlab.com/CodeWriter21/log21
|
|
24
25
|
Description-Content-Type: text/markdown
|
|
25
26
|
|
|
26
27
|
log21
|
|
27
28
|
=====
|
|
28
29
|
|
|
29
30
|

|
|
30
|
-

|
|
33
|
-
[](https://www.codefactor.io/repository/github/mpcodewriter21/log21)
|
|
31
|
+
[](https://gitlab.com/CodeWriter21/log21/-/commits/master)
|
|
32
|
+
[](https://gitlab.com/CodeWriter21/log21)
|
|
34
33
|
|
|
35
34
|
A simple logging package that helps you log colorized messages in Windows console and
|
|
36
35
|
other operating systems.
|
|
@@ -59,11 +58,11 @@ Features
|
|
|
59
58
|
reporter functions and use them instead!
|
|
60
59
|
+ Argumentify : You can use the argumentify feature to decrease the number of lines you
|
|
61
60
|
need to write to parse command-line arguments. It's colored by the way!
|
|
62
|
-
+ Any idea? Feel free to [open an issue](https://
|
|
63
|
-
or submit a
|
|
61
|
+
+ Any idea? Feel free to [open an issue](https://gitlab.com/CodeWriter21/log21/-/issues)
|
|
62
|
+
or submit a merge request.
|
|
64
63
|
|
|
65
|
-
](https://gitlab.com/CodeWriter21/log21/-/issues)
|
|
65
|
+
[](https://gitlab.com/CodeWriter21/log21/-/graphs/master)
|
|
67
66
|
|
|
68
67
|
Installation
|
|
69
68
|
------------
|
|
@@ -79,7 +78,7 @@ Then you can install log21 using pip module:
|
|
|
79
78
|
python -m pip install log21 -U
|
|
80
79
|
```
|
|
81
80
|
|
|
82
|
-
Or you can clone [the repository](https://
|
|
81
|
+
Or you can clone [the repository](https://gitlab.com/CodeWriter21/log21) and run:
|
|
83
82
|
|
|
84
83
|
```bash
|
|
85
84
|
pip install .
|
|
@@ -88,7 +87,7 @@ pip install .
|
|
|
88
87
|
Or let the pip get it using git:
|
|
89
88
|
|
|
90
89
|
```bash
|
|
91
|
-
pip install git+https://
|
|
90
|
+
pip install git+https://gitlab.com/CodeWriter21/log21.git
|
|
92
91
|
```
|
|
93
92
|
|
|
94
93
|
Changelog
|
|
@@ -155,25 +154,25 @@ if __name__ == "__main__":
|
|
|
155
154
|
log21.argumentify(show_percentage)
|
|
156
155
|
```
|
|
157
156
|
|
|
158
|
-
[Full CHANGELOG](https://
|
|
157
|
+
[Full CHANGELOG](https://gitlab.com/CodeWriter21/log21/-/blob/master/CHANGELOG.md)
|
|
159
158
|
|
|
160
159
|
Usage Examples
|
|
161
160
|
---------------
|
|
162
161
|
|
|
163
|
-
See [EXAMPLES.md](https://
|
|
162
|
+
See [EXAMPLES.md](https://gitlab.com/CodeWriter21/log21/-/blob/master/EXAMPLES.md)
|
|
164
163
|
|
|
165
164
|
About
|
|
166
165
|
-----
|
|
167
166
|
|
|
168
167
|
Author: CodeWriter21 (Mehrad Pooryoussof)
|
|
169
168
|
|
|
170
|
-
|
|
169
|
+
GitLab: [CodeWriter21](https://gitlab.com/CodeWriter21)
|
|
171
170
|
|
|
172
171
|
Telegram Channel: [@CodeWriter21](https://t.me/CodeWriter21)
|
|
173
172
|
|
|
174
173
|
### License
|
|
175
174
|
|
|
176
|
-
](https://gitlab.com/CodeWriter21/log21/-/blob/master/LICENSE.txt)
|
|
177
176
|
|
|
178
177
|
[apache-2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
|
179
178
|
|
|
@@ -181,10 +180,10 @@ Telegram Channel: [@CodeWriter21](https://t.me/CodeWriter21)
|
|
|
181
180
|
|
|
182
181
|
In order to support this project you can donate some crypto of your choice 8D
|
|
183
182
|
|
|
184
|
-
[Donate Addresses](https://
|
|
183
|
+
[Donate Addresses](https://gitlab.com/CodeWriter21/log21/-/blob/master/DONATE.md)
|
|
185
184
|
|
|
186
|
-
Or if you can't, give [this project](https://
|
|
187
|
-
|
|
185
|
+
Or if you can't, give [this project](https://gitlab.com/CodeWriter21/log21) a star on
|
|
186
|
+
GitLab :)
|
|
188
187
|
|
|
189
188
|
References
|
|
190
189
|
----------
|
|
@@ -2,10 +2,8 @@ log21
|
|
|
2
2
|
=====
|
|
3
3
|
|
|
4
4
|

|
|
5
|
-

|
|
8
|
-
[](https://www.codefactor.io/repository/github/mpcodewriter21/log21)
|
|
5
|
+
[](https://gitlab.com/CodeWriter21/log21/-/commits/master)
|
|
6
|
+
[](https://gitlab.com/CodeWriter21/log21)
|
|
9
7
|
|
|
10
8
|
A simple logging package that helps you log colorized messages in Windows console and
|
|
11
9
|
other operating systems.
|
|
@@ -34,11 +32,11 @@ Features
|
|
|
34
32
|
reporter functions and use them instead!
|
|
35
33
|
+ Argumentify : You can use the argumentify feature to decrease the number of lines you
|
|
36
34
|
need to write to parse command-line arguments. It's colored by the way!
|
|
37
|
-
+ Any idea? Feel free to [open an issue](https://
|
|
38
|
-
or submit a
|
|
35
|
+
+ Any idea? Feel free to [open an issue](https://gitlab.com/CodeWriter21/log21/-/issues)
|
|
36
|
+
or submit a merge request.
|
|
39
37
|
|
|
40
|
-
](https://gitlab.com/CodeWriter21/log21/-/issues)
|
|
39
|
+
[](https://gitlab.com/CodeWriter21/log21/-/graphs/master)
|
|
42
40
|
|
|
43
41
|
Installation
|
|
44
42
|
------------
|
|
@@ -54,7 +52,7 @@ Then you can install log21 using pip module:
|
|
|
54
52
|
python -m pip install log21 -U
|
|
55
53
|
```
|
|
56
54
|
|
|
57
|
-
Or you can clone [the repository](https://
|
|
55
|
+
Or you can clone [the repository](https://gitlab.com/CodeWriter21/log21) and run:
|
|
58
56
|
|
|
59
57
|
```bash
|
|
60
58
|
pip install .
|
|
@@ -63,7 +61,7 @@ pip install .
|
|
|
63
61
|
Or let the pip get it using git:
|
|
64
62
|
|
|
65
63
|
```bash
|
|
66
|
-
pip install git+https://
|
|
64
|
+
pip install git+https://gitlab.com/CodeWriter21/log21.git
|
|
67
65
|
```
|
|
68
66
|
|
|
69
67
|
Changelog
|
|
@@ -130,25 +128,25 @@ if __name__ == "__main__":
|
|
|
130
128
|
log21.argumentify(show_percentage)
|
|
131
129
|
```
|
|
132
130
|
|
|
133
|
-
[Full CHANGELOG](https://
|
|
131
|
+
[Full CHANGELOG](https://gitlab.com/CodeWriter21/log21/-/blob/master/CHANGELOG.md)
|
|
134
132
|
|
|
135
133
|
Usage Examples
|
|
136
134
|
---------------
|
|
137
135
|
|
|
138
|
-
See [EXAMPLES.md](https://
|
|
136
|
+
See [EXAMPLES.md](https://gitlab.com/CodeWriter21/log21/-/blob/master/EXAMPLES.md)
|
|
139
137
|
|
|
140
138
|
About
|
|
141
139
|
-----
|
|
142
140
|
|
|
143
141
|
Author: CodeWriter21 (Mehrad Pooryoussof)
|
|
144
142
|
|
|
145
|
-
|
|
143
|
+
GitLab: [CodeWriter21](https://gitlab.com/CodeWriter21)
|
|
146
144
|
|
|
147
145
|
Telegram Channel: [@CodeWriter21](https://t.me/CodeWriter21)
|
|
148
146
|
|
|
149
147
|
### License
|
|
150
148
|
|
|
151
|
-
](https://gitlab.com/CodeWriter21/log21/-/blob/master/LICENSE.txt)
|
|
152
150
|
|
|
153
151
|
[apache-2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
|
154
152
|
|
|
@@ -156,10 +154,10 @@ Telegram Channel: [@CodeWriter21](https://t.me/CodeWriter21)
|
|
|
156
154
|
|
|
157
155
|
In order to support this project you can donate some crypto of your choice 8D
|
|
158
156
|
|
|
159
|
-
[Donate Addresses](https://
|
|
157
|
+
[Donate Addresses](https://gitlab.com/CodeWriter21/log21/-/blob/master/DONATE.md)
|
|
160
158
|
|
|
161
|
-
Or if you can't, give [this project](https://
|
|
162
|
-
|
|
159
|
+
Or if you can't, give [this project](https://gitlab.com/CodeWriter21/log21) a star on
|
|
160
|
+
GitLab :)
|
|
163
161
|
|
|
164
162
|
References
|
|
165
163
|
----------
|
|
@@ -23,16 +23,17 @@ dependencies = [
|
|
|
23
23
|
"webcolors",
|
|
24
24
|
"docstring-parser"
|
|
25
25
|
]
|
|
26
|
-
version = "3.3.
|
|
26
|
+
version = "3.3.3"
|
|
27
27
|
|
|
28
28
|
[build-system]
|
|
29
29
|
requires = ["uv_build>=0.8.15,<0.9.0"]
|
|
30
30
|
build-backend = "uv_build"
|
|
31
31
|
|
|
32
32
|
[project.urls]
|
|
33
|
-
Homepage = "https://
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
Homepage = "https://gitlab.com/CodeWriter21/log21"
|
|
34
|
+
Repository = "https://gitlab.com/CodeWriter21/log21"
|
|
35
|
+
Donations = "https://gitlab.com/CodeWriter21/log21/-/blob/master/DONATE.md"
|
|
36
|
+
Source = "https://gitlab.com/CodeWriter21/log21"
|
|
36
37
|
|
|
37
38
|
[tool.yapf]
|
|
38
39
|
column_limit = 88
|
|
@@ -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.3.
|
|
36
|
+
__version__ = '3.3.3'
|
|
37
37
|
__github__ = 'https://GitHub.com/MPCodeWriter21/log21'
|
|
38
38
|
__all__ = [
|
|
39
39
|
'ColorizingStreamHandler', 'DecolorizingFileHandler', 'ColorizingFormatter',
|
|
@@ -575,9 +575,23 @@ class _ActionsContainer(_argparse._ActionsContainer): # novm
|
|
|
575
575
|
and not isinstance(func_type, (_types.UnionType, tuple))):
|
|
576
576
|
raise ValueError(f'{func_type} is not callable; level={level}')
|
|
577
577
|
|
|
578
|
-
# Handle `UnionType` as a type (e.g. `int|str`)
|
|
578
|
+
# Handle `UnionType` as a type (e.g. `int|str` and `int|None`)
|
|
579
579
|
if hasattr(_types, 'UnionType') and isinstance(func_type, _types.UnionType):
|
|
580
|
-
|
|
580
|
+
# `X | None` is the PEP 604 spelling of `Optional[X]` and must
|
|
581
|
+
# behave identically: mark the action as not required and unwrap
|
|
582
|
+
# to `X`. `types.UnionType` exposes `__args__` just like
|
|
583
|
+
# `typing.Optional`, e.g. `(str | None).__args__ == (str, NoneType)`.
|
|
584
|
+
args = func_type.__args__ # type: ignore
|
|
585
|
+
if (hasattr(_types, 'NoneType') and len(args) == 2
|
|
586
|
+
and args[1] is _types.NoneType):
|
|
587
|
+
action.required = False
|
|
588
|
+
func_type = args[0]
|
|
589
|
+
elif (hasattr(_types, 'NoneType') and len(args) == 2
|
|
590
|
+
and args[0] is _types.NoneType):
|
|
591
|
+
action.required = False
|
|
592
|
+
func_type = args[1]
|
|
593
|
+
else:
|
|
594
|
+
func_type = args
|
|
581
595
|
|
|
582
596
|
# Handle `Literal` as a type (e.g. `Literal[1, 2, 3]`)
|
|
583
597
|
elif (hasattr(_typing, '_LiteralGenericAlias')
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|