Skip to content

Commit feb4652

Browse files
committed
Sort imports, pass flake8 by adding __all__ to colorlog.wrappers
1 parent 194fd9d commit feb4652

4 files changed

Lines changed: 43 additions & 21 deletions

File tree

colorlog/__init__.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,30 @@
3232
)
3333

3434
__all__ = (
35+
"CRITICAL",
36+
"DEBUG",
37+
"ERROR",
38+
"FATAL",
39+
"INFO",
40+
"NOTSET",
41+
"WARN",
42+
"WARNING",
3543
"ColoredFormatter",
36-
"default_log_colors",
44+
"LevelFormatter",
45+
"StreamHandler",
46+
"TTYColoredFormatter",
3747
"basicConfig",
38-
"root",
39-
"getLogger",
48+
"critical",
4049
"debug",
41-
"info",
42-
"warning",
50+
"default_log_colors",
4351
"error",
4452
"exception",
45-
"critical",
46-
"log",
4753
"exception",
48-
"StreamHandler",
49-
"LevelFormatter",
50-
"TTYColoredFormatter",
51-
"CRITICAL",
52-
"FATAL",
53-
"ERROR",
54-
"WARNING",
55-
"WARN",
56-
"INFO",
57-
"DEBUG",
58-
"NOTSET",
54+
"getLogger",
55+
"info",
56+
"log",
57+
"root",
58+
"warning",
5959
)
6060

6161
if sys.version_info < (3, 6):

colorlog/tests/test_escape_codes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""Test the colorlog.escape_codes module."""
22

3-
from colorlog.escape_codes import escape_codes, esc, parse_colors
4-
53
import pytest
64

5+
from colorlog.escape_codes import esc, escape_codes, parse_colors
6+
77

88
def test_esc():
99
assert esc(1, 2, 3) == "\033[1;2;3m"

colorlog/wrappers.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,28 @@
1919

2020
import colorlog.formatter
2121

22+
__all__ = (
23+
"CRITICAL",
24+
"DEBUG",
25+
"ERROR",
26+
"FATAL",
27+
"INFO",
28+
"NOTSET",
29+
"WARN",
30+
"WARNING",
31+
"StreamHandler",
32+
"basicConfig",
33+
"critical",
34+
"debug",
35+
"error",
36+
"exception",
37+
"getLogger",
38+
"info",
39+
"log",
40+
"root",
41+
"warning",
42+
)
43+
2244

2345
def basicConfig(
2446
style: str = "%",

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name="colorlog",
5-
version="6.4.0",
5+
version="6.4.1",
66
description="Add colours to the output of Python's logging module.",
77
long_description=open("README.md").read(),
88
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)