Skip to content

Rewrite negated None checks in Python - #874

Merged
mristin merged 1 commit into
mainfrom
mristin/Rewrite-negated-None-checks-in-Python
Oct 31, 2026
Merged

mristin merged 1 commit into
mainfrom
mristin/Rewrite-negated-None-checks-in-Python

Conversation

@mristin

@mristin mristin commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

We transpile not (x is None) in the meta-model to x is not None in the generated Python code, since ruff flags the former (E714).

We test it with text_is_given in the common meta-model optional_arguments.

We transpile ``not (x is None)`` in the meta-model to ``x is not None``
in the generated Python code, since ruff flags the former (E714).

We test it with ``text_is_given`` in the common meta-model
``optional_arguments``.
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 41217645691

Coverage remained the same at 90.251%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: 2 of 2 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 51492
Covered Lines: 46472
Line Coverage: 90.25%
Coverage Strength: 2.71 hits per line

💛 - Coveralls

@mristin
mristin merged commit d3167ed into main Oct 31, 2026
5 checks passed
@mristin
mristin deleted the mristin/Rewrite-negated-None-checks-in-Python branch October 31, 2026 17:33
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