From 9ef3f0ac3d9cec347e72c0a128a5defb7e2e0a91 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005307016 Date: Fri, 25 Oct 2024 21:48:37 -0700 Subject: [PATCH] upgrade pyre version in `fbcode/opensource` - batch 1 (#1024) Summary: Pull Request resolved: https://github.com/facebookincubator/zstrong/pull/1024 Differential Revision: D64977670 fbshipit-source-id: 505d9709aa088f7811e0f4d6d7ba26b07ffdbc94 --- build/fbcode_builder/getdeps/expr.py | 2 ++ build/fbcode_builder/getdeps/platform.py | 1 - build/fbcode_builder/getdeps/py_wheel_builder.py | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build/fbcode_builder/getdeps/expr.py b/build/fbcode_builder/getdeps/expr.py index 0f51521d658..3b3d2d13d8e 100644 --- a/build/fbcode_builder/getdeps/expr.py +++ b/build/fbcode_builder/getdeps/expr.py @@ -151,8 +151,10 @@ def top(self): def ident(self) -> str: ident = self.lex.get_token() + # pyre-fixme[6]: For 2nd argument expected `str` but got `Optional[str]`. if not re.match("[a-zA-Z]+", ident): raise Exception("expected identifier found %s" % ident) + # pyre-fixme[7]: Expected `str` but got `Optional[str]`. return ident def parse_not(self) -> NotExpr: diff --git a/build/fbcode_builder/getdeps/platform.py b/build/fbcode_builder/getdeps/platform.py index 1e021d99235..5e4acdc44e8 100644 --- a/build/fbcode_builder/getdeps/platform.py +++ b/build/fbcode_builder/getdeps/platform.py @@ -216,7 +216,6 @@ def __init__(self, ostype=None, distro=None, distrovers=None) -> None: ostype = "darwin" elif is_windows(): ostype = "windows" - # pyre-fixme[16]: Module `sys` has no attribute `getwindowsversion`. distrovers = str(sys.getwindowsversion().major) elif sys.platform.startswith("freebsd"): ostype = "freebsd" diff --git a/build/fbcode_builder/getdeps/py_wheel_builder.py b/build/fbcode_builder/getdeps/py_wheel_builder.py index 335d74afd1d..7db5f2cb012 100644 --- a/build/fbcode_builder/getdeps/py_wheel_builder.py +++ b/build/fbcode_builder/getdeps/py_wheel_builder.py @@ -95,13 +95,14 @@ # something like the following pip3 command: # pip3 --isolated install --no-cache-dir --no-index --system \ # --target -# pyre-fixme[13] fields initialized in _build class PythonWheelBuilder(BuilderBase): """This Builder can take Python wheel archives and install them as python libraries that can be used by add_fb_python_library()/add_fb_python_executable() CMake rules. """ + # pyre-fixme[13]: Attribute `dist_info_dir` is never initialized. dist_info_dir: str + # pyre-fixme[13]: Attribute `template_format_dict` is never initialized. template_format_dict: Dict[str, str] def _build(self, reconfigure: bool) -> None: