Tue, 13 Sep 2022 19:46:19 +0200
Set some security considerations to 'ok'.
--- a/scripts/install-dependencies.py Mon Sep 12 18:07:42 2022 +0200 +++ b/scripts/install-dependencies.py Tue Sep 13 19:46:19 2022 +0200 @@ -10,7 +10,7 @@ """ import contextlib -import subprocess +import subprocess # secok import sys
--- a/src/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.tryExcept.html Mon Sep 12 18:07:42 2022 +0200 +++ b/src/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.tryExcept.html Tue Sep 13 19:46:19 2022 +0200 @@ -26,6 +26,10 @@ <table> <tr> +<td><a href="#checkContextlibSuppress">checkContextlibSuppress</a></td> +<td>Function to check for a contextlib.suppress with a non-specific Exception.</td> +</tr> +<tr> <td><a href="#checkTryExceptContinue">checkTryExceptContinue</a></td> <td>Function to check for a continue in the except block.</td> </tr> @@ -40,6 +44,31 @@ </table> <hr /> <hr /> +<a NAME="checkContextlibSuppress" ID="checkContextlibSuppress"></a> +<h2>checkContextlibSuppress</h2> +<b>checkContextlibSuppress</b>(<i>reportError, context, config</i>) + +<p> + Function to check for a contextlib.suppress with a non-specific Exception. +</p> +<dl> + +<dt><i>reportError</i> (func)</dt> +<dd> +function to be used to report errors +</dd> +<dt><i>context</i> (SecurityContext)</dt> +<dd> +security context object +</dd> +<dt><i>config</i> (dict)</dt> +<dd> +dictionary with configuration data +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +<hr /> <a NAME="checkTryExceptContinue" ID="checkTryExceptContinue"></a> <h2>checkTryExceptContinue</h2> <b>checkTryExceptContinue</b>(<i>reportError, context, config</i>)
--- a/src/eric7/DocumentationTools/QtHelpGenerator.py Mon Sep 12 18:07:42 2022 +0200 +++ b/src/eric7/DocumentationTools/QtHelpGenerator.py Tue Sep 13 19:46:19 2022 +0200 @@ -293,8 +293,8 @@ ) shutil.copy(os.path.join(self.outputDir, HelpProjectFile), self.htmlDir) os.chdir(self.htmlDir) - subprocess.run( - [ # secok + subprocess.run( # secok + [ qhelpgeneratorExe, HelpProjectFile, "-o", @@ -308,8 +308,8 @@ sys.stdout.flush() sys.stderr.flush() os.chdir(self.outputDir) - subprocess.run( - [ # secok + subprocess.run( # secok + [ qhelpgeneratorExe, HelpCollectionProjectFile, "-o",
--- a/src/eric7/EricNetwork/EricFtp.py Mon Sep 12 18:07:42 2022 +0200 +++ b/src/eric7/EricNetwork/EricFtp.py Tue Sep 13 19:46:19 2022 +0200 @@ -64,12 +64,12 @@ proxies. """ - def __init__( + def __init__( # secok self, host="", user="", password="", - acct="", # secok + acct="", proxyType=EricFtpProxyType.NO_PROXY, proxyHost="", proxyPort=ftplib.FTP_PORT,
--- a/src/eric7/Plugins/WizardPlugins/ColorDialogWizard/ColorDialogWizardDialog.py Mon Sep 12 18:07:42 2022 +0200 +++ b/src/eric7/Plugins/WizardPlugins/ColorDialogWizard/ColorDialogWizardDialog.py Tue Sep 13 19:46:19 2022 +0200 @@ -66,8 +66,8 @@ else: coStr = "QColor({0})".format(coStr) try: - exec( - "from PyQt6.QtCore import Qt;" # secok + exec( # secok + "from PyQt6.QtCore import Qt;" ' QColorDialog.getColor({0}, None, "{1}")'.format( coStr, self.eTitle.text() )
--- a/src/eric7/UI/upgrader.py Mon Sep 12 18:07:42 2022 +0200 +++ b/src/eric7/UI/upgrader.py Tue Sep 13 19:46:19 2022 +0200 @@ -12,7 +12,7 @@ """ import contextlib -import subprocess +import subprocess # secok import sys import time @@ -56,7 +56,7 @@ @type list of str """ args = [sys.executable] + args - subprocess.Popen(args) + subprocess.Popen(args) # secok def main():