log21 2.8.0__tar.gz → 2.8.1__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.
Files changed (27) hide show
  1. {log21-2.8.0 → log21-2.8.1}/PKG-INFO +7 -8
  2. {log21-2.8.0 → log21-2.8.1}/README.md +6 -7
  3. {log21-2.8.0 → log21-2.8.1}/pyproject.toml +7 -1
  4. {log21-2.8.0 → log21-2.8.1}/src/log21/StreamHandler.py +1 -1
  5. {log21-2.8.0 → log21-2.8.1}/src/log21/__init__.py +14 -15
  6. {log21-2.8.0 → log21-2.8.1}/src/log21.egg-info/PKG-INFO +7 -8
  7. {log21-2.8.0 → log21-2.8.1}/LICENSE.txt +0 -0
  8. {log21-2.8.0 → log21-2.8.1}/setup.cfg +0 -0
  9. {log21-2.8.0 → log21-2.8.1}/src/log21/Argparse.py +0 -0
  10. {log21-2.8.0 → log21-2.8.1}/src/log21/Argumentify.py +0 -0
  11. {log21-2.8.0 → log21-2.8.1}/src/log21/Colors.py +0 -0
  12. {log21-2.8.0 → log21-2.8.1}/src/log21/CrashReporter/Formatters.py +0 -0
  13. {log21-2.8.0 → log21-2.8.1}/src/log21/CrashReporter/Reporters.py +0 -0
  14. {log21-2.8.0 → log21-2.8.1}/src/log21/CrashReporter/__init__.py +0 -0
  15. {log21-2.8.0 → log21-2.8.1}/src/log21/FileHandler.py +0 -0
  16. {log21-2.8.0 → log21-2.8.1}/src/log21/Formatters.py +0 -0
  17. {log21-2.8.0 → log21-2.8.1}/src/log21/Levels.py +0 -0
  18. {log21-2.8.0 → log21-2.8.1}/src/log21/Logger.py +0 -0
  19. {log21-2.8.0 → log21-2.8.1}/src/log21/LoggingWindow.py +0 -0
  20. {log21-2.8.0 → log21-2.8.1}/src/log21/Manager.py +0 -0
  21. {log21-2.8.0 → log21-2.8.1}/src/log21/PPrint.py +0 -0
  22. {log21-2.8.0 → log21-2.8.1}/src/log21/ProgressBar.py +0 -0
  23. {log21-2.8.0 → log21-2.8.1}/src/log21/TreePrint.py +0 -0
  24. {log21-2.8.0 → log21-2.8.1}/src/log21.egg-info/SOURCES.txt +0 -0
  25. {log21-2.8.0 → log21-2.8.1}/src/log21.egg-info/dependency_links.txt +0 -0
  26. {log21-2.8.0 → log21-2.8.1}/src/log21.egg-info/requires.txt +0 -0
  27. {log21-2.8.0 → log21-2.8.1}/src/log21.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: log21
3
- Version: 2.8.0
3
+ Version: 2.8.1
4
4
  Summary: A simple logging package that helps you log colorized messages in Windows console.
5
5
  Author-email: "CodeWriter21(Mehrad Pooryoussof)" <CodeWriter21@gmail.com>
6
6
  License: Apache License 2.0
@@ -92,13 +92,12 @@ pip install git+https://github.com/MPCodeWriter21/log21
92
92
  Changes
93
93
  -------
94
94
 
95
- ### 2.8.0
95
+ ### 2.8.1
96
96
 
97
- + Update python version
98
- + Renamed `crash_report.log` to `.crash_report.log`.
99
- + Added "force" error handling method to `Logger.add_level`.
100
- + Changed the adding level error handling method to "ignore".
101
- + Ability to add new methods to the Logger object for each custom level.
97
+ + Fixed Carriage Return Handling.
98
+ + Fixed setting level using `log21.basic_config`
99
+ + Added more configuration for developer tools to the `pyproject.toml` file.
100
+ + Added pre-commit.
102
101
 
103
102
  [Full CHANGELOG](https://github.com/MPCodeWriter21/log21/blob/master/CHANGELOG.md)
104
103
 
@@ -237,7 +236,7 @@ for character in text:
237
236
 
238
237
  window.error(colored_text)
239
238
 
240
- # See more examples in
239
+ # See more examples in
241
240
  # https://github.com/MPCodeWriter21/log21/blob/066efc1e72542531012d36974bbf6cd4c5941378/log21/LoggingWindow.py#L155
242
241
  # and
243
242
  # https://github.com/MPCodeWriter21/log21/blob/066efc1e72542531012d36974bbf6cd4c5941378/log21/__init__.py#L144
@@ -61,13 +61,12 @@ pip install git+https://github.com/MPCodeWriter21/log21
61
61
  Changes
62
62
  -------
63
63
 
64
- ### 2.8.0
64
+ ### 2.8.1
65
65
 
66
- + Update python version
67
- + Renamed `crash_report.log` to `.crash_report.log`.
68
- + Added "force" error handling method to `Logger.add_level`.
69
- + Changed the adding level error handling method to "ignore".
70
- + Ability to add new methods to the Logger object for each custom level.
66
+ + Fixed Carriage Return Handling.
67
+ + Fixed setting level using `log21.basic_config`
68
+ + Added more configuration for developer tools to the `pyproject.toml` file.
69
+ + Added pre-commit.
71
70
 
72
71
  [Full CHANGELOG](https://github.com/MPCodeWriter21/log21/blob/master/CHANGELOG.md)
73
72
 
@@ -206,7 +205,7 @@ for character in text:
206
205
 
207
206
  window.error(colored_text)
208
207
 
209
- # See more examples in
208
+ # See more examples in
210
209
  # https://github.com/MPCodeWriter21/log21/blob/066efc1e72542531012d36974bbf6cd4c5941378/log21/LoggingWindow.py#L155
211
210
  # and
212
211
  # https://github.com/MPCodeWriter21/log21/blob/066efc1e72542531012d36974bbf6cd4c5941378/log21/__init__.py#L144
@@ -26,7 +26,7 @@ dependencies = [
26
26
  "webcolors",
27
27
  "docstring-parser"
28
28
  ]
29
- version = "2.8.0"
29
+ version = "2.8.1"
30
30
 
31
31
  [tool.setuptools.packages.find]
32
32
  where = ["src"]
@@ -62,4 +62,10 @@ dedent_closing_brackets = true
62
62
  [tool.isort]
63
63
  line_length = 88
64
64
  combine_as_imports = true
65
+ length_sort = true
65
66
  order_by_type = true
67
+
68
+ [tool.docformatter]
69
+ recursive = true
70
+ wrap-summaries = 88
71
+ wrap-descriptions = 88
@@ -53,7 +53,7 @@ class StreamHandler(_StreamHandler):
53
53
  msg = _hex_escape.sub(
54
54
  '', _ansi_escape.sub('', record.msg.strip(' \t\n\x0b\x0c'))
55
55
  )
56
- if '\r' in msg[1:-1]:
56
+ if '\r' == msg[:1]:
57
57
  file_descriptor = getattr(self.stream, 'fileno', None)
58
58
  if file_descriptor:
59
59
  file_descriptor = file_descriptor()
@@ -23,18 +23,17 @@ from log21.ProgressBar import ProgressBar
23
23
  from log21.LoggingWindow import LoggingWindow, LoggingWindowHandler
24
24
  from log21.StreamHandler import StreamHandler, ColorizingStreamHandler
25
25
 
26
- __version__ = "2.8.0"
27
- __author__ = "CodeWriter21 (Mehrad Pooryoussof)"
28
- __github__ = "Https://GitHub.com/MPCodeWriter21/log21"
26
+ __author__ = 'CodeWriter21 (Mehrad Pooryoussof)'
27
+ __github__ = 'Https://GitHub.com/MPCodeWriter21/log21'
29
28
  __all__ = [
30
29
  'ColorizingStreamHandler', 'DecolorizingFileHandler', 'ColorizingFormatter',
31
30
  'DecolorizingFormatter', 'get_logger', 'Logger', 'Colors', 'get_color',
32
31
  'get_colors', 'CRITICAL', 'FATAL', 'ERROR', 'WARNING', 'WARN', 'INFO', 'DEBUG',
33
32
  'NOTSET', 'INPUT', 'StreamHandler', 'ColorizingArgumentParser', 'PrettyPrinter',
34
33
  'pformat', 'pprint', 'pretty_print', 'tree_format', 'TreePrint', 'Manager',
35
- 'get_color_name', 'closest_color', 'ansi_escape', '__version__', '__author__',
36
- '__github__', 'debug', 'info', 'warning', 'warn', 'error', 'critical', 'fatal',
37
- 'exception', 'log', 'basic_config', 'basicConfig', 'ProgressBar', 'progress_bar',
34
+ 'get_color_name', 'closest_color', 'ansi_escape', '__author__', '__github__',
35
+ 'debug', 'info', 'warning', 'warn', 'error', 'critical', 'fatal', 'exception',
36
+ 'log', 'basic_config', 'basicConfig', 'ProgressBar', 'progress_bar',
38
37
  'LoggingWindow', 'LoggingWindowHandler', 'get_logging_window', 'CrashReporter',
39
38
  'console_reporter', 'file_reporter', 'argumentify'
40
39
  ]
@@ -46,7 +45,7 @@ _logging.setLoggerClass(Logger)
46
45
  def _prepare_formatter(
47
46
  fmt: _Optional[str] = None,
48
47
  style: str = '%',
49
- datefmt: str = "%H:%M:%S",
48
+ datefmt: str = '%H:%M:%S',
50
49
  show_level: bool = True,
51
50
  show_time: bool = True,
52
51
  colorize_time_and_level: bool = True,
@@ -57,11 +56,11 @@ def _prepare_formatter(
57
56
  # Prepares a formatting if the fmt was None
58
57
  if not fmt:
59
58
  style = '%'
60
- fmt = "%(message)s"
59
+ fmt = '%(message)s'
61
60
  if show_level:
62
- fmt = "[%(levelname)s] " + fmt
61
+ fmt = '[%(levelname)s] ' + fmt
63
62
  if show_time:
64
- fmt = "[%(asctime)s] " + fmt
63
+ fmt = '[%(asctime)s] ' + fmt
65
64
  fmt = '\r' + fmt
66
65
 
67
66
  if level_colors and not issubclass(formatter_class, ColorizingFormatter):
@@ -101,7 +100,7 @@ def get_logger(
101
100
  show_level: bool = True,
102
101
  colorize_time_and_level: bool = True,
103
102
  fmt: _Optional[str] = None,
104
- datefmt: str = "%H:%M:%S",
103
+ datefmt: str = '%H:%M:%S',
105
104
  style: str = '%',
106
105
  handle_carriage_return: bool = True,
107
106
  handle_new_line: bool = True,
@@ -209,7 +208,7 @@ def get_logging_window(
209
208
  show_level: bool = True,
210
209
  colorize_time_and_level: bool = True,
211
210
  fmt: _Optional[str] = None,
212
- datefmt: str = "%H:%M:%S",
211
+ datefmt: str = '%H:%M:%S',
213
212
  style: str = '%',
214
213
  handle_carriage_return: bool = True,
215
214
  handle_new_line: bool = True,
@@ -421,7 +420,7 @@ def basic_config(
421
420
  stream=None,
422
421
  filename=None,
423
422
  filemode: str = 'a',
424
- date_format: str = "%H:%M:%S",
423
+ date_format: str = '%H:%M:%S',
425
424
  style: str = '%',
426
425
  format_: _Optional[str] = None,
427
426
  level: _Optional[_Union[int, str]] = None
@@ -517,8 +516,8 @@ def basic_config(
517
516
  if handler.formatter is None:
518
517
  handler.setFormatter(formatter)
519
518
  root.addHandler(handler)
520
- if level is not None:
521
- root.setLevel(level)
519
+ if level is not None:
520
+ root.setLevel(level)
522
521
 
523
522
 
524
523
  basicConfig = basic_config
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: log21
3
- Version: 2.8.0
3
+ Version: 2.8.1
4
4
  Summary: A simple logging package that helps you log colorized messages in Windows console.
5
5
  Author-email: "CodeWriter21(Mehrad Pooryoussof)" <CodeWriter21@gmail.com>
6
6
  License: Apache License 2.0
@@ -92,13 +92,12 @@ pip install git+https://github.com/MPCodeWriter21/log21
92
92
  Changes
93
93
  -------
94
94
 
95
- ### 2.8.0
95
+ ### 2.8.1
96
96
 
97
- + Update python version
98
- + Renamed `crash_report.log` to `.crash_report.log`.
99
- + Added "force" error handling method to `Logger.add_level`.
100
- + Changed the adding level error handling method to "ignore".
101
- + Ability to add new methods to the Logger object for each custom level.
97
+ + Fixed Carriage Return Handling.
98
+ + Fixed setting level using `log21.basic_config`
99
+ + Added more configuration for developer tools to the `pyproject.toml` file.
100
+ + Added pre-commit.
102
101
 
103
102
  [Full CHANGELOG](https://github.com/MPCodeWriter21/log21/blob/master/CHANGELOG.md)
104
103
 
@@ -237,7 +236,7 @@ for character in text:
237
236
 
238
237
  window.error(colored_text)
239
238
 
240
- # See more examples in
239
+ # See more examples in
241
240
  # https://github.com/MPCodeWriter21/log21/blob/066efc1e72542531012d36974bbf6cd4c5941378/log21/LoggingWindow.py#L155
242
241
  # and
243
242
  # https://github.com/MPCodeWriter21/log21/blob/066efc1e72542531012d36974bbf6cd4c5941378/log21/__init__.py#L144
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