From f6202e0db42920ce93eb5d51a9e104dbd5e65acb Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Fri, 7 Jun 2024 16:12:03 +0000 Subject: [PATCH] Add in miscellaneus changes --- .pre-commit-config.yaml | 3 +++ CHANGES.txt | 2 +- ruff.toml | 6 +----- win32/test/test_win32gui.py | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 72acb051e..d8c90d35f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -43,6 +43,9 @@ repos: types: [c++] +# Vendored +exclude: ^(com/win32comext/mapi/src/mapi_headers/|Pythonwin/Scintilla/).*$ + # Vendored exclude: ^(com/win32comext/mapi/src/mapi_headers/|Pythonwin/Scintilla/).*$ diff --git a/CHANGES.txt b/CHANGES.txt index c59bb5720..61fde6e7c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -45,7 +45,7 @@ Coming in build 307, as yet unreleased * Fixed handling of `SyntaxError` exception from a Windows Scripting Host Python Script on Python 3.10+ (#2235, @nbbeatty) * Add `CredGetSessionTypes` support (#2232, @CristiFati) * Fixed `win32clipboard` increasing size of data when `SetClipboardData` used with `CF_DIB` (#2184, @CristiFati) -* Add `StoreLogoff` to `PyIMsgStore` to prevent possible hang when MAPI uninitializes or during session logoff (#2196, @avivbrg) +* Add `StoreLogoff` to `PyIMsgStore` to prevent possible hang when MAPI uninitializes or during session logoff (#2196, avivbrg) * Enhance CredDelete to work with dictionaries (#2198, @CristiFati) * Add UnregisterHotKey support (#2185, @CristiFati) * IFolderView COM client support (#2180, #2181, #2182, @CristiFati) diff --git a/ruff.toml b/ruff.toml index cd23d7822..7f7b1298e 100644 --- a/ruff.toml +++ b/ruff.toml @@ -2,9 +2,7 @@ target-version = "py37" # Target the oldest supported version [lint] select = [ - "C4", # flake8-comprehensions - "F811", # redefined-while-unused - "I", # isort + "I", # isort "PLC", # Pylint Convention "PLE", # Pylint Error "RSE", # flake8-raise @@ -36,8 +34,6 @@ select = [ [lint.per-file-ignores] # Explicit re-exports is fine in __init__.py, still a code smell elsewhere. "__init__.py" = ["PLC0414"] -# TODO: Make adodbapi changes in their own PRs -"adodbapi/*" = ["C4", "YTT301", "UP031", "UP032", "ISC002"] [lint.isort] combine-as-imports = true diff --git a/win32/test/test_win32gui.py b/win32/test/test_win32gui.py index c5754722c..81ff693aa 100644 --- a/win32/test/test_win32gui.py +++ b/win32/test/test_win32gui.py @@ -72,7 +72,7 @@ def enum_callback_sle(cls, handle, data): @classmethod def enum_callback_exc(cls, handle, data): - raise ValueError + raise ValueError() @classmethod def enum_callback(cls, handle, data):