Skip to content

Commit

Permalink
Sort imports, pass flake8 by adding __all__ to colorlog.wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
borntyping committed Aug 23, 2021
1 parent 194fd9d commit feb4652
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 21 deletions.
36 changes: 18 additions & 18 deletions colorlog/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,30 @@
)

__all__ = (
"CRITICAL",
"DEBUG",
"ERROR",
"FATAL",
"INFO",
"NOTSET",
"WARN",
"WARNING",
"ColoredFormatter",
"default_log_colors",
"LevelFormatter",
"StreamHandler",
"TTYColoredFormatter",
"basicConfig",
"root",
"getLogger",
"critical",
"debug",
"info",
"warning",
"default_log_colors",
"error",
"exception",
"critical",
"log",
"exception",
"StreamHandler",
"LevelFormatter",
"TTYColoredFormatter",
"CRITICAL",
"FATAL",
"ERROR",
"WARNING",
"WARN",
"INFO",
"DEBUG",
"NOTSET",
"getLogger",
"info",
"log",
"root",
"warning",
)

if sys.version_info < (3, 6):
Expand Down
4 changes: 2 additions & 2 deletions colorlog/tests/test_escape_codes.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""Test the colorlog.escape_codes module."""

from colorlog.escape_codes import escape_codes, esc, parse_colors

import pytest

from colorlog.escape_codes import esc, escape_codes, parse_colors


def test_esc():
assert esc(1, 2, 3) == "\033[1;2;3m"
Expand Down
22 changes: 22 additions & 0 deletions colorlog/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,28 @@

import colorlog.formatter

__all__ = (
"CRITICAL",
"DEBUG",
"ERROR",
"FATAL",
"INFO",
"NOTSET",
"WARN",
"WARNING",
"StreamHandler",
"basicConfig",
"critical",
"debug",
"error",
"exception",
"getLogger",
"info",
"log",
"root",
"warning",
)


def basicConfig(
style: str = "%",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="colorlog",
version="6.4.0",
version="6.4.1",
description="Add colours to the output of Python's logging module.",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
Expand Down

0 comments on commit feb4652

Please sign in to comment.