Commit caa1450
authored
Don't treat annotations as redefinitions in
## Summary
In #10341, we fixed some false
positives in `.pyi` files, but introduced others. This PR effectively
reverts the change in #10341 and fixes it in a slightly different way.
Instead of changing the _bindings_ we generate in the semantic model in
`.pyi` files, we instead change how we _resolve_ them.
Closes #10509..pyi files (#10512)1 parent 60fd98e commit caa1450
5 files changed
Lines changed: 40 additions & 8 deletions
File tree
- crates
- ruff_linter
- resources/test/fixtures/pyflakes
- src
- checkers/ast
- rules/pyflakes
- snapshots
- ruff_python_semantic/src
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1836 | 1836 | | |
1837 | 1837 | | |
1838 | 1838 | | |
1839 | | - | |
| 1839 | + | |
1840 | 1840 | | |
1841 | 1841 | | |
1842 | 1842 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
400 | | - | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
401 | 404 | | |
402 | 405 | | |
403 | 406 | | |
| |||
1570 | 1573 | | |
1571 | 1574 | | |
1572 | 1575 | | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
1573 | 1581 | | |
1574 | 1582 | | |
1575 | 1583 | | |
| |||
1675 | 1683 | | |
1676 | 1684 | | |
1677 | 1685 | | |
1678 | | - | |
| 1686 | + | |
1679 | 1687 | | |
1680 | 1688 | | |
1681 | 1689 | | |
| |||
1875 | 1883 | | |
1876 | 1884 | | |
1877 | 1885 | | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
1878 | 1889 | | |
1879 | 1890 | | |
1880 | 1891 | | |
| |||
1883 | 1894 | | |
1884 | 1895 | | |
1885 | 1896 | | |
1886 | | - | |
| 1897 | + | |
1887 | 1898 | | |
1888 | 1899 | | |
1889 | 1900 | | |
| |||
1893 | 1904 | | |
1894 | 1905 | | |
1895 | 1906 | | |
1896 | | - | |
| 1907 | + | |
1897 | 1908 | | |
1898 | 1909 | | |
1899 | 1910 | | |
1900 | 1911 | | |
1901 | 1912 | | |
1902 | 1913 | | |
1903 | 1914 | | |
1904 | | - | |
| 1915 | + | |
1905 | 1916 | | |
1906 | 1917 | | |
1907 | 1918 | | |
1908 | 1919 | | |
1909 | 1920 | | |
1910 | 1921 | | |
1911 | 1922 | | |
1912 | | - | |
| 1923 | + | |
1913 | 1924 | | |
1914 | 1925 | | |
1915 | 1926 | | |
| |||
1928 | 1939 | | |
1929 | 1940 | | |
1930 | 1941 | | |
1931 | | - | |
| 1942 | + | |
1932 | 1943 | | |
1933 | 1944 | | |
1934 | 1945 | | |
| |||
1953 | 1964 | | |
1954 | 1965 | | |
1955 | 1966 | | |
| 1967 | + | |
1956 | 1968 | | |
1957 | 1969 | | |
1958 | 1970 | | |
| |||
0 commit comments