Skip to content

Commit

Permalink
Fixed flake8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ubmarco committed Dec 20, 2021
1 parent ec3c1e6 commit 4a2d2f6
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 49 deletions.
2 changes: 1 addition & 1 deletion libpdf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:copyright: © 2020 by team useblocks
:license: MIT, see LICENSE for more details
"""
""" # noqa: RST399, RST201 # needed for autodoc
try:
import importlib_metadata # Python 3.6 and 3.7
except ImportError:
Expand Down
4 changes: 2 additions & 2 deletions libpdf/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,11 @@ def handle_parse_result(self, ctx, opts, args):
@docstring_parameter(__version__, __summary__)
# flake8 ignore of docstring issues D400 (end with period) and D403 (first word capitalized) not reasonable here
# as the docstring is used by click in the CLI help page
def main_cli(**kwargs): # noqa: D400, D403
def main_cli(**kwargs):
"""libpdf version {0}: {1}
The argument PDF points to the PDF path that shall be extracted.
"""
""" # noqa: D400, D403
config_logger(cli=True)
set_log_level(kwargs['verbose']) # if not given it's 0 which means log level ERROR
main(**kwargs, cli_usage=True)
Expand Down
4 changes: 2 additions & 2 deletions libpdf/models/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


# need to ignore flake8 errors because sphinx.autodoc sees the multiline as one line. It is actually the summary line.
class Element(ModelBase, ABC): # noqa: D205, D400
class Element(ModelBase, ABC):
"""
Base class for :class:`~libpdf.models.chapter.Chapter`,
:class:`~libpdf.models.paragraph.Paragraph`, :class:`~libpdf.models.table.Table` and
Expand All @@ -27,7 +27,7 @@ class Element(ModelBase, ABC): # noqa: D205, D400
:vartype b_root: Root
:ivar b_chapter: parent Chapter instance (mutually exclusive with the b_root parameter)
:vartype b_chapter: Chapter
"""
""" # noqa: D205, D400

def __init__(
self,
Expand Down
86 changes: 43 additions & 43 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ per-file-ignores=
# needed to
libpdf/__init__.py:D205,D400
ignore=
B902 # blind except: prefer pylint
P101 # flake8-string-format: format string does contain unindexed parameters
W503 # line break before binary operator (black prefers this style)
RST304 # Unknown interpreted text role (comes up often for ref, class)
W503 # line break before binary operator (black prefers this style)

[pytest]
testpaths = tests

0 comments on commit 4a2d2f6

Please sign in to comment.