From 46a5f8fdb65f410f2a9246fdf56d41d06f3f3b72 Mon Sep 17 00:00:00 2001 From: tgoelles Date: Mon, 2 Dec 2024 22:07:46 +0000 Subject: [PATCH] sort imports --- pyproject.toml | 12 +++++------- tests/cli/test_rosbagconvert.py | 6 +++--- tests/unit/test_dataset.py | 2 +- tests/unit/test_file_io_dataset.py | 3 ++- tests/unit/test_file_io_dataset_large.py | 1 + tests/unit/test_instance_io_pointcloud.py | 2 +- tests/unit/test_plane_segmentation.py | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6ea70238..e7777828 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,18 +82,16 @@ pointcloudset = "pointcloudset.io.dataset.commandline:app" addopts = "-p no:warnings --verbose --color=yes" [tool.ruff] -# The default line length for Black is 88, but we set it to 120. +# General Ruff settings line-length = 120 +target-version = "py310" -# Allow unused variables when underscore-prefixed. +[tool.ruff.lint] +# Import-related settings moved under [tool.ruff.lint] dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" - -# Assume Python 3.11. -target-version = "py311" - isort = { known-first-party = ["pointcloudset", "tests"] } -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "__init__.py" = ["F401"] "pointcloudset/io/dataset/commandline.py" = ["F401"] diff --git a/tests/cli/test_rosbagconvert.py b/tests/cli/test_rosbagconvert.py index db08257b..72d37d78 100644 --- a/tests/cli/test_rosbagconvert.py +++ b/tests/cli/test_rosbagconvert.py @@ -2,11 +2,11 @@ import pytest import pytest_check as check -from pointcloudset import Dataset -from pointcloudset.io.dataset.commandline import app +from pyntcloud.io import TO_FILE from typer.testing import CliRunner -from pyntcloud.io import TO_FILE +from pointcloudset import Dataset +from pointcloudset.io.dataset.commandline import app TO_FILE_PYNTCLOUD = list(TO_FILE.keys()) diff --git a/tests/unit/test_dataset.py b/tests/unit/test_dataset.py index 6597c298..418dd69f 100644 --- a/tests/unit/test_dataset.py +++ b/tests/unit/test_dataset.py @@ -1,7 +1,7 @@ import datetime -import pandas as pd import numpy as np +import pandas as pd import pytest import pytest_check as check from dask.delayed import DelayedLeaf diff --git a/tests/unit/test_file_io_dataset.py b/tests/unit/test_file_io_dataset.py index 709bd43d..11b630b4 100644 --- a/tests/unit/test_file_io_dataset.py +++ b/tests/unit/test_file_io_dataset.py @@ -1,12 +1,13 @@ +import json from datetime import datetime from pathlib import Path -import json import numpy as np import pandas as pd import pytest import pytest_check as check from pandas._testing import assert_frame_equal + from pointcloudset import Dataset, PointCloud from pointcloudset.io.dataset import dir diff --git a/tests/unit/test_file_io_dataset_large.py b/tests/unit/test_file_io_dataset_large.py index 854f11b5..8453b5ae 100644 --- a/tests/unit/test_file_io_dataset_large.py +++ b/tests/unit/test_file_io_dataset_large.py @@ -4,6 +4,7 @@ import pytest import pytest_check as check + from pointcloudset import Dataset diff --git a/tests/unit/test_instance_io_pointcloud.py b/tests/unit/test_instance_io_pointcloud.py index 14bea7ba..f89b148f 100644 --- a/tests/unit/test_instance_io_pointcloud.py +++ b/tests/unit/test_instance_io_pointcloud.py @@ -3,9 +3,9 @@ import numpy as np import open3d as o3d import pandas as pd +import pytest import pytest_check as check from pyntcloud import PyntCloud -import pytest import pointcloudset from pointcloudset import PointCloud diff --git a/tests/unit/test_plane_segmentation.py b/tests/unit/test_plane_segmentation.py index 46ee65a8..f3287f2e 100644 --- a/tests/unit/test_plane_segmentation.py +++ b/tests/unit/test_plane_segmentation.py @@ -1,8 +1,8 @@ +import pytest import pytest_check as check from pointcloudset import PointCloud from pointcloudset.pointcloud_core import PointCloudCore -import pytest def test_plane_segmentation_of_open3d(testpointcloud):