Skip to content

Commit 8fdb4cb

Browse files
authored
Explain to developers how to type ellipsis (#11465)
1 parent 858711a commit 8fdb4cb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

scripts/lint.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,16 +170,14 @@ def lint_line(
170170
# but we also care about beautiful docs, so at the moment this lint is quite "inclusive".
171171
if ellipsis.search(line):
172172
has_quote = '"' in line or "'" in line
173-
if has_quote and "Callable" not in line:
174-
return "Use … instead of ..."
175-
elif (
173+
if (has_quote and "Callable" not in line) or (
176174
file_extension not in "py"
177175
and not ellipsis_expression.search(line)
178176
and not ellipsis_import.search(line)
179177
and not ellipsis_bare.search(line)
180178
and not ellipsis_reference.search(line)
181179
):
182-
return "Use … instead of ..."
180+
return "Use … instead of ... (on Mac it's option+;)"
183181

184182
if "http" not in line:
185183
if re.search(r"\b2d\b", line):

0 commit comments

Comments
 (0)