diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-03-01 23:32:14 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-03-07 19:01:04 -0500 |
commit | a009eacc65ddb447edcfc9fd317ad828d9b3353a (patch) | |
tree | ae1c6388bfa45eb0672bbed1d8f18ebe0b3c2819 /mesonbuild/interpreter/interpreterobjects.py | |
parent | 187dc656f48ba7a86a14a5c8d9f16a3b2b7d8770 (diff) | |
download | meson-a009eacc65ddb447edcfc9fd317ad828d9b3353a.zip meson-a009eacc65ddb447edcfc9fd317ad828d9b3353a.tar.gz meson-a009eacc65ddb447edcfc9fd317ad828d9b3353a.tar.bz2 |
treewide: string-quote the first argument to T.cast
Using future annotations, type annotations become strings at runtime and
don't impact performance. This is not possible to do with T.cast though,
because it is a function argument instead of an annotation.
Quote the type argument everywhere in order to have the same effect as
future annotations. This also allows linters to better detect in some
cases that a given import is typing-only.
Diffstat (limited to 'mesonbuild/interpreter/interpreterobjects.py')
-rw-r--r-- | mesonbuild/interpreter/interpreterobjects.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/interpreter/interpreterobjects.py b/mesonbuild/interpreter/interpreterobjects.py index d3a4b12..570e031 100644 --- a/mesonbuild/interpreter/interpreterobjects.py +++ b/mesonbuild/interpreter/interpreterobjects.py @@ -88,7 +88,7 @@ class FeatureOptionHolder(ObjectHolder[coredata.UserFeatureOption]): super().__init__(option, interpreter) if option and option.is_auto(): # TODO: we need to case here because options is not a TypedDict - self.held_object = T.cast(coredata.UserFeatureOption, self.env.coredata.options[OptionKey('auto_features')]) + self.held_object = T.cast('coredata.UserFeatureOption', self.env.coredata.options[OptionKey('auto_features')]) self.held_object.name = option.name self.methods.update({'enabled': self.enabled_method, 'disabled': self.disabled_method, |