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, 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