Skip to content

Commit

Permalink
Update sanity check
Browse files Browse the repository at this point in the history
  • Loading branch information
vemel committed Nov 26, 2024
1 parent b55973c commit d84ebf4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 29 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 @@ -25,7 +25,7 @@
*keyword.kwlist,
}
AWS_LINK_RE: Final = re.compile(r"`([^`]+\S)\s*<https://(\S+)>`\_*")
REPLACE_DOCSTRING_CHARS: Final = MappingProxyType({"’": "'", "–": "-"})
REPLACE_DOCSTRING_CHARS: Final = MappingProxyType({"’": "'", "–": "-", " ": " "}) # noqa: RUF001


def get_class_prefix(func_name: str) -> str:
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ 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
38 changes: 12 additions & 26 deletions scripts/check_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ def run_ruff(path: Path) -> None:
"B",
"I",
"N",
"D",
"C4",
"C90",
"RUF",
Expand All @@ -167,31 +166,18 @@ def run_ruff(path: Path) -> None:
"FURB",
]
ignore_errors = [
"A002",
"B014",
"D200",
"D101",
"D102",
"D105",
"D107",
"D203",
"D205",
"D212",
"D400",
"D401",
"D403",
"D404",
"D415",
"D418",
"E203",
"E501",
"N802",
"N803",
"N812",
"PYI036",
"RET503",
"UP004",
"UP013",
"A002", # builtin-argument-shadowing
"B014", # duplicate-handler-exception
"E203", # whitespace-before-comment
"E501", # line-too-long
"E741", # ambiguous-variable-name
"N802", # invalid-function-name
"N803", # invalid-argument-name
"N812", # lowercase-imported-as-non-lowercase
"PYI036", # bad-exit-annotation
"RET503", # implicit-return
"UP004", # useless-object-inheritance
"UP013", # convert-typed-dict-functional-to-class
]
with tempfile.NamedTemporaryFile("w+b") as f:
try:
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 @@ -36,7 +36,7 @@ def test_get_short_docstring(self) -> None:
assert not get_short_docstring("")
assert not get_short_docstring("\n")
assert get_short_docstring("`asd\n:type") == "`asd`."
assert get_short_docstring("`as’d\n:type") == "`as'd`."
assert get_short_docstring("`as’d\n:type") == "`as'd`." # noqa: RUF001
assert (
get_short_docstring("`asd <https://link>`\n **Request syntax**::\ntest")
== "[asd](https://link)."
Expand Down

0 comments on commit d84ebf4

Please sign in to comment.