Skip to content

Commit

Permalink
Add allowed confusables
Browse files Browse the repository at this point in the history
  • Loading branch information
vemel committed Oct 21, 2024
1 parent d999ccc commit c260871
Show file tree
Hide file tree
Showing 4 changed files with 317 additions and 232 deletions.
2 changes: 1 addition & 1 deletion mypy_boto3_builder/utils/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}
MAX_DOCSTRING_LENGTH: int = 300
AWS_LINK_RE = re.compile(r"`([^`]+\S)\s*<https://(\S+)>`\_*")
REPLACE_DOCSTRING_CHARS = {"’": "'", "–": "-"} # noqa
REPLACE_DOCSTRING_CHARS = {"’": "'", "–": "-"} # noqa: RUF001


def get_class_prefix(func_name: str) -> str:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ fixable = ["ALL"]
unfixable = ["B"]
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
exclude = ["*.pyi", "examples/*", "aio_examples/*"]
allowed-confusables = [""]

[tool.ruff.lint.per-file-ignores]
"test_*.py" = [
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/test_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_get_short_docstring(self) -> None:
assert get_short_docstring("") == ""
assert get_short_docstring("\n") == ""
assert get_short_docstring("`asd\n:type") == "`asd`."
assert get_short_docstring("`as’d\n:type") == "`as'd`." # noqa: RUF001
assert get_short_docstring("`as’d\n:type") == "`as'd`."
assert (
get_short_docstring("`asd <https://link>`\n **Request syntax**::\ntest")
== "[asd](https://link)."
Expand Down
Loading

0 comments on commit c260871

Please sign in to comment.