8000 syntax error messages capitalization by charulatalodha · Pull Request #19114 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

syntax error messages capitalization #19114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 20, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix Test suite py39-windows-64, py39-ubuntu, mypyc-compiled
  • Loading branch information
Charulata Lodha committed May 19, 2025
commit 45d0000c360a68a44ab853be737aa795f01784a1
4 changes: 2 additions & 2 deletions test-data/unit/fine-grained-suggest.test
Original file line number Diff line number Diff line change
Expand Up @@ -1035,10 +1035,10 @@ def foo():

(
[out]
foo.py:4: error: unexpected EOF while parsing
foo.py:4: error: Unexpected EOF while parsing
Command 'suggest' is only valid after a 'check' command (that produces no parse errors)
==
foo.py:4: error: unexpected EOF while parsing
foo.py:4: error: Unexpected EOF while parsing
[out version>=3.10]
foo.py:4: error: '(' was never closed
Command 'suggest' is only valid after a 'check' command (that produces no parse errors)
Expand Down
40 changes: 20 additions & 20 deletions test-data/unit/parse-errors.test
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ file:1: error: Invalid syntax
1
2
[out]
file:2: error: unexpected indent
file:2: error: Unexpected indent

[case testInconsistentIndent]
if x:
1
1
[out]
file:3: error: unexpected indent
file:3: error: Unexpected indent

[case testInconsistentIndent2]
if x:
1
1
[out]
file:3: error: unindent does not match any outer indentation level
file:3: error: Unindent does not match any outer indentation level

[case testInvalidBinaryOp]
1>
Expand All @@ -55,17 +55,17 @@ file:1: error: Invalid syntax
[case testUnexpectedEof]
if 1:
[out]
file:1: error: expected an indented block
file:1: error: Expected an indented block

[case testInvalidKeywordArguments1]
f(x=y, z)
[out]
file:1: error: positional argument follows keyword argument
file:1: error: Positional argument follows keyword argument

[case testInvalidKeywordArguments2]
f(**x, y)
[out]
file:1: error: positional argument follows keyword argument unpacking
file:1: error: Positional argument follows keyword argument unpacking

[case testInvalidBareAsteriskAndVarArgs2]
def f(*x: A, *) -> None: pass
Expand All @@ -80,22 +80,22 @@ file:1: error: Invalid syntax
[case testInvalidBareAsteriskAndVarArgs4]
def f(*, **x: A) -> None: pass
[out]
file:1: error: named arguments must follow bare *
file:1: error: Named arguments must follow bare *

[case testInvalidBareAsterisk1]
def f(*) -> None: pass
[out]
file:1: error: named arguments must follow bare *
file:1: error: Named arguments must follow bare *

[case testInvalidBareAsterisk2]
def f(x, *) -> None: pass
[out]
file:1: error: named arguments must follow bare *
file:1: error: Named arguments must follow bare *

[case testInvalidFuncDefArgs1]
def f(x = y, x): pass
[out]
file:1: error: non-default argument follows default argument
file:1: error: Non-default argument follows default argument

[case testInvalidFuncDefArgs3]
def f(**x, y):
Expand Down Expand Up @@ -154,7 +154,7 @@ file:2: error: Syntax error in type comment "A B"
[case testMissingBracket]
def foo(
[out]
file:1: error: unexpected EOF while parsing
file:1: error: Unexpected EOF while parsing
[out version>=3.10]
file:1: error: '(' was never closed

Expand Down Expand Up @@ -362,48 +362,48 @@ file:1: error: Invalid syntax
[case testParseErrorInExtendedSlicing]
x[:,
[out]
file:1: error: unexpected EOF while parsing
file:1: error: Unexpected EOF while parsing

[case testParseErrorInExtendedSlicing2]
x[:,::
[out]
file:1: error: unexpected EOF while parsing
file:1: error: Unexpected EOF while parsing

[case testParseErrorInExtendedSlicing3]
x[:,:
[out]
file:1: error: unexpected EOF while parsing
file:1: error: Unexpected EOF while parsing

[case testInvalidEncoding]
# foo
# coding: uft-8
[out]
file:0: error: unknown encoding: uft-8
file:0: error: Unknown encoding: uft-8

[case testInvalidEncoding2]
# coding=Uft.8
[out]
file:0: error: unknown encoding: Uft.8
file:0: error: Unknown encoding: Uft.8

[case testInvalidEncoding3]
#!/usr/bin python
# vim: set fileencoding=uft8 :
[out]
file:0: error: unknown encoding: uft8
file:0: error: Unknown encoding: uft8

[case testDoubleEncoding]
# coding: uft8
# coding: utf8
# The first coding cookie should be used and fail.
[out]
file:0: error: unknown encoding: uft8
file:0: error: Unknown encoding: uft8

[case testDoubleEncoding2]
# Again the first cookie should be used and fail.
# coding: uft8
# coding: utf8
[out]
file:0: error: unknown encoding: uft8
file:0: error: Unknown encoding: uft8

[case testLongLiteralInPython3]
2L
Expand Down Expand Up @@ -434,7 +434,7 @@ file:1: error: Invalid syntax
[case testSmartQuotes]
foo = ‘bar’
[out]
file:1: error: invalid character '‘' (U+2018)
file:1: error: Invalid character '‘' (U+2018)

[case testExceptCommaInPython3]
try:
Expand Down
2 changes: 1 addition & 1 deletion test-data/unit/semanal-errors.test
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ main:2: error: Cannot delete function call
x = 1
del x + 1
[out]
main:2: error: cannot delete operator
main:2: error: Cannot delete operator
[out version>=3.10]
main:2: error: Cannot delete expression

Expand Down
0