Skip to content

Add new If guard helper methods #1099

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 13, 2021

Conversation

cdce8p
Copy link
Member

@cdce8p cdce8p commented Jul 13, 2021

Description

Add If.is_sys_guard and If.is_typing_guard helper methods. Most useful to check if analysis of the if body should be skipped, e.g. because module are not available for the checked python version.

Type of Changes

Type
✨ New feature

Related Issue

pylint-dev/pylint#4702
pylint-dev/pylint#4703

@cdce8p
Copy link
Member Author

cdce8p commented Jul 13, 2021

As this is technically a new feature, should it go in 2.7.0 or can we include it in 2.6.3?

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.

👍

@Pierre-Sassoulas Pierre-Sassoulas added the Enhancement ✨ Improvement to a component label Jul 13, 2021
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.7.0 milestone Jul 13, 2021
@Pierre-Sassoulas
Copy link
Member

This is useful enough that I want it asap in pylint but it's true it's a new feature. I would not mind having it in 2.6.3 though.

@Pierre-Sassoulas
Copy link
Member

I think it would force us to release astroid 2.7.0 very fast, so we can put pylint-dev/pylint#4702 in pylint 2.10.

@Pierre-Sassoulas
Copy link
Member

Moving this to 2.6.3 and merging because we need it for pylint-dev/pylint#4703 that is in pylint 2.9.4.

@Pierre-Sassoulas Pierre-Sassoulas modified the milestones: 2.7.0, 2.6.3 Jul 13, 2021
@Pierre-Sassoulas Pierre-Sassoulas merged commit a7e55b4 into pylint-dev:main Jul 13, 2021
@cdce8p cdce8p deleted the if-guard-checks branch July 13, 2021 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ✨ Improvement to a component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants