From 4cba89857b2971401737175fafb9bd0753d281bc Mon Sep 17 00:00:00 2001 From: Giacomo Marciani Date: Tue, 28 Oct 2025 18:13:09 -0400 Subject: [PATCH 1/2] [CodeLinters] Disable Flake8 rule B042 as it is a minor, and it is also affected by false positive. Rule Description: Exception class with `__init__` should pass all args to `super().__init__()` in order to work with `copy.copy()`. False Positive: https://github.com/PyCQA/flake8-bugbear/issues/525 --- .flake8 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.flake8 b/.flake8 index 70ad5311ae..fd21ff8d7e 100644 --- a/.flake8 +++ b/.flake8 @@ -15,6 +15,9 @@ ignore = # B028: Consider replacing f"'{foo}'" with f"{foo!r}". # Currently being disabled by flake8-bugbear. See https://github.com/PyCQA/flake8-bugbear/pull/333 B028 + # B042: Exception class with `__init__` should pass all args to `super().__init__()` in order to work with `copy.copy()`. + # Affected by false positive, https://github.com/PyCQA/flake8-bugbear/issues/525 + B042 exclude = .tox, .git, From c1ac9254f6b845a52c529628ed54d3f96e2a6521 Mon Sep 17 00:00:00 2001 From: Giacomo Marciani Date: Tue, 28 Oct 2025 18:13:46 -0400 Subject: [PATCH 2/2] [CodeLinters] Addressed linter error about extra whitespaces. --- .../files/cloudwatch/cloudwatch_agent_config_util.py | 4 ++-- .../files/default/head_node_slurm/slurm/config_renderer.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cookbooks/aws-parallelcluster-environment/files/cloudwatch/cloudwatch_agent_config_util.py b/cookbooks/aws-parallelcluster-environment/files/cloudwatch/cloudwatch_agent_config_util.py index 4598e64a0c..f0c51e652f 100644 --- a/cookbooks/aws-parallelcluster-environment/files/cloudwatch/cloudwatch_agent_config_util.py +++ b/cookbooks/aws-parallelcluster-environment/files/cloudwatch/cloudwatch_agent_config_util.py @@ -97,8 +97,8 @@ def _validate_timestamp_keys(input_json): if log_config.get("timestamp_format_key") not in valid_keys: _fail( f"Log config with log_stream_name {log_config.get('log_stream_name')} and " - f"file_path {log_config.get('file_path'),} contains an invalid timestamp_format_key: " - f"{log_config.get('timestamp_format_key')}. Valid values are {', '.join(valid_keys),}" + f"file_path {log_config.get('file_path'), } contains an invalid timestamp_format_key: " + f"{log_config.get('timestamp_format_key')}. Valid values are {', '.join(valid_keys), }" ) diff --git a/cookbooks/aws-parallelcluster-slurm/files/default/head_node_slurm/slurm/config_renderer.py b/cookbooks/aws-parallelcluster-slurm/files/default/head_node_slurm/slurm/config_renderer.py index f580a74be7..3f4110289f 100644 --- a/cookbooks/aws-parallelcluster-slurm/files/default/head_node_slurm/slurm/config_renderer.py +++ b/cookbooks/aws-parallelcluster-slurm/files/default/head_node_slurm/slurm/config_renderer.py @@ -80,7 +80,7 @@ def _definitions(self, dynamic=False): definitions += f" Weight={self.dynamic_node_priority if dynamic else self.static_node_priority}" if self.has_gpu and self.gpu_count > 0: - definitions += f" Gres=gpu:{ self.gpu_type }:{self.gpu_count}" + definitions += f" Gres=gpu:{self.gpu_type}:{self.gpu_count}" return definitions