|
17 | 17 | from rich.table import Table |
18 | 18 | from rich.text import Text |
19 | 19 |
|
20 | | -if TYPE_CHECKING: |
21 | | - from anki.notes import NoteId |
22 | | - from anki.cards import CardId |
23 | 20 |
|
24 | 21 | from apyanki import cards |
25 | 22 | from apyanki.config import cfg |
@@ -272,7 +269,7 @@ def change_model(self) -> Optional[Note]: |
272 | 269 | console.clear() |
273 | 270 | console.print("Please choose new model:") |
274 | 271 | for n, m in enumerate(models): |
275 | | - console.print(f" {n+1}: {m}") |
| 272 | + console.print(f" {n + 1}: {m}") |
276 | 273 | index: int = console.prompt_int(">>> ", suffix="") - 1 |
277 | 274 | try: |
278 | 275 | new_model = models[index] |
@@ -452,9 +449,9 @@ def review( |
452 | 449 | note_number_string = "" |
453 | 450 | if i is not None: |
454 | 451 | if number_of_notes: |
455 | | - note_number_string = f" {i+1} of {number_of_notes}" |
| 452 | + note_number_string = f" {i + 1} of {number_of_notes}" |
456 | 453 | else: |
457 | | - note_number_string = f" {i+1}" |
| 454 | + note_number_string = f" {i + 1}" |
458 | 455 |
|
459 | 456 | menu = Columns( |
460 | 457 | [ |
@@ -590,7 +587,7 @@ def add_to_collection(self, anki: Anki) -> Note: |
590 | 587 | field_names = [x.replace(" (markdown)", "") for x in self.fields.keys()] |
591 | 588 | for x, y in zip(model_field_names, field_names): |
592 | 589 | if x != y: |
593 | | - console.print("Warning: Inconsistent field names " f"({x} != {y})") |
| 590 | + console.print(f"Warning: Inconsistent field names ({x} != {y})") |
594 | 591 |
|
595 | 592 | notetype = anki.col.models.current(for_deck=False) |
596 | 593 | new_note = anki.col.new_note(notetype) |
|
0 commit comments