slight lint

This commit is contained in:
Casper da Costa-Luis 2024-08-03 22:36:53 +01:00
parent 5ba65950bd
commit 43230f6095
No known key found for this signature in database
GPG Key ID: F5126E5FBD2512AD
1 changed files with 4 additions and 6 deletions

View File

@ -4,8 +4,8 @@ Module version for monitoring CLI pipes (`... | python -m tqdm | ...`).
import logging
import re
import sys
import textwrap
from ast import literal_eval as numeric
from textwrap import indent
from .std import TqdmKeyError, TqdmTypeError, tqdm
from .version import __version__
@ -178,11 +178,9 @@ def main(fp=sys.stderr, argv=None):
logging.basicConfig(level=getattr(logging, logLevel),
format="%(levelname)s:%(module)s:%(lineno)d:%(message)s")
d = tqdm.__doc__
if sys.version_info >= (3, 13):
# Python 3.13+ automatically dedents docstrings
d = textwrap.indent(d, " ")
d += CLI_EXTRA_DOC
# py<3.13 doesn't dedent docstrings
d = (tqdm.__doc__ if sys.version_info < (3, 13)
else indent(tqdm.__doc__, " ")) + CLI_EXTRA_DOC
opt_types = dict(RE_OPTS.findall(d))
# opt_types['delim'] = 'chr'