wemake-python-styleguide
wemake-python-styleguide copied to clipboard
WPS226: Ignore use of ellipsis constant ('...')
Rule request
Thesis
It's very common to use ellipsis (...) to indicate a string output has been shortened.
I'm using the textwrap utility module from Python and you quickly break the rule WPS226
that prevents literal overuse.
Here is a contrived example:
import textwrap
def __str__(self):
return textwrap.shorten(
text='{0}'.format(
self.question.text,
),
width=40,
placeholder='...',
)
Reasoning
I think ellipsis '...' is a known concept and as a literal would not degrade the readability of the code.
Ok, seems reasonable. Please, send a PR
Will do 👍
On 18 Nov 2022, at 10:43, Nikita Sobolev wrote:
Ok, seems reasonable. Please, send a PR
-- Reply to this email directly or view it on GitHub: https://github.com/wemake-services/wemake-python-styleguide/issues/2545#issuecomment-1319829179 You are receiving this because you authored the thread.
Message ID: @.***>