• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

eclipse-aascw / aas-core-codegen / 36609585606
90%

Build:
DEFAULT BRANCH: main
Ran 29 Sep 2026 06:12PM UTC
Jobs 3
Files 308
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Sep 2026 06:05PM UTC coverage: 88.907% (+0.2%) from 88.694%
36609585606

push

github

web-flow
Transpile annotated assignments (#795)

We transpile the declarations of the local variables with type
annotations, so that a variable can be declared wider than its initial
value, *e.g.*, as an optional initialized with ``None``:

    found: Optional[Child_a] = None
    for parent in parents:
        if isinstance(parent, Child_a):
            found = parent
            break

The annotations cover the primitive types, our types including
the named unions, and ``Optional``, ``List``, ``Sequence`` and ``Tuple``
of them. We refuse inline ``Union[...]`` and explain that only
the named unions are accepted, as the targets need a named type for
a union. As mypy, we do not narrow a declared variable by its initial
value, only by the subsequent assignments.

``None`` is now a literal, allowed as the value of an assignment, as
an optional argument and as the value returned from a function
returning an optional. An assignment of ``None`` no longer marks
the variable as non-null.

An instance of a class can be assigned to a named union, variable or
property, and the targets wrap it into the most specific root, *e.g.*,
``Aas.ParentOrItem.FromParent(...)`` in C#.

The type inference records the declared type of a variable on
the assignment target, and the return type of the function on
the return statement, so that the targets unwrap a narrowed optional
only when the function returns a non-optional.

The common meta-model ``annotated_assignments`` covers the feature.

414 of 459 new or added lines in 14 files covered. (90.2%)

1 existing line in 1 file now uncovered.

43126 of 48507 relevant lines covered (88.91%)

2.67 hits per line

Uncovered Changes

Lines Coverage ∆ File
9
80.72
0.83% aas_core_codegen/csharp/transpilation.py
9
85.77
1.56% aas_core_codegen/intermediate/type_inference.py
7
79.69
0.47% aas_core_codegen/typescript/transpilation.py
6
76.07
0.61% aas_core_codegen/python/transpilation.py
5
77.43
2.5% aas_core_codegen/cpp/transpilation.py
4
81.82
3.72% aas_core_codegen/java/transpilation.py
2
95.21
-0.63% aas_core_codegen/cpp/aliasing.py
2
88.15
0.1% aas_core_codegen/parse/_rules.py
1
81.05
2.34% aas_core_codegen/golang/transpilation.py

Coverage Regressions

Lines Coverage ∆ File
1
81.05
2.34% aas_core_codegen/golang/transpilation.py
Jobs
ID Job ID Ran Files Coverage
1 3.12 - 36609585606.1 29 Sep 2026 06:14PM UTC 308
88.91
GitHub Action Run
2 3.11 - 36609585606.2 29 Sep 2026 06:14PM UTC 308
88.91
GitHub Action Run
3 3.10 - 36609585606.3 29 Sep 2026 06:14PM UTC 308
88.91
GitHub Action Run
Source Files on build 36609585606
  • Tree
  • List 308
  • Changed 19
  • Source Changed 0
  • Coverage Changed 19
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 9c03a682 on github
  • Prev Build on main (#36572277213)
  • Next Build on main (#36634104500)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc