-
-
Notifications
You must be signed in to change notification settings - Fork 294
Use constants defined in astroid.const
where applicable
#1372
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
Conversation
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is nice change and also a small perf improvement but also that @cdce8p was against it because it makes it harder to detect sys guard. (We reverted some of it before). I don't have strong opinion about this but I also don't want to enter an edit war.
I left occurrences for imports and redefinition of methods for specific versions, because of that issue. Of course we could still decide against it. I don't mind leaving as is. |
Then I think we could merge if Marc do not react before 2.10. |
Sorry guys! I needed some time to work on different things and just didn't look into any pylint or astroid issues as my backlog was getting larger. Am slowly catching up now, although I probably won't have much free time the next few months. If I'm unresponsive on Github you can usually still reach me on Discord, fyi.
Both mypy and pyright know how to handle If performance is that important to you, I would suggest moving the sys guards one level up. E.g. for the There are some huge drawbacks though. By definition, you'll need to copy a lot of code. With that it will be much more difficult to maintain. That's why I didn't do it when I added the guards for |
As always, no worries! If you have any time to spare on
Fine with me. I just thought I would propose the change and start the discussion. Let's not do this! Thanks @cdce8p for the input! π |
The |
Steps
Description
Something I had on my mind for some time.
Type of Changes
Related Issue