diff --git a/ament_black/ament_black/main.py b/ament_black/ament_black/main.py index 3cabf34..af913c5 100755 --- a/ament_black/ament_black/main.py +++ b/ament_black/ament_black/main.py @@ -21,14 +21,17 @@ import sys import tempfile import time -from xml.sax.saxutils import escape, quoteattr +from xml.sax.saxutils import escape +from xml.sax.saxutils import quoteattr -import click -from black import get_sources, re_compile_maybe_verbose +from black import get_sources from black import main as black +from black import re_compile_maybe_verbose from black.concurrency import maybe_install_uvloop -from black.const import DEFAULT_EXCLUDES, DEFAULT_INCLUDES +from black.const import DEFAULT_EXCLUDES +from black.const import DEFAULT_INCLUDES from black.report import Report +import click from unidiff import PatchSet diff --git a/ament_black/pyproject.toml b/ament_black/pyproject.toml new file mode 100644 index 0000000..be68599 --- /dev/null +++ b/ament_black/pyproject.toml @@ -0,0 +1,10 @@ +[tool.ruff] +line-length = 99 + +[tool.ruff.format] +quote-style = "single" +indent-style = "tab" +docstring-code-format = true + +[tool.isort] +profile = "google" diff --git a/ament_black/setup.py b/ament_black/setup.py index 685b26e..4795df7 100644 --- a/ament_black/setup.py +++ b/ament_black/setup.py @@ -1,4 +1,5 @@ -from setuptools import find_packages, setup +from setuptools import find_packages +from setuptools import setup package_name = 'ament_black' diff --git a/ament_black/test/test_copyright.py b/ament_black/test/test_copyright.py index bdf595e..97a3919 100644 --- a/ament_black/test/test_copyright.py +++ b/ament_black/test/test_copyright.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import pytest from ament_copyright.main import main +import pytest # Remove the `skip` decorator once the source file(s) have a copyright header diff --git a/ament_black/test/test_flake8.py b/ament_black/test/test_flake8.py index 1319bbf..d35aae8 100644 --- a/ament_black/test/test_flake8.py +++ b/ament_black/test/test_flake8.py @@ -11,8 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -import pytest from ament_flake8.main import main_with_errors +import pytest @pytest.mark.flake8 diff --git a/ament_black/test/test_pep257.py b/ament_black/test/test_pep257.py index 6b6d214..b234a38 100644 --- a/ament_black/test/test_pep257.py +++ b/ament_black/test/test_pep257.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import pytest from ament_pep257.main import main +import pytest @pytest.mark.linter diff --git a/ament_black/test/test_xmllint.py b/ament_black/test/test_xmllint.py index 68525c9..708606c 100644 --- a/ament_black/test/test_xmllint.py +++ b/ament_black/test/test_xmllint.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import pytest from ament_xmllint.main import main +import pytest @pytest.mark.linter