Skip to content

Commit

Permalink
Fix circular import
Browse files Browse the repository at this point in the history
  • Loading branch information
gizmo385 committed Jan 29, 2025
1 parent adf82d9 commit a906e86
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lazy_github/lib/git_cli.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import re
from subprocess import DEVNULL, PIPE, SubprocessError, check_output, run

from lazy_github.lib.context import LazyGithubContext
from lazy_github.lib.logging import lg

# Regex designed to match [email protected]:gizmo385/lazy-github.git:
Expand All @@ -28,6 +27,8 @@ def current_local_repo_full_name(remote: str = "origin") -> str | None:

def current_local_repo_matches_selected_repo(remote: str = "origin") -> bool:
"""Checks to see if the current repo and the repo selected in LazyGithub are the same"""
from lazy_github.lib.context import LazyGithubContext

if local_repo := current_local_repo_full_name(remote):
return bool(LazyGithubContext.current_repo) and local_repo == LazyGithubContext.current_repo.full_name
else:
Expand Down

0 comments on commit a906e86

Please sign in to comment.