Skip to content

Commit 552390c

Browse files
Copilotpancetta
andcommitted
Fix remaining lint errors - format all files with black
Co-authored-by: pancetta <7158893+pancetta@users.noreply.github.com>
1 parent 69a1228 commit 552390c

32 files changed

Lines changed: 54 additions & 100 deletions

pySDC/core/common.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
Module containing utility classe(s) from which inherit some of the pySDC base
88
classes.
99
"""
10+
1011
from pySDC.core.errors import ReadOnlyError
1112

1213

pySDC/core/hooks.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import logging
22
from collections import namedtuple
33

4-
54
# metadata with defaults
65
meta_data = {
76
'process': None,

pySDC/core/sweeper.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from pySDC.core.collocation import CollBase
77
from pySDC.helpers.pysdc_helper import FrozenClass
88

9-
109
# Organize QDeltaGenerator class in dict[type(QDeltaGenerator),set(str)] to retrieve aliases
1110
QDELTA_GENERATORS_ALIASES = {v: set() for v in set(QDELTA_GENERATORS.values())}
1211
for k, v in QDELTA_GENERATORS.items():

pySDC/helpers/fieldsIO.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
To use MPI collective writing, you need to call first the class methods :class:`Rectilinear.setupMPI` (cf their docstring).
4848
Also, `Rectilinear.setHeader` **must be given the global grids coordinates**, whether the code is run in parallel or not.
4949
"""
50+
5051
import os
5152
import numpy as np
5253
from typing import Type, TypeVar

pySDC/helpers/testing.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
66
Helpers module for testing utilities
77
"""
8+
89
import os
910
import json
1011
import warnings

pySDC/helpers/vtkIO.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"""
44
Helper functions for VTK files IO (to be used with Paraview or PyVista)
55
"""
6+
67
import os
78
import vtk
89
from vtkmodules.util import numpy_support

pySDC/implementations/convergence_controller_classes/estimate_embedded_error.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,8 @@ def estimate_embedded_error_serial(self, L):
114114
else:
115115
return comm.bcast(abs(L.uold[comm.rank + 1] - L.u[comm.rank + 1]), root=comm.size - 1)
116116
else:
117-
raise NotImplementedError(
118-
f"Don't know how to estimate embedded error for sweeper type \
119-
\"{self.params.sweeper_type}\""
120-
)
117+
raise NotImplementedError(f"Don't know how to estimate embedded error for sweeper type \
118+
\"{self.params.sweeper_type}\"")
121119

122120
def setup_status_variables(self, controller, **kwargs):
123121
"""
@@ -209,10 +207,8 @@ def post_iteration_processing(self, controller, S, **kwargs):
209207
None
210208
"""
211209
if len(S.levels) > 1 and len(controller.MS) > 1:
212-
raise NotImplementedError(
213-
"Embedded error estimate only works for serial multi-level or parallel single \
214-
level"
215-
)
210+
raise NotImplementedError("Embedded error estimate only works for serial multi-level or parallel single \
211+
level")
216212

217213
if S.status.iter > 0 or self.params.sweeper_type == "RK":
218214
if self.params.averaged:

pySDC/implementations/convergence_controller_classes/estimate_extrapolation_error.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,8 @@ def store_values(self, S, **kwargs):
139139
elif type(f) == mesh:
140140
self.prev.f[oldest_val] = f
141141
else:
142-
raise DataError(
143-
f"Unable to store f from datatype {type(f)}, extrapolation based error estimate only\
144-
works with types imex_mesh and mesh"
145-
)
142+
raise DataError(f"Unable to store f from datatype {type(f)}, extrapolation based error estimate only\
143+
works with types imex_mesh and mesh")
146144

147145
# store the rest of the values
148146
self.prev.u[oldest_val] = S.levels[0].u[-1]
@@ -481,10 +479,8 @@ def post_iteration_processing(self, controller, S, **kwargs):
481479
elif type(lvl.f[0]) == mesh:
482480
f = [lvl.f[i] if self.coeff.f[i] else 0.0 for i in range(len(lvl.f) - 1)]
483481
else:
484-
raise DataError(
485-
f"Unable to store f from datatype {type(lvl.f[0])}, extrapolation based error estimate only\
486-
works with types imex_mesh and mesh"
487-
)
482+
raise DataError(f"Unable to store f from datatype {type(lvl.f[0])}, extrapolation based error estimate only\
483+
works with types imex_mesh and mesh")
488484

489485
# compute the error with the weighted sum
490486
if self.comm:

pySDC/implementations/convergence_controller_classes/hotrod.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,8 @@ def check_parameters(self, controller, params, description, **kwargs):
8282
str: Error message
8383
"""
8484
if self.params.HotRod_tol == np.inf:
85-
controller.logger.warning(
86-
"Hot Rod needs a detection threshold, which is now set to infinity, such that a \
87-
restart is never triggered!"
88-
)
85+
controller.logger.warning("Hot Rod needs a detection threshold, which is now set to infinity, such that a \
86+
restart is never triggered!")
8987

9088
if description["step_params"].get("restol", -1.0) >= 0:
9189
return (

pySDC/implementations/problem_classes/AllenCahn_2D_FD.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from pySDC.helpers import problem_helper
88
from pySDC.implementations.datatype_classes.mesh import mesh, imex_mesh, comp2_mesh
99

10-
1110
# http://www.personal.psu.edu/qud2/Res/Pre/dz09sisc.pdf
1211

1312

0 commit comments

Comments
 (0)