Commit ac2c530
authored
[ty] Handle decorators which return unions of
## Summary
If a function is decorated with a decorator that returns a union of
`Callable`s, also treat it as a union of function-like `Callable`s.
Labeling as `internal`, since the previous change has not been released
yet.
## Test Plan
New regression test.Callables (#20858)1 parent c69fa75 commit ac2c530
File tree
2 files changed
+43
-9
lines changed- crates/ty_python_semantic
- resources/mdtest/call
- src/types/infer
2 files changed
+43
-9
lines changedLines changed: 19 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
148 | 164 | | |
149 | 165 | | |
150 | 166 | | |
151 | 167 | | |
152 | 168 | | |
153 | | - | |
| 169 | + | |
154 | 170 | | |
155 | 171 | | |
156 | | - | |
| 172 | + | |
157 | 173 | | |
158 | 174 | | |
159 | 175 | | |
160 | 176 | | |
161 | 177 | | |
162 | 178 | | |
163 | | - | |
| 179 | + | |
164 | 180 | | |
165 | 181 | | |
166 | 182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2199 | 2199 | | |
2200 | 2200 | | |
2201 | 2201 | | |
| 2202 | + | |
| 2203 | + | |
| 2204 | + | |
| 2205 | + | |
| 2206 | + | |
| 2207 | + | |
| 2208 | + | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
| 2212 | + | |
| 2213 | + | |
| 2214 | + | |
| 2215 | + | |
| 2216 | + | |
| 2217 | + | |
| 2218 | + | |
| 2219 | + | |
2202 | 2220 | | |
2203 | 2221 | | |
2204 | 2222 | | |
2205 | 2223 | | |
2206 | | - | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
| 2228 | + | |
2207 | 2229 | | |
2208 | 2230 | | |
2209 | 2231 | | |
2210 | | - | |
2211 | | - | |
2212 | | - | |
2213 | | - | |
2214 | | - | |
| 2232 | + | |
2215 | 2233 | | |
2216 | 2234 | | |
2217 | 2235 | | |
| |||
0 commit comments