-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
interpreter: void holder #9512
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
base: master
Are you sure you want to change the base?
interpreter: void holder #9512
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9512 +/- ##
=======================================
Coverage 67.33% 67.33%
=======================================
Files 396 398 +2
Lines 85539 85563 +24
Branches 17667 17665 -2
=======================================
+ Hits 57599 57617 +18
- Misses 23255 23261 +6
Partials 4685 4685 ☔ View full report in Codecov by Sentry. |
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.
A couple of small nits, but otherwise this is a nice change.
@property | ||
def is_assignable(self) -> bool: | ||
''' Property used to indicate whether an object can be used at all ''' | ||
return True |
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.
properties are really slow, you generally want to avoid using them if at all possible, I'd make this a class variable instead, set the base class to True
, and have the VoidHolder
class override it in its class definition.
@@ -0,0 +1,16 @@ | |||
# Copyright 2021 The Meson development team | |||
# SPDX-license-identifier: Apache-2.0 |
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.
# SPDX-license-identifier: Apache-2.0 | |
# SPDX-License-Identifier: Apache-2.0 |
The goal of this refactoring is to slightly simplify the logic in
InterpreterBase
by ensuring that evenNone
now has a corresponding holder. This way we no longer have to check for it and can always assume that we are dealing withInterpreterObject
s.