Skip to content

Commit

Permalink
Update vulture/core.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jendrikseipp authored Nov 24, 2024
1 parent 1ab3494 commit 579f7a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vulture/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ def scavenge(self, paths, exclude=None):
def prepare_pattern(pattern):
if pattern.startswith("./") is True:
pattern = os.path.abspath(pattern)
if pattern.endswith(".py") is False:
if os.path.isdir(pattern):
pattern = os.path.join(pattern, "*")
pattern = f"{pattern}/*"
return pattern
if not any(char in pattern for char in "*?["):
Expand Down

0 comments on commit 579f7a4

Please sign in to comment.