Skip to content

Commit 3d6171d

Browse files
Disable the check for unicode character in regression tests
1 parent 0659cc5 commit 3d6171d

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

pyproject.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,9 @@ fixable = [
116116
"I", # isort
117117
"RUF", # ruff
118118
]
119-
unfixable = []
120-
target-version = "py37"
119+
unfixable = ["RUF001"]
120+
target-version = "py38"
121+
122+
[tool.ruff.per-file-ignores]
123+
# Ruff is autofixing a tests with a voluntarily sneaky unicode
124+
"tests/test_regrtest.py" = ["RUF001"]

tests/test_regrtest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,10 @@ def test_unicode_in_docstring(self) -> None:
280280
281281
class MyClass(object):
282282
def method(self):
283-
"With unicode : {'`'} "
283+
"With unicode : {''} "
284284
285285
instance = MyClass()
286-
""" # noqa: RUF001
286+
"""
287287
)
288288

289289
next(node.value.infer()).as_string()

0 commit comments

Comments
 (0)