Skip to content

Commit af611f7

Browse files
committed
log: Note pydocstyle updates
1 parent e52093e commit af611f7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/tmuxp/log.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,9 @@
3232
def setup_logger(
3333
logger: t.Optional[logging.Logger] = None, level: str = "INFO"
3434
) -> None:
35-
"""
36-
Setup logging for CLI use.
35+
"""Configure tmuxp's logging for CLI use.
3736
38-
Tries to do some conditionals to prevent handlers from being added twice.
39-
Just to be safe.
37+
Can checks for any existing loggers to prevent loading handlers twice.
4038
4139
Parameters
4240
----------
@@ -58,13 +56,16 @@ def set_style(
5856
prefix: str = "",
5957
suffix: str = "",
6058
) -> str:
59+
"""Stylize terminal logging output."""
6160
if stylized:
6261
return prefix + style_before + message + style_after + suffix
6362

6463
return prefix + message + suffix
6564

6665

6766
class LogFormatter(logging.Formatter):
67+
"""Format logs for tmuxp."""
68+
6869
def template(
6970
self: logging.Formatter,
7071
record: logging.LogRecord,
@@ -119,6 +120,7 @@ def __init__(self, color: bool = True, **kwargs: t.Any) -> None:
119120
logging.Formatter.__init__(self, **kwargs)
120121

121122
def format(self, record: logging.LogRecord) -> str:
123+
"""Format a log record."""
122124
try:
123125
record.message = record.getMessage()
124126
except Exception as e:

0 commit comments

Comments
 (0)