From c5db96e0516a9ed83e7d46ec0d8bc68760e229d8 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 28 Aug 2022 10:53:14 -0400 Subject: 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. --- mesonbuild/dependencies/dev.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py index c2b1a08..12866ee 100644 --- a/mesonbuild/dependencies/dev.py +++ b/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', '') -- cgit v1.1