Skip to content

Commit 3b87def

Browse files
jherlandmknorps
andauthored
Rename is_valid_*_source() to validate_*_source()
Co-authored-by: Maria Knorps <[email protected]>
1 parent 5a774bc commit 3b87def

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

fawltydeps/extract_declared_dependencies.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ def parse_sources(
368368
yield from parse_source(source, parser_choice=parser_choice)
369369

370370

371-
def is_valid_deps_source(
371+
def validate_deps_source(
372372
path: Path,
373373
parser_choice: Optional[ParserChoice] = None,
374374
filter_by_parser: bool = False,

fawltydeps/extract_imports.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def parse_sources(
209209
yield from parse_source(source, stdin)
210210

211211

212-
def is_valid_code_source(
212+
def validate_code_source(
213213
path: PathOrSpecial, base_dir: Optional[Path] = None
214214
) -> Optional[CodeSource]:
215215
"""Check if the given file path is a valid source for parsing imports.

fawltydeps/traverse_project.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def find_sources(
2626
dirs_to_traverse: Dict[Path, Set[Type[Source]]] = {}
2727

2828
for path in settings.code if CodeSource in source_types else []:
29-
validated: Optional[Source] = is_valid_code_source(path) # propagate exceptions
29+
validated: Optional[Source] = validate_code_source(path) # propagate exceptions
3030
if validated is not None: # parse-able file given directly
3131
assert isinstance(validated, CodeSource) # sanity check
3232
yield validated
@@ -35,7 +35,7 @@ def find_sources(
3535
dirs_to_traverse.setdefault(path, set()).add(CodeSource)
3636

3737
for path in settings.deps if DepsSource in source_types else []:
38-
validated = is_valid_deps_source(
38+
validated = validate_deps_source(
3939
path, settings.deps_parser_choice, filter_by_parser=False
4040
) # propagate exceptions
4141
if validated is not None: # parse-able file given directly

0 commit comments

Comments
 (0)