From e23fced07541964a246afd080e6fe217c08ac6c8 Mon Sep 17 00:00:00 2001 From: Stefan Janssen Date: Tue, 5 Mar 2024 16:06:43 +0100 Subject: [PATCH 1/2] don't use deprecated file mode U anymore see https://softwareengineering.stackexchange.com/questions/298677/why-is-universal-newlines-mode-deprecated-in-python --- qiita_client/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qiita_client/plugin.py b/qiita_client/plugin.py index a674eb8..6c6cd27 100644 --- a/qiita_client/plugin.py +++ b/qiita_client/plugin.py @@ -240,7 +240,7 @@ def __call__(self, server_url, job_id, output_dir): logger.debug('Entered BaseQiitaPlugin.__call__()') # Set up the Qiita Client config = ConfigParser() - with open(self.conf_fp, 'U') as conf_file: + with open(self.conf_fp, 'r') as conf_file: config.readfp(conf_file) qclient = QiitaClient(server_url, config.get('oauth2', 'CLIENT_ID'), From 8e6e18082cbd64122c52eca9083ff9b5537527a0 Mon Sep 17 00:00:00 2001 From: Stefan Janssen Date: Tue, 5 Mar 2024 16:17:03 +0100 Subject: [PATCH 2/2] avoid explicit type != type comparison: flake8 --- qiita_client/qiita_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qiita_client/qiita_client.py b/qiita_client/qiita_client.py index 881cf5a..f16e1d3 100644 --- a/qiita_client/qiita_client.py +++ b/qiita_client/qiita_client.py @@ -57,7 +57,7 @@ def __init__(self, output_name, artifact_type, files, archive=None): def __eq__(self, other): logger.debug('Entered ArtifactInfo.__eq__()') - if type(self) != type(other): + if not isinstance(other, ArtifactInfo): return False if self.output_name != other.output_name or \ self.artifact_type != other.artifact_type or \