Label ids first in each JSON line (D-131)
ids.py puts the id first and never re-gives an id retired in the same operation; labeling.py keeps it first on add and edit; controle.py requires it first. Cross-review apply: a modified label keeps its id, and revue is today's date. All 991 auto labels reordered, content unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1f2d7efad2
commit
4084cada20
16 files changed
+1026
-1008
No files matched your search
@@ -380,8 +380,10 @@ def modifier(corps):
|
||||
if not description or datetime.strptime(debut, FORMAT) >= datetime.strptime(fin, FORMAT):
|
||||
raise ValueError("empty text or range")
|
||||
c = categorie(corps) if "categorie" in corps else avant.get("categorie", "")
|
||||
# debut, fin, categorie en tête, comme à l'Add ; les autres champs à leur place
|
||||
label = dict.fromkeys(("debut", "fin", "categorie")) | avant | {"debut": debut, "fin": fin, "categorie": c, "description": description}
|
||||
# l'id d'abord (D-131), puis debut, fin, categorie, comme à l'Add ; les autres champs à leur place
|
||||
label = dict.fromkeys(("id", "debut", "fin", "categorie")) | avant | {"debut": debut, "fin": fin, "categorie": c, "description": description}
|
||||
if label["id"] is None:
|
||||
del label["id"]
|
||||
if not c:
|
||||
del label["categorie"]
|
||||
label.pop("revue", None) # texte, catégorie ou bornes changés : à revoir par /review-labels (D-103)
|
||||
|
||||
Reference in new issue
Block a user