Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
560841b
Add test suite
sharkdp Jun 18, 2025
3b2f270
Rename public => end of scope
sharkdp Jun 18, 2025
cb45082
Initial attempt
sharkdp Jun 18, 2025
c031c15
Only use all bindings for within-module lookups
sharkdp Jun 18, 2025
c911bbb
The same exercise for declarations
sharkdp Jun 18, 2025
117dc98
salsa::Update
sharkdp Jun 20, 2025
8df3704
Add more tests
sharkdp Jun 20, 2025
9914f62
Initial hacky version of overload filtering
sharkdp Jun 23, 2025
1b78692
Document more limitations
sharkdp Jun 23, 2025
1e257aa
Update builtins
sharkdp Jun 23, 2025
1f29c8e
Update text
sharkdp Jun 23, 2025
b3b817b
Less hacky implementation
sharkdp Jun 23, 2025
f90da4a
Add skip_check's for the fuzzer panics
sharkdp Jun 24, 2025
6808a61
Test suite improvements
sharkdp Jun 24, 2025
4981a77
Minor updates to tests
sharkdp Jun 24, 2025
4953ccb
Refactoring
sharkdp Jun 25, 2025
2429966
Fix https://github.com/astral-sh/ty/issues/699
sharkdp Jun 25, 2025
a304383
Replace bool flag with enum
sharkdp Jun 25, 2025
ddb3081
Better overload handling
sharkdp Jun 25, 2025
bda2550
Document definitely-declared behavior
sharkdp Jun 25, 2025
3573c32
Analyze boundness closer
sharkdp Jun 25, 2025
d6c8500
Cleanup
sharkdp Jun 25, 2025
ac73e10
Update fuzzer seeds
sharkdp Jun 25, 2025
f48930e
Wording and clarifications in test suite
sharkdp Jun 26, 2025
90bd247
Revert fuzzer changes
sharkdp Jun 26, 2025
a4d73e5
Remove TODOs related to deferred annotations
sharkdp Jun 26, 2025
af4b307
Address various minor review comments
sharkdp Jun 26, 2025
e02176b
Fix comment
sharkdp Jun 26, 2025
4226670
Filter out overloads from bindings as well
sharkdp Jun 26, 2025
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
18 changes: 18 additions & 0 deletions crates/ty_python_semantic/resources/mdtest/declaration/error.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,24 @@ def _(flag1: bool, flag2: bool):
x = 1 # error: [conflicting-declarations] "Conflicting declared types for `x`: str, int"
```

## Incompatible declarations with repeated types

```py
def _(flag1: bool, flag2: bool, flag3: bool, flag4: bool):
if flag1:
x: str
elif flag2:
x: int
elif flag3:
x: int
elif flag4:
x: str
else:
x: bytes

x = "a" # error: [conflicting-declarations] "Conflicting declared types for `x`: str, int, bytes"
```

## Incompatible declarations with bad assignment

```py
Expand Down
Loading
Loading