From 8cd984b3cb1c684f3ffa43dc2ddef27b74dd32ed Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Tue, 21 Nov 2023 15:33:14 -0600 Subject: [PATCH] SCons: Update mypy --- .gitignore | 3 +++ gles3_builders.py | 2 +- glsl_builders.py | 4 ++-- misc/scripts/mypy.ini | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 61ea171b8b8..3c6f279a9c4 100644 --- a/.gitignore +++ b/.gitignore @@ -153,6 +153,9 @@ gmon.out # Kdevelop *.kdev4 +# Mypy +.mypy_cache + # Qt Creator *.config *.creator diff --git a/gles3_builders.py b/gles3_builders.py index 10d7e5bb4c7..055451f298a 100644 --- a/gles3_builders.py +++ b/gles3_builders.py @@ -199,7 +199,7 @@ def build_gles3_header( filename: str, include: str, class_suffix: str, - optional_output_filename: str = None, + optional_output_filename: Optional[str] = None, header_data: Optional[GLES3HeaderStruct] = None, ): header_data = header_data or GLES3HeaderStruct() diff --git a/glsl_builders.py b/glsl_builders.py index 706b50636e5..a6ca9aa2f3b 100644 --- a/glsl_builders.py +++ b/glsl_builders.py @@ -114,7 +114,7 @@ def include_file_in_rd_header(filename: str, header_data: RDHeaderStruct, depth: def build_rd_header( - filename: str, optional_output_filename: str = None, header_data: Optional[RDHeaderStruct] = None + filename: str, optional_output_filename: Optional[str] = None, header_data: Optional[RDHeaderStruct] = None ) -> None: header_data = header_data or RDHeaderStruct() include_file_in_rd_header(filename, header_data, 0) @@ -198,7 +198,7 @@ def include_file_in_raw_header(filename: str, header_data: RAWHeaderStruct, dept def build_raw_header( - filename: str, optional_output_filename: str = None, header_data: Optional[RAWHeaderStruct] = None + filename: str, optional_output_filename: Optional[str] = None, header_data: Optional[RAWHeaderStruct] = None ): header_data = header_data or RAWHeaderStruct() include_file_in_raw_header(filename, header_data, 0) diff --git a/misc/scripts/mypy.ini b/misc/scripts/mypy.ini index b3323eacda5..45f048f1184 100644 --- a/misc/scripts/mypy.ini +++ b/misc/scripts/mypy.ini @@ -1,6 +1,7 @@ [mypy] -ignore_missing_imports = true +ignore_missing_imports = True disallow_any_generics = True +no_implicit_optional = True pretty = True show_column_numbers = True warn_redundant_casts = True