From f6a95d3d0bbcd4b4c28e553d6ab0ce8f5f1901f3 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Wed, 13 Sep 2023 16:09:21 -0400 Subject: [PATCH 1/2] chore: Ruff ignore for _compat Signed-off-by: Henry Schreiner --- cibuildwheel/_compat/tomllib.py | 4 ++-- cibuildwheel/_compat/typing.py | 2 +- pyproject.toml | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cibuildwheel/_compat/tomllib.py b/cibuildwheel/_compat/tomllib.py index f3b30fe65..62d601c65 100644 --- a/cibuildwheel/_compat/tomllib.py +++ b/cibuildwheel/_compat/tomllib.py @@ -3,8 +3,8 @@ import sys if sys.version_info >= (3, 11): - from tomllib import load # noqa: TID251 + from tomllib import load else: - from tomli import load # noqa: TID251 + from tomli import load __all__ = ("load",) diff --git a/cibuildwheel/_compat/typing.py b/cibuildwheel/_compat/typing.py index a66b1abb5..d1aa72271 100644 --- a/cibuildwheel/_compat/typing.py +++ b/cibuildwheel/_compat/typing.py @@ -5,7 +5,7 @@ if sys.version_info < (3, 11): from typing_extensions import NotRequired, assert_never else: - from typing import NotRequired, assert_never # noqa: TID251 + from typing import NotRequired, assert_never __all__ = ( "assert_never", diff --git a/pyproject.toml b/pyproject.toml index 4368cd33a..bf84836e4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -161,3 +161,4 @@ flake8-unused-arguments.ignore-variadic-names = true [tool.ruff.per-file-ignores] "unit_test/*" = ["PLC1901"] +"cibuildwheel/_compat/**.py" = ["TID251"] From db6d3095b900649caa948e1348d71b8e4f2b894d Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Wed, 13 Sep 2023 16:09:56 -0400 Subject: [PATCH 2/2] chore: add .gitattributes Signed-off-by: Henry Schreiner --- .gitattributes | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..53363ffcd --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +* text=auto + +*.py diff=python +*.md diff=markdown + +*.svg -diff