updated the pre-commit-config.yaml file by updating the versions of black and pre-commit-hooks.

这个提交包含在:
Sai-Suraj-27
2023-07-26 19:58:57 +05:30
父节点 038f21ce2c
当前提交 21388e6346
共有 5 个文件被更改,包括 10 次插入10 次删除

查看文件

@@ -1,14 +1,14 @@
# See https://pre-commit.com for more information # See https://pre-commit.com for more information
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.0.0 rev: v3.3.0
hooks: hooks:
- id: trailing-whitespace - id: trailing-whitespace
- id: end-of-file-fixer - id: end-of-file-fixer
- id: check-yaml - id: check-yaml
- id: check-added-large-files - id: check-added-large-files
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 23.3.0 rev: 23.7.0
hooks: hooks:
- id: black - id: black
args: ["--line-length", "120"] # Adjust the max line length value as needed. args: ["--line-length", "120"] # Adjust the max line length value as needed.

查看文件

@@ -7,7 +7,7 @@ from . import slice
def convert_meshes(meshes, discretization, parallel=True): def convert_meshes(meshes, discretization, parallel=True):
scale, shift, shape = slice.calculate_scale_shift(meshes, discretization) scale, shift, shape = slice.calculate_scale_shift(meshes, discretization)
vol = np.zeros(shape[::-1], dtype=np.int8) vol = np.zeros(shape[::-1], dtype=np.int8)
vol.fill(-1) # Fill array with -1 to indicate background in gprMax vol.fill(-1) # Fill array with -1 to indicate background in gprMax
for mesh_ind, org_mesh in enumerate(meshes): for mesh_ind, org_mesh in enumerate(meshes):
slice.scale_and_shift_mesh(org_mesh, scale, shift) slice.scale_and_shift_mesh(org_mesh, scale, shift)

查看文件

@@ -16,10 +16,10 @@ if __name__ == "__main__":
description="Allows the user to convert a STL files to voxelized mesh.", description="Allows the user to convert a STL files to voxelized mesh.",
usage="cd gprMax; python -m toolboxes.STLtoVoxel.stltovoxel stlfilename -matindex -dxdydz", usage="cd gprMax; python -m toolboxes.STLtoVoxel.stltovoxel stlfilename -matindex -dxdydz",
) )
parser.add_argument("stlfiles", help="can be the filename of a single STL file, or the path to folder containing multiple STL files")
parser.add_argument( parser.add_argument(
"-dxdydz", type=float, required=True, help="discretisation to use in voxelisation process" "stlfiles", help="can be the filename of a single STL file, or the path to folder containing multiple STL files"
) )
parser.add_argument("-dxdydz", type=float, required=True, help="discretisation to use in voxelisation process")
args = parser.parse_args() args = parser.parse_args()
if os.path.isdir(args.stlfiles): if os.path.isdir(args.stlfiles):