Skip to content

Commit 2577188

Browse files
committed
ref: Rename adjust_fields
1 parent 97f101a commit 2577188

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/anking_notetypes/gui/extra_notetype_versions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from ..constants import NOTETYPE_COPY_RE
1010
from ..notetype_setting_definitions import anking_notetype_names
11-
from ..utils import adjust_field_ords, create_backup
11+
from ..utils import adjust_fields, create_backup
1212

1313

1414
def handle_extra_notetype_versions() -> None:
@@ -72,7 +72,7 @@ def convert_extra_notetypes(
7272
new_model["id"] = model_copy["id"]
7373
new_model["name"] = model_copy["name"] # to prevent duplicates
7474
new_model["usn"] = -1 # triggers full sync
75-
new_model["flds"] = adjust_field_ords(model_copy["flds"], new_model["flds"])
75+
new_model["flds"] = adjust_fields(model_copy["flds"], new_model["flds"])
7676
mw.col.models.update_dict(new_model)
7777

7878
# change the notes of type <notetype_copy> to type <notetype>

src/anking_notetypes/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def update_notetype_to_newest_version(
3434
if ankihub_field:
3535
new_model["flds"].append(ankihub_field)
3636

37-
new_model["flds"] = adjust_field_ords(model["flds"], new_model["flds"])
37+
new_model["flds"] = adjust_fields(model["flds"], new_model["flds"])
3838

3939
new_model = _retain_ankihub_modifications(model, new_model)
4040

@@ -109,7 +109,7 @@ def _updated_note_type_content(
109109
)
110110

111111

112-
def adjust_field_ords(
112+
def adjust_fields(
113113
cur_model_fields: List[Dict], new_model_fields: List[Dict]
114114
) -> List[Dict]:
115115
"""

0 commit comments

Comments
 (0)