Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pylama/lint/pylama_pydocstyle.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""pydocstyle support."""

from argparse import ArgumentParser
from re import compile

from pydocstyle import ConventionChecker as PyDocChecker
from pydocstyle.violations import conventions
Expand Down Expand Up @@ -30,10 +31,11 @@ def run_check(self, ctx: RunContext): # noqa
if options and options.pydocstyle_convention:
params.setdefault("convention", options.pydocstyle_convention)
convention_codes = conventions.get(params.get("convention"))
ignore_decorators_param = params.get("ignore_decorators")
for err in PyDocChecker().check_source(
ctx.source,
ctx.filename,
params.get("ignore_decorators"),
compile(ignore_decorators_param) if ignore_decorators_param is not None else None,
params.get("ignore_inline_noqa", False),
):
if convention_codes is None or err.code in convention_codes:
Expand Down