Skip to content
Snippets Groups Projects
Commit f8f3d125 authored by Andi Gerken's avatar Andi Gerken
Browse files

Blacke all files and added the pre-commit hook

parent 8d0a5fba
Branches
Tags
1 merge request!16Changed the way of calculating speeds and turns (+ minor features)
repos:
- repo: https://github.com/ambv/black
rev: stable
- repo: https://github.com/python/black
rev: 19.3b0
hooks:
- id: black
\ No newline at end of file
......@@ -19,9 +19,9 @@ if __name__ == "__main__":
env["TWINE_PASSWORD"] = env["CI_JOB_TOKEN"]
if args.production:
target_project_id = env['ARTIFACTS_REPOSITORY_PROJECT_ID']
target_project_id = env["ARTIFACTS_REPOSITORY_PROJECT_ID"]
else:
target_project_id = env['CI_PROJECT_ID']
target_project_id = env["CI_PROJECT_ID"]
command = ["python3"]
command += ["-m", "twine", "upload", "dist/*"]
......
......@@ -5,3 +5,7 @@ requires = ["setuptools", "wheel"] # PEP 508 specifications.
[flake8]
max-line-length = 88
extend-ignore = "E203"
[tool.black]
line-length = 88
include =''
\ No newline at end of file
......@@ -649,14 +649,10 @@ class File(h5py.File):
spacing = 10
x = np.arange(
-0.5 * self.world_size[0] + spacing,
0.5 * self.world_size[0],
spacing,
-0.5 * self.world_size[0] + spacing, 0.5 * self.world_size[0], spacing
)
y = np.arange(
-0.5 * self.world_size[1] + spacing,
0.5 * self.world_size[1],
spacing,
-0.5 * self.world_size[1] + spacing, 0.5 * self.world_size[1], spacing
)
xv, yv = np.meshgrid(x, y)
......@@ -730,4 +726,4 @@ class File(h5py.File):
writervideo = animation.FFMpegWriter(fps=25)
ani.save(video_path, writer=writervideo)
else:
plt.show()
\ No newline at end of file
plt.show()
......@@ -136,4 +136,4 @@ def read_property_from_multiple_files(
with robofish.io.File(path=path, strict_validate=strict_validate) as f:
p = f.select_entity_property(predicate, entity_property)
poses_array.append(p)
return poses_array
\ No newline at end of file
return poses_array
......@@ -35,4 +35,4 @@ def limit_angle_range(angle: Union[float, Iterable], _range=(-np.pi, np.pi)):
if isinstance(angle, Iterable):
return np.array([limit_one(v) for v in angle])
else:
return limit_one(angle)
\ No newline at end of file
return limit_one(angle)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment