From edb0c20af88263c6b1c7935854c3c20c994296e2 Mon Sep 17 00:00:00 2001 From: Matthijs van der Burgh Date: Mon, 15 Apr 2024 13:22:33 +0200 Subject: [PATCH] (flake8) allow double quotes --- pykdl_ros/package.xml | 2 ++ pykdl_ros/pyproject.toml | 4 ++++ tf2_pykdl_ros/package.xml | 2 ++ tf2_pykdl_ros/pyproject.toml | 3 +++ tf2_pykdl_ros/test/test_flake8.py | 2 +- 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/pykdl_ros/package.xml b/pykdl_ros/package.xml index e861cf4..fc670c8 100644 --- a/pykdl_ros/package.xml +++ b/pykdl_ros/package.xml @@ -22,6 +22,8 @@ ament_pep257 ament_xmllint python3-flake8-isort + python3-flake8-pyproject-pip + python3-flake8-quotes python3-pytest diff --git a/pykdl_ros/pyproject.toml b/pykdl_ros/pyproject.toml index f821013..cfd0933 100644 --- a/pykdl_ros/pyproject.toml +++ b/pykdl_ros/pyproject.toml @@ -3,6 +3,10 @@ line-length = 120 [tool.flake8] max-line-length = 120 +docstring-quotes = '"""' +inline-quotes = '"' +multiline-quotes = '"""' + [tool.isort] combine_as_imports = true diff --git a/tf2_pykdl_ros/package.xml b/tf2_pykdl_ros/package.xml index dd62a16..d6ebc5e 100644 --- a/tf2_pykdl_ros/package.xml +++ b/tf2_pykdl_ros/package.xml @@ -26,6 +26,8 @@ rclpy tf2_geometry_msgs python3-flake8-isort + python3-flake8-pyproject-pip + python3-flake8-quotes python3-pytest diff --git a/tf2_pykdl_ros/pyproject.toml b/tf2_pykdl_ros/pyproject.toml index f821013..f3ea774 100644 --- a/tf2_pykdl_ros/pyproject.toml +++ b/tf2_pykdl_ros/pyproject.toml @@ -3,6 +3,9 @@ line-length = 120 [tool.flake8] max-line-length = 120 +docstring-quotes = '"""' +inline-quotes = '"' +multiline-quotes = '"""' [tool.isort] combine_as_imports = true diff --git a/tf2_pykdl_ros/test/test_flake8.py b/tf2_pykdl_ros/test/test_flake8.py index 39b6b72..6a05cb1 100644 --- a/tf2_pykdl_ros/test/test_flake8.py +++ b/tf2_pykdl_ros/test/test_flake8.py @@ -19,5 +19,5 @@ @pytest.mark.flake8 @pytest.mark.linter def test_flake8() -> None: - rc, errors = main_with_errors(argv=["--linelength", "120"]) + rc, errors = main_with_errors(argv=["--docstring-quotes", '"""', "--inline-quotes", '"', "--linelength", "120", "--multiline-quotes", '"""']) assert rc == 0, "Found %d code style errors / warnings:\n" % len(errors) + "\n".join(errors)