Skip to content

Commit

Permalink
Avoid multiple 'zettel' in imported name
Browse files Browse the repository at this point in the history
  • Loading branch information
tpwo committed Nov 8, 2023
1 parent 1da578c commit 5249f79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/pyzet/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
from pyzet.utils import Config
from pyzet.utils import get_git_output
from pyzet.utils import get_git_remote_url
from pyzet.zettel import get_zettel_repr


def main(argv: list[str] | None = None) -> int:
Expand Down Expand Up @@ -315,7 +314,7 @@ def get_remote_url(args: Namespace, config: Config) -> int:

def list_zettels(args: Namespace, path: Path) -> int:
for zet in zettel.get_all(Path(path, C.ZETDIR), args.reverse):
print(get_zettel_repr(zet, args))
print(zettel.get_repr(zet, args))
return 0


Expand Down
4 changes: 2 additions & 2 deletions src/pyzet/zettel.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def get_from_grep(args: Namespace, config: Config) -> Zettel:

print(f'Found {len(matches)} matches:')
for idx, zet in matches.items():
print(f'[{idx}] {get_zettel_repr(zet, args)}')
print(f'[{idx}] {get_repr(zet, args)}')

try:
user_input = input('Open (press enter to cancel): ')
Expand Down Expand Up @@ -148,7 +148,7 @@ def get(path: Path) -> Zettel:
return zettel


def get_zettel_repr(zet: Zettel, args: Namespace) -> str:
def get_repr(zet: Zettel, args: Namespace) -> str:
tags = ''
if args.tags:
try:
Expand Down

0 comments on commit 5249f79

Please sign in to comment.