run pyupgrade
This commit is contained in:
parent
670986db1c
commit
6f9eda3c3a
|
@ -8,6 +8,8 @@ A collection of user-created note types for Anki 2.1. It includes a super user-f
|
|||
|
||||
## Usage
|
||||
|
||||
Install [Python](https://wiki.archlinux.org/title/Python) 3.10 or later if you haven't already.
|
||||
|
||||
Clone the repository and `cd` into it.
|
||||
If you have never cloned a repository before,
|
||||
you need to install [git](https://git-scm.com/).
|
||||
|
|
|
@ -34,7 +34,7 @@ def read_num(msg: str = "Input number: ", min_val: int = 0, max_val: int = None)
|
|||
return resp
|
||||
|
||||
|
||||
def select(items: list[str], msg: str = "Select item number: ") -> Optional[str]:
|
||||
def select(items: list[str], msg: str = "Select item number: ") -> str | None:
|
||||
if not items:
|
||||
print("Nothing to show.")
|
||||
return
|
||||
|
|
|
@ -25,7 +25,7 @@ def read_card_templates(model_dir_name: str, template_names: list[str]) -> list[
|
|||
|
||||
|
||||
def read_model(model_dir_name: str) -> NoteType:
|
||||
with open(os.path.join(NOTE_TYPES_DIR, model_dir_name, JSON_FILENAME), 'r') as f:
|
||||
with open(os.path.join(NOTE_TYPES_DIR, model_dir_name, JSON_FILENAME)) as f:
|
||||
model_dict = json.load(f)
|
||||
|
||||
return NoteType(
|
||||
|
|
Loading…
Reference in a new issue