diff --git a/aiida_hyperqueue/scheduler.py b/aiida_hyperqueue/scheduler.py index 1f65a65..a762e4b 100644 --- a/aiida_hyperqueue/scheduler.py +++ b/aiida_hyperqueue/scheduler.py @@ -26,9 +26,9 @@ "FINISHED": JobState.DONE, } + class AiiDAHypereQueueDeprecationWarning(Warning): - """Class for HypereQueue plugin deprecations. - """ + """Class for HypereQueue plugin deprecations.""" class HyperQueueJobResource(JobResource): @@ -72,10 +72,10 @@ def validate_resources(cls, **kwargs): "Must specify `num_cpus`, or (`num_machines` and `num_mpiprocs_per_machine`)" ) else: - message = 'The `num_machines` and `num_mpiprocs_per_machine` for setting hyperqueue resources are deprecated. ' - 'Please set `num_cpus` and `memory_mb`.' + message = "The `num_machines` and `num_mpiprocs_per_machine` for setting hyperqueue resources are deprecated. " + "Please set `num_cpus` and `memory_mb`." - message = f'{message} (this will be removed in aiida-hyperqueue v1.0)' + message = f"{message} (this will be removed in aiida-hyperqueue v1.0)" warnings.warn(message, AiiDAHypereQueueDeprecationWarning, stacklevel=3) else: if not isinstance(resources.num_cpus, int):