Skip to content

Conversation

zenlyj
Copy link
Contributor

@zenlyj zenlyj commented Sep 27, 2025

Type of Changes

Type
πŸ› Bug fix
βœ“ ✨ New feature
πŸ”¨ Refactoring
πŸ“œ Docs

Description

Currently constraints are only applied to regular If statements, this is a minor change to support ternary expressions as well. It is expected to have identical behavior as If.

Refs pylint-dev/pylint#9729

Copy link

codecov bot commented Sep 27, 2025

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 93.37%. Comparing base (fe09b02) to head (40da80d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2836   +/-   ##
=======================================
  Coverage   93.37%   93.37%           
=======================================
  Files          92       92           
  Lines       11148    11148           
=======================================
  Hits        10409    10409           
  Misses        739      739           
Flag Coverage Ξ”
linux 93.23% <100.00%> (ΓΈ)
pypy 93.37% <100.00%> (ΓΈ)
windows 93.35% <100.00%> (ΓΈ)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Ξ”
astroid/constraint.py 100.00% <100.00%> (ΓΈ)
astroid/context.py 97.43% <100.00%> (ΓΈ)
πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great !

@Pierre-Sassoulas Pierre-Sassoulas added this to the 4.0.0 milestone Sep 27, 2025
@Pierre-Sassoulas
Copy link
Member

(Changed closes to refs in the PR description so that we close the related pylint issue only when we add a test case for it after upgrading astroid)

@zenlyj
Copy link
Contributor Author

zenlyj commented Sep 27, 2025

got it, shall we do the same for change log as well?

@Pierre-Sassoulas
Copy link
Member

No, it's only for the github side where it's tricky to remember to add automated test if we close as soon as it's fixed in astroid.

@Pierre-Sassoulas Pierre-Sassoulas merged commit 0367141 into pylint-dev:main Sep 28, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants