File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ plugins = ["pdm-autoexport"]
19
19
20
20
[tool .pdm .scripts ]
21
21
devserver = " flask --app app run --debug"
22
+ activate = " eval $(pdm venv activate)"
22
23
23
24
[tool .pdm .dev-dependencies ]
24
25
dev = [
Original file line number Diff line number Diff line change @@ -7,14 +7,14 @@ def test_run_type_check_with_pyright():
7
7
b: str = "2" # expect-type-error
8
8
c: int = "3" # expect-type-error
9
9
d: str = 4
10
- e: list[str] = [
11
- i # expect-type-error
12
- for i in range(10)
10
+ e: list[str] = [ # expect-type-error
11
+ i for i in range(10)
13
12
]
14
13
"""
15
14
result = ChallengeManager ._type_check_with_pyright (code )
16
15
assert result .passed is False
17
- errors = [line for line in result .stdout .splitlines () if line ]
18
- assert len (errors ) == 3
19
- assert errors [0 ].startswith ("4: error: Incompatible types in assignment" )
20
- assert errors [1 ].startswith ("2: error: Expected type error" )
16
+ assert result .stdout == (
17
+ '4:error: Expression of type "Literal[4]" cannot be assigned to declared type "str"\n '
18
+ "2: error: Expected type error\n \n "
19
+ "Found 2 errors"
20
+ )
You can’t perform that action at this time.
0 commit comments