Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
bd3c60a
Creating if branch to check for TupleExpr
Malika1109 Dec 1, 2023
8a0aee6
Checking if all elements iin the TupleExpr are enums
Malika1109 Dec 1, 2023
23d13f9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 1, 2023
f73e3fa
Fixed indent issues
Malika1109 Dec 1, 2023
aaec558
Merge branch 'in-exhaustive-checking' of https://github.com/Malika110…
Malika1109 Dec 1, 2023
e14adcb
Modified operators.py
Malika1109 Dec 1, 2023
018cf15
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 1, 2023
38102c7
Fixed formatting issues
Malika1109 Dec 1, 2023
a3fb558
Merge branch 'master' into in-exhaustive-checking
Malika1109 Dec 1, 2023
cd9826c
Merging purposes commit
Malika1109 Dec 1, 2023
ec1c3d4
Merging purposes commit
Malika1109 Dec 1, 2023
526f430
Resolved merge conflicts in typinig_extensions.pyi
Malika1109 Dec 1, 2023
605f66c
Resolved merge conflicts in typinig_extensions.pyi
Malika1109 Dec 1, 2023
c70b3f1
Merge pull request #1 from python/master
Malika1109 Dec 1, 2023
b56ab60
Resolved formatting issues
Malika1109 Dec 1, 2023
8116d9f
Merge branch 'master' of https://github.com/Malika1109/mypy into in-e…
Malika1109 Dec 1, 2023
090bc6f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 1, 2023
2df876c
Modified pyproject.tomll for ruff error
Malika1109 Dec 2, 2023
4a9e582
Made changes to handling of in for open-source errors
Malika1109 Dec 4, 2023
9bd590e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 4, 2023
6dd351c
Changed handling of in operator
Malika1109 Dec 4, 2023
17e1b7e
Changed handling of in operator
Malika1109 Dec 4, 2023
30b6cae
successfully created the check-in-exhaustive-checking-3.test file for…
a-khaldi Dec 5, 2023
fc611bc
removed the 3 in the name of the file for clarity + began the test wi…
a-khaldi Dec 5, 2023
4d38b0b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 5, 2023
4420ed8
testing is done without any comments, want to make sure it passes bef…
a-khaldi Dec 5, 2023
652caa4
testing is done without any comments, want to make sure it passes bef…
a-khaldi Dec 5, 2023
b4bf17a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 5, 2023
55d3b2f
removed unneeded comments & code
ssaloos Dec 5, 2023
16ca296
Delete feature-test.py for PR
GulnazSerikbay Dec 5, 2023
e7694a8
added comments for clarity and minor changes to in exhaustive checkin…
Dec 6, 2023
64a8ab5
added some enum type extraction + test
GulnazSerikbay Dec 6, 2023
6973a96
Merge branch
GulnazSerikbay Dec 6, 2023
5a060f7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 6, 2023
8144105
small fix
GulnazSerikbay Dec 6, 2023
69aec40
merge for pull and push
GulnazSerikbay Dec 6, 2023
046370e
removed some code
GulnazSerikbay Dec 6, 2023
06c8d98
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 6, 2023
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
testing is done without any comments, want to make sure it passes bef…
…ore merging and commenting
  • Loading branch information
a-khaldi committed Dec 5, 2023
commit 4420ed81807898b34d62dcc5785bfb51e1b50b87
22 changes: 21 additions & 1 deletion test-data/unit/check-in-exhaustive-checking.test
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
[case testInExhaustiveChecking]
[case testInExhaustiveChecking]

[builtins fixtures/tuple.pyi]
from typing_extensions import NoReturn
from enum import Enum
from typing_extensions import assert_never

class MyEnum(Enum):
A = 1
B = 2
C = 3

def test_function(a: MyEnum) -> bool:
if a == MyEnum.A:
return True
elif a in (MyEnum.B, MyEnum.C):
return False
assert_never(a)

test_function(MyEnum.A)
# E: Argument 1 to "assert_never" has incompatible type "Literal[MyEnum.B, MyEnum.C]"; expected "NoReturn"