Skip to content

release: v7.11.1 — honest Multiplicity.max typing + idiomatic empty lists#568

Merged
ArmenSl merged 5 commits into
masterfrom
development
Jul 6, 2026
Merged

release: v7.11.1 — honest Multiplicity.max typing + idiomatic empty lists#568
ArmenSl merged 5 commits into
masterfrom
development

Conversation

@ArmenSl

@ArmenSl ArmenSl commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Multiplicity.max honest typing (fix(structural): honest multiplicity max types and idiomatic empty lists #564): the constructor and max setter now declare int | Literal["*"] (the setter already normalizes "*"UNLIMITED_MAX_MULTIPLICITY); the getter stays int. Fixes a false type error for callers/checkers passing "*".
  • list()[] in Method parameter/pre/post init (SonarQube python:S7498).
  • No runtime behaviour change; no metamodel/API contract change. Thanks @ichxorya (first contribution).

Test plan

  • structural.py imports on 3.11 (int | Literal["*"] is import-time-evaluated; PEP 604, safe 3.10–3.12)
  • Multiplicity(1, "*").max9999; Method() → empty [] lists
  • Structural metamodel suite (61) + new label/SVG tests (10) pass
  • Docs build: v7.11.1 page renders

ichxorya and others added 5 commits July 6, 2026 15:25
- Update Multiplicity and Method classes to support Literal["*"] for max multiplicity

- Change `list()` to `[]` per the suggested Sonarqube rule for code quality (https://next.sonarqube.com/sonarqube/coding_rules?open=python%3AS7498&rule_key=python%3AS7498)
The max setter normalises * to UNLIMITED_MAX_MULTIPLICITY, so the stored
value and getter are always int. Keep the setter/__init__ input as
int | Literal["*"] (it genuinely accepts "*"), but annotate the stored
attribute and getter as int to reflect what is actually returned.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fix(structural): honest multiplicity max types and idiomatic empty lists
…ists

- Bump setup.cfg 7.11.0 -> 7.11.1 and add v7.11.1 release notes.
- Backend: Multiplicity.max input typing (int | Literal["*"]) and list() -> []
  in Method init/pre/post (#564, thanks @ichxorya). No runtime change.
@ArmenSl ArmenSl merged commit 9a8044c into master Jul 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants