diff --git a/pyrightconfig.json b/pyrightconfig.json index d96b3fc9d..5a56ef6cf 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -6,6 +6,7 @@ "enableTypeIgnoreComments": true, // Exclude from scanning when running pyright "exclude": [ + ".git/", "build/", // Vendored "Pythonwin/Scintilla/", diff --git a/setup.py b/setup.py index e72edf0ad..fcd1d6381 100644 --- a/setup.py +++ b/setup.py @@ -926,7 +926,7 @@ class my_compiler(MSVCCompiler): # worse! This can probably go away once we kill the VS project files # though, as we can just specify the lowercase name in the module def. _cpp_extensions = MSVCCompiler._cpp_extensions + [".CPP"] - src_extensions = MSVCCompiler.src_extensions + [".CPP"] + src_extensions = MSVCCompiler.src_extensions + [".CPP"] # type: ignore[operator] # TODO: Fix in typeshed def link( self, diff --git a/win32/Lib/win32pdhquery.py b/win32/Lib/win32pdhquery.py index 724a668a7..301b85c16 100644 --- a/win32/Lib/win32pdhquery.py +++ b/win32/Lib/win32pdhquery.py @@ -560,11 +560,11 @@ def __setstate__(self, volatilecounters): self.volatilecounters = volatilecounters -class QueryError: - def __init__(self, query): +class QueryError(Exception): + def __init__(self, query: BaseQuery): self.query = query def __repr__(self): - return "" % repr(self.query) + return f"" __str__ = __repr__