Skip to content

Commit

Permalink
Add documentation for messages with anomalous in their name
Browse files Browse the repository at this point in the history
Co-authored-by: Vladyslav Krylasov <vladyslav.krylasov@gmail.com>
  • Loading branch information
DanielNoord and sprytnyk committed Mar 24, 2022
1 parent a5a5701 commit 4c82837
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/data/messages/a/anomalous-backslash-in-string/bad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
string = "\z" # [anomalous-backslash-in-string]
2 changes: 2 additions & 0 deletions doc/data/messages/a/anomalous-backslash-in-string/good.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
string = r"\z"
string = "\n"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print(b"\u{0}".format("0394")) # [anomalous-unicode-escape-in-string]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print(b"\\u{0}".format("0394"))
1 change: 1 addition & 0 deletions doc/test_messages_documentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def _runTest(self) -> None:


@pytest.mark.parametrize("test_file", TESTS, ids=TESTS_NAMES)
@pytest.mark.filterwarnings("ignore::DeprecationWarning")
def test_code_examples(test_file: Tuple[str, Path]) -> None:
lint_test = LintModuleTest(test_file)
lint_test.runTest()

0 comments on commit 4c82837

Please sign in to comment.