Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit e706887

Browse files
committed
Fix --match to only consider path basename for matching
1 parent d4d9d63 commit e706887

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pydocstyle/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def _get_property_decorators(conf):
288288
# Skip any dirs that do not match match_dir
289289
dirs[:] = [d for d in dirs if match_dir(d)]
290290

291-
for filename in filenames:
291+
for filename in map(os.path.basename, filenames):
292292
if match(filename):
293293
full_path = os.path.join(root, filename)
294294
yield (
@@ -302,7 +302,7 @@ def _get_property_decorators(conf):
302302
match, _ = _get_matches(config)
303303
ignore_decorators = _get_ignore_decorators(config)
304304
property_decorators = _get_property_decorators(config)
305-
if match(name):
305+
if match(os.path.basename(name)):
306306
yield (
307307
name,
308308
list(config.checked_codes),

0 commit comments

Comments
 (0)