Skip to content

Commit

Permalink
Apply minor fixes before the release of v3.7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
PawelLipski committed Jun 24, 2023
1 parent 6d836b9 commit 2727086
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion git_machete/git_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def __init__(self) -> None:
self.__tree_hash_by_commit_hash_cached: Optional[Dict[FullCommitHash, Optional[FullTreeHash]]] = None

def flush_caches(self) -> None:
if self.owner:
if self.owner: # pragma: no branch
self.owner.flush_caches()
self.__commit_hash_by_revision_cached = None
self.__committer_unix_timestamp_by_revision_cached = None
Expand Down
13 changes: 5 additions & 8 deletions tests/mockers.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,9 @@ def mock_input_returning_y(msg: str) -> str:


def mock_input_returning(*answers: str) -> Callable[[str], str]:
class Wrapper(object):
def __init__(self) -> None:
self.gen = (ans for ans in answers)
gen = (ans for ans in answers)

def __call__(self, msg: str) -> str:
print(msg)
return next(self.gen)

return Wrapper()
def inner(msg: str) -> str:
print(msg)
return next(gen)
return inner

0 comments on commit 2727086

Please sign in to comment.