Skip to content

Commit fa7174e

Browse files
Avasamclin1234
authored andcommitted
Annotate axscript.client.error module and remove redundant code (mhammond#2236)
1 parent 3b79d72 commit fa7174e

File tree

2 files changed

+4
-20
lines changed

2 files changed

+4
-20
lines changed

CHANGES.txt

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,7 @@ Coming in build 307, as yet unreleased
1515
--------------------------------------
1616

1717
### pywin32
18-
* Fixed accidentally trying to raise a `str` instead of an `Exception` in (#2270, @Avasam)
19-
* `Pythonwin/pywin/debugger/debugger.py`
20-
* `Pythonwin/pywin/framework/dlgappcore.py`
21-
* `com/win32com/server/policy.py`
22-
* `win32/Lib/regutil.py`
23-
* `win32/scripts/VersionStamp/vssutil.py`
24-
* Removed the following unused symbols. They were meant to be used as Exceptions, but were accidentally strings (#2270, #2269, @Avasam)
25-
* `pywin.debugger.debugger.error`
26-
* `pywin.framework.dlgappcore.error`
27-
* `win32com.server.policy.error`
28-
* `regutil.error`
29-
* `win32.scripts.VersionStamp.vssutil.error`
30-
* `win32com.universal.com_error`
31-
* `win32com.client.build.error`
32-
* `win32com.client.genpy.error`
33-
* Add EnumDesktopWindows (#2219, @CristiFati)
34-
* Marked `exc_type` and `exc_traceback` in `win32comext.axscript.client.error.AXScriptException.__init__` as deprecated. (#2236 , @Avasam)
18+
* Marked `exc_type` and `exc_traceback` in `win32comext.axscript.client.error.AXScriptException.__init__` as deprecated.
3519
They are now unused and all information is taken from the `exc_value` parameter.
3620
* Fixed non-overriden `pywin.scintilla.formatter.Formatter.ColorizeString` raising `TypeError` instead of `RuntimeError` due to too many parameters (#2216, @Avasam)
3721
* Fixed broken since Python 3 tokenization in `win32comext.axdebug.codecontainer.pySourceCodeContainer.GetSyntaxColorAttributes` (#2216, @Avasam)

com/win32comext/axscript/client/framework.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,19 +1202,19 @@ def HandleException(self, codeBlock: AXScriptCodeBlock | None) -> NoReturn:
12021202
# likely to have originated from the script code itself, and therefore
12031203
# needs to be reported like any other exception.
12041204
if IsCOMServerException(exc_type):
1205-
# Ensure the traceback doesn't cause a cycle.
1205+
# Ensure the traceback doesnt cause a cycle.
12061206
raise
12071207
# It could be an error by another script.
12081208
if (
12091209
isinstance(exc_value, pythoncom.com_error)
12101210
and exc_value.hresult == axscript.SCRIPT_E_REPORTED
12111211
):
1212-
# Ensure the traceback doesn't cause a cycle.
1212+
# Ensure the traceback doesnt cause a cycle.
12131213
raise COMException(scode=exc_value.hresult)
12141214

12151215
exception = error.AXScriptException(self, codeBlock, exc_value=exc_value)
12161216

1217-
# Ensure the traceback doesn't cause a cycle.
1217+
# Ensure the traceback doesnt cause a cycle.
12181218
result_exception = error.ProcessAXScriptException(
12191219
self.scriptSite, self.debugManager, exception
12201220
)

0 commit comments

Comments
 (0)