From 1a103470a13a83590b3fc06e8779494e2b99751d Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Mon, 1 May 2023 11:54:48 -0600 Subject: Add some cheap return and parameter annotations Use: https://github.com/JelleZijlstra/autotyping to add "safe" return annotations. Where a parameter has a default value that is an obvious scalar type (bool, int, str, etc.) add those annotations as well. Also fixed two small bugs that popped up when sanity-checking with mypy. One in FortranCommon, where a return had been previously annotated to be a tuple of Action, which should be ActionBase - Action is the factory function, not the base class. The other was a typo in the error raised in _add_cppdefines - the message was formatted with the value of "define" which should have been "defines". Signed-off-by: Mats Wichmann --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c5949793d..e6f496732 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,6 +15,8 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER embedded in a sequence, or by itself. The conditional C scanner thus did not always properly apply the defines. The regular C scanner does not use these, so was not affected. [fixes #4193] + - Added some typing annotations generated by a tool, to eliminate manual + work in future on things which are safe for the tool to produce. RELEASE 4.5.2 - Sun, 21 Mar 2023 14:08:29 -0700 -- cgit v1.2.1 From 8bb3d1b1d8966b451ed2f3d63a38b32e99e7bde9 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Tue, 2 May 2023 10:49:49 -0600 Subject: Eliminate pylint warning on direct use of __call__ C2801: Unnecessarily calls dunder method __call__. Invoke instance directly. These were all in the same file (docbook tool) Signed-off-by: Mats Wichmann --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c5949793d..d0b58368c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,6 +15,8 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER embedded in a sequence, or by itself. The conditional C scanner thus did not always properly apply the defines. The regular C scanner does not use these, so was not affected. [fixes #4193] + - Simplify some code due to pylint observation: "C2801: Unnecessarily + calls dunder method __call__. Invoke instance directly." RELEASE 4.5.2 - Sun, 21 Mar 2023 14:08:29 -0700 -- cgit v1.2.1 From 1ee43f4691dc7ab651fd22f07748c237f0301675 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Tue, 2 May 2023 11:28:46 -0600 Subject: Change bas64 decodestring -> decodebytes The former was an alias in Python 3, deprecated since 3.1. Use the replacement. Signed-off-by: Mats Wichmann --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index d0b58368c..72d1aa675 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,6 +17,8 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER not use these, so was not affected. [fixes #4193] - Simplify some code due to pylint observation: "C2801: Unnecessarily calls dunder method __call__. Invoke instance directly." + - Python 3.9 dropped the alias base64.decodestring, deprecated since 3.1. + Only used in msvs.py. Use base64.decodebytes instead. RELEASE 4.5.2 - Sun, 21 Mar 2023 14:08:29 -0700 -- cgit v1.2.1