We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 218c7eb commit 924ae0fCopy full SHA for 924ae0f
src/vcspull/config.py
@@ -341,13 +341,13 @@ def in_dir(
341
"""
342
if extensions is None:
343
extensions = [".yml", ".yaml", ".json"]
344
- if config_dir is not None:
+ if config_dir is None:
345
config_dir = get_config_dir()
346
347
return [
348
- filename
349
- for filename in os.listdir(config_dir)
350
- if is_config_file(filename, extensions) and not filename.startswith(".")
+ path.name
+ for path in config_dir.iterdir()
+ if is_config_file(path.name, extensions) and not path.name.startswith(".")
351
]
352
353
0 commit comments