diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 50b50aa..209ad2f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,17 +4,17 @@ fail_fast: true repos: - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 24.2.0 hooks: - id: black - repo: https://github.com/timothycrosley/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 7.0.0 hooks: - id: flake8 additional_dependencies: [flake8-isort] diff --git a/CI/integration_tests/test_simple_spheres.py b/CI/integration_tests/test_simple_spheres.py index c25a437..b1d3048 100644 --- a/CI/integration_tests/test_simple_spheres.py +++ b/CI/integration_tests/test_simple_spheres.py @@ -22,6 +22,7 @@ ------- Test the visualization of simple spheres. """ + import time import numpy as np diff --git a/CI/unit_tests/bounding_box/test_bounding_box.py b/CI/unit_tests/bounding_box/test_bounding_box.py index 4a57fa1..adc8b6b 100644 --- a/CI/unit_tests/bounding_box/test_bounding_box.py +++ b/CI/unit_tests/bounding_box/test_bounding_box.py @@ -20,6 +20,7 @@ ------- Unit test for the bounding box. """ + import numpy as np import open3d as o3d diff --git a/CI/unit_tests/mesh/test_cylinder.py b/CI/unit_tests/mesh/test_cylinder.py index af11664..428e47d 100644 --- a/CI/unit_tests/mesh/test_cylinder.py +++ b/CI/unit_tests/mesh/test_cylinder.py @@ -20,6 +20,7 @@ ------- Run unit tests on the sphere module. """ + import unittest import numpy as np diff --git a/CI/unit_tests/mesh/test_mesh.py b/CI/unit_tests/mesh/test_mesh.py index cd0d215..16e8f8b 100644 --- a/CI/unit_tests/mesh/test_mesh.py +++ b/CI/unit_tests/mesh/test_mesh.py @@ -20,6 +20,7 @@ ------- Test the mesh module. """ + import unittest import numpy as np diff --git a/CI/unit_tests/mesh/test_sphere.py b/CI/unit_tests/mesh/test_sphere.py index 9bbe60a..97c736a 100644 --- a/CI/unit_tests/mesh/test_sphere.py +++ b/CI/unit_tests/mesh/test_sphere.py @@ -20,6 +20,7 @@ ------- Run unit tests on the sphere module. """ + import unittest import numpy as np diff --git a/CI/unit_tests/particle/test_particle.py b/CI/unit_tests/particle/test_particle.py index 72db51f..129bba3 100644 --- a/CI/unit_tests/particle/test_particle.py +++ b/CI/unit_tests/particle/test_particle.py @@ -19,6 +19,7 @@ ------- Test the particle dataclass operations. """ + import unittest import numpy as np diff --git a/CI/unit_tests/transformations/test_rotation_matrices.py b/CI/unit_tests/transformations/test_rotation_matrices.py index 1c9005c..4e24dfc 100644 --- a/CI/unit_tests/transformations/test_rotation_matrices.py +++ b/CI/unit_tests/transformations/test_rotation_matrices.py @@ -19,6 +19,7 @@ ------- Test the rotation matrices module. """ + import unittest import numpy as np diff --git a/CI/unit_tests/visualizer/test_visualizer.py b/CI/unit_tests/visualizer/test_visualizer.py index c1340bf..84d71e7 100644 --- a/CI/unit_tests/visualizer/test_visualizer.py +++ b/CI/unit_tests/visualizer/test_visualizer.py @@ -22,6 +22,7 @@ ------- Test the visualizer module. """ + import time import unittest diff --git a/docs/source/conf.py b/docs/source/conf.py index 10c9c6a..b4685e9 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,6 +1,7 @@ """ Conf file for the PyRND docs. """ + import os import sys diff --git a/examples/custom_mesh.py b/examples/custom_mesh.py index beffa83..8c7a945 100644 --- a/examples/custom_mesh.py +++ b/examples/custom_mesh.py @@ -25,6 +25,7 @@ ------- Tutorial on reading custom mesh objects. """ + import numpy as np import znvis as vis diff --git a/examples/export_scene.py b/examples/export_scene.py index 737ce77..9cbc8e4 100644 --- a/examples/export_scene.py +++ b/examples/export_scene.py @@ -20,6 +20,7 @@ ------- Tutorial script to visualize simple spheres over a random trajectory. """ + import numpy as np import znvis as vis diff --git a/examples/simple_cylinders.py b/examples/simple_cylinders.py index 831c678..6b9164d 100644 --- a/examples/simple_cylinders.py +++ b/examples/simple_cylinders.py @@ -25,6 +25,7 @@ ------- Example script for visualizing simple cylinders. """ + import numpy as np import znvis as vis diff --git a/examples/simple_spheres.py b/examples/simple_spheres.py index 4a55279..70263d8 100644 --- a/examples/simple_spheres.py +++ b/examples/simple_spheres.py @@ -20,6 +20,7 @@ ------- Tutorial script to visualize simple spheres over a random trajectory. """ + import numpy as np import znvis as vis diff --git a/examples/simple_spheres_box.py b/examples/simple_spheres_box.py index 4302dc2..f0ea33f 100644 --- a/examples/simple_spheres_box.py +++ b/examples/simple_spheres_box.py @@ -20,6 +20,7 @@ ------- Tutorial script to visualize simple spheres over a random trajectory. """ + import numpy as np import znvis as vis diff --git a/setup.py b/setup.py index efec5bf..035574d 100644 --- a/setup.py +++ b/setup.py @@ -19,6 +19,7 @@ Summary ------- """ + from os import path import setuptools diff --git a/znvis/__init__.py b/znvis/__init__.py index 0e45046..2b1f8d0 100644 --- a/znvis/__init__.py +++ b/znvis/__init__.py @@ -21,6 +21,7 @@ ------- init file for the main ZnVis package. """ + from znvis.bounding_objects.bounding_box import BoundingBox from znvis.material.material import Material from znvis.mesh.custom import CustomMesh diff --git a/znvis/bounding_objects/bounding_box.py b/znvis/bounding_objects/bounding_box.py index bc492c0..26814d2 100644 --- a/znvis/bounding_objects/bounding_box.py +++ b/znvis/bounding_objects/bounding_box.py @@ -20,6 +20,7 @@ ------- Create bounding box. """ + from dataclasses import dataclass import numpy as np diff --git a/znvis/material/__init__.py b/znvis/material/__init__.py index 5fac291..c4ec796 100644 --- a/znvis/material/__init__.py +++ b/znvis/material/__init__.py @@ -21,6 +21,7 @@ ------- Initi file for the material module. """ + from znvis.material.material import Material __all__ = [Material.__name__] diff --git a/znvis/material/material.py b/znvis/material/material.py index e099d60..352445b 100644 --- a/znvis/material/material.py +++ b/znvis/material/material.py @@ -21,6 +21,7 @@ ------- Material parent class. """ + from dataclasses import dataclass import numpy as np diff --git a/znvis/mesh/__init__.py b/znvis/mesh/__init__.py index 2816192..e24d960 100644 --- a/znvis/mesh/__init__.py +++ b/znvis/mesh/__init__.py @@ -20,6 +20,7 @@ ------- Package for the ZnVis meshes. """ + from .mesh import Mesh __all__ = ["Mesh"] diff --git a/znvis/mesh/custom.py b/znvis/mesh/custom.py index ef25d0a..8dcef73 100644 --- a/znvis/mesh/custom.py +++ b/znvis/mesh/custom.py @@ -23,6 +23,7 @@ ------- Create a custom mesh """ + from dataclasses import dataclass import numpy as np diff --git a/znvis/mesh/cylinder.py b/znvis/mesh/cylinder.py index 6ada1bf..8d73e1b 100644 --- a/znvis/mesh/cylinder.py +++ b/znvis/mesh/cylinder.py @@ -23,6 +23,7 @@ ------- Create a cylinder mesh """ + from dataclasses import dataclass import numpy as np diff --git a/znvis/mesh/mesh.py b/znvis/mesh/mesh.py index 39dcb63..126c14b 100644 --- a/znvis/mesh/mesh.py +++ b/znvis/mesh/mesh.py @@ -19,6 +19,7 @@ ------- Module for the mesh parent class. """ + from dataclasses import dataclass import numpy as np diff --git a/znvis/mesh/sphere.py b/znvis/mesh/sphere.py index 85487cd..03bc4ac 100644 --- a/znvis/mesh/sphere.py +++ b/znvis/mesh/sphere.py @@ -20,6 +20,7 @@ ------- Create a sphere mesh. """ + from dataclasses import dataclass import numpy as np diff --git a/znvis/particle/particle.py b/znvis/particle/particle.py index 35f614d..52fef30 100644 --- a/znvis/particle/particle.py +++ b/znvis/particle/particle.py @@ -20,6 +20,7 @@ ------- Module for the particle parent class """ + import typing from dataclasses import dataclass diff --git a/znvis/testing/znvis_process.py b/znvis/testing/znvis_process.py index 6474223..c6d385f 100644 --- a/znvis/testing/znvis_process.py +++ b/znvis/testing/znvis_process.py @@ -20,6 +20,7 @@ ------- Module for ZnVis processes using in testing. """ + import multiprocessing import traceback diff --git a/znvis/transformations/rotation_matrices.py b/znvis/transformations/rotation_matrices.py index 7a72ad0..e643623 100644 --- a/znvis/transformations/rotation_matrices.py +++ b/znvis/transformations/rotation_matrices.py @@ -19,6 +19,7 @@ ------- Module for the computation of rotation matrices. """ + import numpy as np diff --git a/znvis/visualizer/visualizer.py b/znvis/visualizer/visualizer.py index 4969a7c..1e93f30 100644 --- a/znvis/visualizer/visualizer.py +++ b/znvis/visualizer/visualizer.py @@ -20,6 +20,7 @@ ------- Main visualizer class. """ + import pathlib import re import shutil