flake8: fix typing casts to not have actual objects

We use `__future__.annotations` to good effect everywhere we can, and
one of the effects of this is that annotations are automatically
stringized and don't need to be evaluated, using less memory and
computation. But this only affects actual annotations -- a cast is just
a function with an argument, so the compiler has no idea that it's an
annotation to be stringized.

Do this manually.
pull/10757/head
Eli Schwartz 2 years ago committed by Jussi Pakkanen
parent f4cc60bf20
commit c5db96e051
  1. 2
      mesonbuild/dependencies/dev.py

@ -529,7 +529,7 @@ class ZlibSystemDependency(SystemDependency):
class JNISystemDependency(SystemDependency):
def __init__(self, environment: 'Environment', kwargs: JNISystemDependencyKW):
super().__init__('jni', environment, T.cast(T.Dict[str, T.Any], kwargs))
super().__init__('jni', environment, T.cast('T.Dict[str, T.Any]', kwargs))
self.feature_since = ('0.62.0', '')

Loading…
Cancel
Save