Skip to content

Commit

Permalink
Add documentation for duplicate-string-formatting-argument and bidire…
Browse files Browse the repository at this point in the history
…ctional-unicode (#8269)


Co-authored-by: Pierre Sassoulas <[email protected]>
  • Loading branch information
ollie-iterators and Pierre-Sassoulas authored Feb 12, 2023
1 parent d1b55f4 commit fadd9dc
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 4 deletions.
2 changes: 2 additions & 0 deletions doc/data/messages/b/bidirectional-unicode/bad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# +1: [bidirectional-unicode]
example = "x‏" * 100 # "‏x" is assigned
1 change: 0 additions & 1 deletion doc/data/messages/b/bidirectional-unicode/details.rst

This file was deleted.

2 changes: 1 addition & 1 deletion doc/data/messages/b/bidirectional-unicode/good.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# This is a placeholder for correct code for this message.
example = "x[U+2194]" * 100
26 changes: 26 additions & 0 deletions doc/data/messages/d/duplicate-string-formatting-argument/bad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# pylint: disable=missing-docstring, consider-using-f-string

SEE = "see 👀"
SEA = "sea 🌊"

# +1: [duplicate-string-formatting-argument,duplicate-string-formatting-argument]
CONST = """
A sailor went to {}, {}, {}
To {} what he could {}, {}, {}
But all that he could {}, {}, {}
Was the bottom of the deep blue {}, {}, {}!
""".format(
SEA,
SEA,
SEA,
SEE,
SEE,
SEE,
SEE,
SEE,
SEE,
SEE,
SEA,
SEA,
SEA,
)

This file was deleted.

15 changes: 14 additions & 1 deletion doc/data/messages/d/duplicate-string-formatting-argument/good.py
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
# This is a placeholder for correct code for this message.
# pylint: disable=missing-docstring, consider-using-f-string

SEE = "see 👀"
SEA = "sea 🌊"

# +1: [duplicate-string-formatting-argument,duplicate-string-formatting-argument]
CONST = """
A sailor went to {sea}, {sea}, {sea}
To {see} what he could {see}, {see}, {see}
But all that he could {see}, {see}, {see}
Was the bottom of the deep blue {sea}, {sea}, {sea}!
""".format(
sea=SEA, see=SEE
)

0 comments on commit fadd9dc

Please sign in to comment.