Skip to content
This repository has been archived by the owner on Jan 7, 2025. It is now read-only.

Commit

Permalink
Merge pull request #386 from FollowTheProcess/find-spinner
Browse files Browse the repository at this point in the history
Add a progress spinner to the find command
  • Loading branch information
FollowTheProcess authored Dec 16, 2021
2 parents 3316e18 + 69b1897 commit a973fb2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pytoil/cli/find.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,16 @@ def find(

api = API(username=config.username, token=config.token)

local_projects = utils.get_local_projects(path=config.projects_dir)
remote_projects = api.get_repo_names()
with msg.loading("Searching your projects..."):

all_projects = local_projects.union(remote_projects)
local_projects = utils.get_local_projects(path=config.projects_dir)
remote_projects = api.get_repo_names()

matches: List[Tuple[str, int]] = process.extractBests(
project, all_projects, limit=results, score_cutoff=FUZZY_SCORE_CUTOFF
)
all_projects = local_projects.union(remote_projects)

matches: List[Tuple[str, int]] = process.extractBests(
project, all_projects, limit=results, score_cutoff=FUZZY_SCORE_CUTOFF
)

table = Table(box=box.SIMPLE)
table.add_column("Project", style="cyan", justify="center")
Expand Down

0 comments on commit a973fb2

Please sign in to comment.