Added new check that verifies .toml files in the repo, and updated black version.

这个提交包含在:
Sai-Suraj-27
2023-09-25 14:18:50 +05:30
父节点 15ed426999
当前提交 9c2b63d883
共有 4 个文件被更改,包括 10 次插入12 次删除

查看文件

@@ -7,8 +7,9 @@ repos:
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 23.7.0
- id: check-toml
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.9.1
hooks:
- id: black
args: ["--line-length", "120"] # Adjust the max line length value as needed.

查看文件

@@ -8,4 +8,4 @@ from toolboxes.GPRAntennaModels.GSSI import antenna_like_GSSI_1500
gssi_objects = antenna_like_GSSI_1500(0.125, 0.094, 0.100, resolution=0.001)
for obj in gssi_objects:
print(obj.__str__())
#end_python:
#end_python:

查看文件

@@ -171,8 +171,8 @@ class ExcitationFile(UserObjectMulti):
# Interpolate waveform values
w.userfunc = interpolate.interp1d(waveformtime, singlewaveformvalues, **kwargs)
logger.info(self.grid_name(grid) +
f"User waveform {w.ID} created using {timestr} and, if "
logger.info(
self.grid_name(grid) + f"User waveform {w.ID} created using {timestr} and, if "
f"required, interpolation parameters (kind: {kwargs['kind']}, "
f"fill value: {kwargs['fill_value']})."
)
@@ -837,9 +837,7 @@ class Rx(UserObjectMulti):
def _do_rotate(self, grid):
"""Performs rotation."""
new_pt = (self.kwargs["p1"][0] + grid.dx,
self.kwargs["p1"][1] + grid.dy,
self.kwargs["p1"][2] + grid.dz)
new_pt = (self.kwargs["p1"][0] + grid.dx, self.kwargs["p1"][1] + grid.dy, self.kwargs["p1"][2] + grid.dz)
pts = np.array([self.kwargs["p1"], new_pt])
rot_pts = rotate_2point_object(pts, self.axis, self.angle, self.origin)
self.kwargs["p1"] = tuple(rot_pts[0, :])

查看文件

@@ -231,14 +231,13 @@ class PML:
self.initialise_field_arrays()
def check_kappamin(self):
"""Checks that the sum of all kappamin values, i.e. when a multi-pole
PML is used, is not less than one.
"""Checks that the sum of all kappamin values, i.e. when a multi-pole
PML is used, is not less than one.
"""
kappamin = sum(cfs.kappa.min for cfs in self.CFS)
if kappamin < 1:
logger.exception(f"Sum of kappamin value(s) for PML is {kappamin} "
"and must be greater than one.")
logger.exception(f"Sum of kappamin value(s) for PML is {kappamin} " "and must be greater than one.")
raise ValueError
def initialise_field_arrays(self):