Skip to content

Commit

Permalink
reformmated main
Browse files Browse the repository at this point in the history
  • Loading branch information
VitalJoseph committed Oct 20, 2023
1 parent 52093f4 commit 8ddb986
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions chasten/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def analyze( # noqa: PLR0913, PLR0915
"--xpath-version",
"-xp",
help="Accepts different xpath version, runs xpath version two by default.",
),
),
check_include: Tuple[enumerations.FilterableAttribute, str, int] = typer.Option(
(None, None, 0),
"--check-include",
Expand Down Expand Up @@ -552,9 +552,13 @@ def analyze( # noqa: PLR0913, PLR0915
# this looks for matches across all path(s) in the specified source path

if xpath == "1.0":
match_generator = pyastgrepsearch.search_python_files(paths=valid_directories, expression=current_xpath_pattern, xpath2=False)
match_generator = pyastgrepsearch.search_python_files(
paths=valid_directories, expression=current_xpath_pattern, xpath2=False
)
else:
match_generator = pyastgrepsearch.search_python_files(paths=valid_directories, expression=current_xpath_pattern, xpath2=True)
match_generator = pyastgrepsearch.search_python_files(
paths=valid_directories, expression=current_xpath_pattern, xpath2=True
)

# materialize a list from the generator of (potential) matches;
# note that this list will also contain an object that will
Expand Down Expand Up @@ -685,7 +689,9 @@ def analyze( # noqa: PLR0913, PLR0915
if not all_checks_passed:
output.console.print("\n:sweat: At least one check did not pass.")
sys.exit(constants.markers.Non_Zero_Exit)
output.console.print(f"\n:joy: All checks passed. Elapsed Time: {elapsed_time} seconds")
output.console.print(
f"\n:joy: All checks passed. Elapsed Time: {elapsed_time} seconds"
)


@cli.command()
Expand Down

0 comments on commit 8ddb986

Please sign in to comment.