Merge remote-tracking branch 'origin/main' into dcreager/callable-return

* origin/main:
  [ty] Allow `tuple[Any, ...]` to assign to `tuple[int, *tuple[int, ...]]` (#21803)
  [ty] Support renaming import aliases (#21792)
  [ty] Add redeclaration LSP tests (#21812)
  [ty] more detailed description of "Size limit on unions of literals" in mdtest (#21804)
  [ty] Complete support for `ParamSpec` (#21445)
  [ty] Update benchmark dependencies (#21815)
This commit is contained in:
Douglas Creager 2025-12-05 15:39:40 -05:00
commit db488e3cf7
53 changed files with 10787 additions and 7128 deletions

View File

@ -236,4 +236,52 @@ def test():
assert_snapshot!(test.document_highlights(), @"No highlights found");
}
// TODO: Should only highlight the last use and the last declaration
#[test]
fn redeclarations() {
let test = CursorTest::builder()
.source(
"main.py",
r#"
a: str = "test"
a: int = 10
print(a<CURSOR>)
"#,
)
.build();
assert_snapshot!(test.document_highlights(), @r#"
info[document_highlights]: Highlight 1 (Write)
--> main.py:2:1
|
2 | a: str = "test"
| ^
3 |
4 | a: int = 10
|
info[document_highlights]: Highlight 2 (Write)
--> main.py:4:1
|
2 | a: str = "test"
3 |
4 | a: int = 10
| ^
5 |
6 | print(a)
|
info[document_highlights]: Highlight 3 (Read)
--> main.py:6:7
|
4 | a: int = 10
5 |
6 | print(a)
| ^
|
"#);
}
}

View File

@ -2113,4 +2113,52 @@ func<CURSOR>_alias()
|
");
}
// TODO: Should only return references to the last declaration
#[test]
fn declarations() {
let test = CursorTest::builder()
.source(
"main.py",
r#"
a: str = "test"
a: int = 10
print(a<CURSOR>)
"#,
)
.build();
assert_snapshot!(test.references(), @r#"
info[references]: Reference 1
--> main.py:2:1
|
2 | a: str = "test"
| ^
3 |
4 | a: int = 10
|
info[references]: Reference 2
--> main.py:4:1
|
2 | a: str = "test"
3 |
4 | a: int = 10
| ^
5 |
6 | print(a)
|
info[references]: Reference 3
--> main.py:6:7
|
4 | a: int = 10
5 |
6 | print(a)
| ^
|
"#);
}
}

View File

@ -73,19 +73,29 @@ pub(crate) enum GotoTarget<'a> {
/// ```
ImportModuleAlias {
alias: &'a ast::Alias,
asname: &'a ast::Identifier,
},
/// In an import statement, the named under which the symbol is exported
/// in the imported file.
///
/// ```py
/// from foo import bar as baz
/// ^^^
/// ```
ImportExportedName {
alias: &'a ast::Alias,
import_from: &'a ast::StmtImportFrom,
},
/// Import alias in from import statement
/// ```py
/// from foo import bar as baz
/// ^^^
/// from foo import bar as baz
/// ^^^
/// ```
ImportSymbolAlias {
alias: &'a ast::Alias,
range: TextRange,
import_from: &'a ast::StmtImportFrom,
asname: &'a ast::Identifier,
},
/// Go to on the exception handler variable
@ -290,8 +300,9 @@ impl GotoTarget<'_> {
GotoTarget::FunctionDef(function) => function.inferred_type(model),
GotoTarget::ClassDef(class) => class.inferred_type(model),
GotoTarget::Parameter(parameter) => parameter.inferred_type(model),
GotoTarget::ImportSymbolAlias { alias, .. } => alias.inferred_type(model),
GotoTarget::ImportModuleAlias { alias } => alias.inferred_type(model),
GotoTarget::ImportSymbolAlias { alias, .. }
| GotoTarget::ImportModuleAlias { alias, .. }
| GotoTarget::ImportExportedName { alias, .. } => alias.inferred_type(model),
GotoTarget::ExceptVariable(except) => except.inferred_type(model),
GotoTarget::KeywordArgument { keyword, .. } => keyword.value.inferred_type(model),
// When asking the type of a callable, usually you want the callable itself?
@ -378,7 +389,9 @@ impl GotoTarget<'_> {
alias_resolution: ImportAliasResolution,
) -> Option<Definitions<'db>> {
let definitions = match self {
GotoTarget::Expression(expression) => definitions_for_expression(model, *expression),
GotoTarget::Expression(expression) => {
definitions_for_expression(model, *expression, alias_resolution)
}
// For already-defined symbols, they are their own definitions
GotoTarget::FunctionDef(function) => Some(vec![ResolvedDefinition::Definition(
function.definition(model),
@ -393,22 +406,21 @@ impl GotoTarget<'_> {
)]),
// For import aliases (offset within 'y' or 'z' in "from x import y as z")
GotoTarget::ImportSymbolAlias {
alias, import_from, ..
} => {
if let Some(asname) = alias.asname.as_ref()
&& alias_resolution == ImportAliasResolution::PreserveAliases
{
Some(definitions_for_name(model, asname.as_str(), asname.into()))
} else {
let symbol_name = alias.name.as_str();
Some(definitions_for_imported_symbol(
model,
import_from,
symbol_name,
alias_resolution,
))
}
GotoTarget::ImportSymbolAlias { asname, .. } => Some(definitions_for_name(
model,
asname.as_str(),
AnyNodeRef::from(*asname),
alias_resolution,
)),
GotoTarget::ImportExportedName { alias, import_from } => {
let symbol_name = alias.name.as_str();
Some(definitions_for_imported_symbol(
model,
import_from,
symbol_name,
alias_resolution,
))
}
GotoTarget::ImportModuleComponent {
@ -423,15 +435,12 @@ impl GotoTarget<'_> {
}
// Handle import aliases (offset within 'z' in "import x.y as z")
GotoTarget::ImportModuleAlias { alias } => {
if let Some(asname) = alias.asname.as_ref()
&& alias_resolution == ImportAliasResolution::PreserveAliases
{
Some(definitions_for_name(model, asname.as_str(), asname.into()))
} else {
definitions_for_module(model, Some(alias.name.as_str()), 0)
}
}
GotoTarget::ImportModuleAlias { asname, .. } => Some(definitions_for_name(
model,
asname.as_str(),
AnyNodeRef::from(*asname),
alias_resolution,
)),
// Handle keyword arguments in call expressions
GotoTarget::KeywordArgument {
@ -454,12 +463,22 @@ impl GotoTarget<'_> {
// because they're not expressions
GotoTarget::PatternMatchRest(pattern_mapping) => {
pattern_mapping.rest.as_ref().map(|name| {
definitions_for_name(model, name.as_str(), AnyNodeRef::Identifier(name))
definitions_for_name(
model,
name.as_str(),
AnyNodeRef::Identifier(name),
alias_resolution,
)
})
}
GotoTarget::PatternMatchAsName(pattern_as) => pattern_as.name.as_ref().map(|name| {
definitions_for_name(model, name.as_str(), AnyNodeRef::Identifier(name))
definitions_for_name(
model,
name.as_str(),
AnyNodeRef::Identifier(name),
alias_resolution,
)
}),
GotoTarget::PatternKeywordArgument(pattern_keyword) => {
@ -468,12 +487,18 @@ impl GotoTarget<'_> {
model,
name.as_str(),
AnyNodeRef::Identifier(name),
alias_resolution,
))
}
GotoTarget::PatternMatchStarName(pattern_star) => {
pattern_star.name.as_ref().map(|name| {
definitions_for_name(model, name.as_str(), AnyNodeRef::Identifier(name))
definitions_for_name(
model,
name.as_str(),
AnyNodeRef::Identifier(name),
alias_resolution,
)
})
}
@ -481,9 +506,18 @@ impl GotoTarget<'_> {
//
// Prefer the function impl over the callable so that its docstrings win if defined.
GotoTarget::Call { callable, call } => {
let mut definitions = definitions_for_callable(model, call);
let mut definitions = Vec::new();
// We prefer the specific overload for hover, go-to-def etc. However,
// `definitions_for_callable` always resolves import aliases. That's why we
// skip it in cases import alias resolution is turned of (rename, highlight references).
if alias_resolution == ImportAliasResolution::ResolveAliases {
definitions.extend(definitions_for_callable(model, call));
}
let expr_definitions =
definitions_for_expression(model, *callable).unwrap_or_default();
definitions_for_expression(model, *callable, alias_resolution)
.unwrap_or_default();
definitions.extend(expr_definitions);
if definitions.is_empty() {
@ -517,7 +551,7 @@ impl GotoTarget<'_> {
let subexpr = covering_node(subast.syntax().into(), *subrange)
.node()
.as_expr_ref()?;
definitions_for_expression(&submodel, subexpr)
definitions_for_expression(&submodel, subexpr, alias_resolution)
}
// nonlocal and global are essentially loads, but again they're statements,
@ -527,6 +561,7 @@ impl GotoTarget<'_> {
model,
identifier.as_str(),
AnyNodeRef::Identifier(identifier),
alias_resolution,
))
}
@ -537,6 +572,7 @@ impl GotoTarget<'_> {
model,
name.as_str(),
AnyNodeRef::Identifier(name),
alias_resolution,
))
}
@ -546,6 +582,7 @@ impl GotoTarget<'_> {
model,
name.as_str(),
AnyNodeRef::Identifier(name),
alias_resolution,
))
}
@ -555,6 +592,7 @@ impl GotoTarget<'_> {
model,
name.as_str(),
AnyNodeRef::Identifier(name),
alias_resolution,
))
}
};
@ -580,12 +618,9 @@ impl GotoTarget<'_> {
GotoTarget::FunctionDef(function) => Some(Cow::Borrowed(function.name.as_str())),
GotoTarget::ClassDef(class) => Some(Cow::Borrowed(class.name.as_str())),
GotoTarget::Parameter(parameter) => Some(Cow::Borrowed(parameter.name.as_str())),
GotoTarget::ImportSymbolAlias { alias, .. } => {
if let Some(asname) = &alias.asname {
Some(Cow::Borrowed(asname.as_str()))
} else {
Some(Cow::Borrowed(alias.name.as_str()))
}
GotoTarget::ImportSymbolAlias { asname, .. } => Some(Cow::Borrowed(asname.as_str())),
GotoTarget::ImportExportedName { alias, .. } => {
Some(Cow::Borrowed(alias.name.as_str()))
}
GotoTarget::ImportModuleComponent {
module_name,
@ -599,13 +634,7 @@ impl GotoTarget<'_> {
Some(Cow::Borrowed(module_name))
}
}
GotoTarget::ImportModuleAlias { alias } => {
if let Some(asname) = &alias.asname {
Some(Cow::Borrowed(asname.as_str()))
} else {
Some(Cow::Borrowed(alias.name.as_str()))
}
}
GotoTarget::ImportModuleAlias { asname, .. } => Some(Cow::Borrowed(asname.as_str())),
GotoTarget::ExceptVariable(except) => {
Some(Cow::Borrowed(except.name.as_ref()?.as_str()))
}
@ -667,7 +696,7 @@ impl GotoTarget<'_> {
// Is the offset within the alias name (asname) part?
if let Some(asname) = &alias.asname {
if asname.range.contains_inclusive(offset) {
return Some(GotoTarget::ImportModuleAlias { alias });
return Some(GotoTarget::ImportModuleAlias { alias, asname });
}
}
@ -699,21 +728,13 @@ impl GotoTarget<'_> {
// Is the offset within the alias name (asname) part?
if let Some(asname) = &alias.asname {
if asname.range.contains_inclusive(offset) {
return Some(GotoTarget::ImportSymbolAlias {
alias,
range: asname.range,
import_from,
});
return Some(GotoTarget::ImportSymbolAlias { alias, asname });
}
}
// Is the offset in the original name part?
if alias.name.range.contains_inclusive(offset) {
return Some(GotoTarget::ImportSymbolAlias {
alias,
range: alias.name.range,
import_from,
});
return Some(GotoTarget::ImportExportedName { alias, import_from });
}
None
@ -893,12 +914,13 @@ impl Ranged for GotoTarget<'_> {
GotoTarget::FunctionDef(function) => function.name.range,
GotoTarget::ClassDef(class) => class.name.range,
GotoTarget::Parameter(parameter) => parameter.name.range,
GotoTarget::ImportSymbolAlias { range, .. } => *range,
GotoTarget::ImportSymbolAlias { asname, .. } => asname.range,
Self::ImportExportedName { alias, .. } => alias.name.range,
GotoTarget::ImportModuleComponent {
component_range, ..
} => *component_range,
GotoTarget::StringAnnotationSubexpr { subrange, .. } => *subrange,
GotoTarget::ImportModuleAlias { alias } => alias.asname.as_ref().unwrap().range,
GotoTarget::ImportModuleAlias { asname, .. } => asname.range,
GotoTarget::ExceptVariable(except) => except.name.as_ref().unwrap().range,
GotoTarget::KeywordArgument { keyword, .. } => keyword.arg.as_ref().unwrap().range,
GotoTarget::PatternMatchRest(rest) => rest.rest.as_ref().unwrap().range,
@ -955,12 +977,14 @@ fn convert_resolved_definitions_to_targets<'db>(
fn definitions_for_expression<'db>(
model: &SemanticModel<'db>,
expression: ruff_python_ast::ExprRef<'_>,
alias_resolution: ImportAliasResolution,
) -> Option<Vec<ResolvedDefinition<'db>>> {
match expression {
ast::ExprRef::Name(name) => Some(definitions_for_name(
model,
name.id.as_str(),
expression.into(),
alias_resolution,
)),
ast::ExprRef::Attribute(attribute) => Some(ty_python_semantic::definitions_for_attribute(
model, attribute,

View File

@ -2894,6 +2894,86 @@ def ab(a: int, *, c: int): ...
");
}
// TODO: Should only return `a: int`
#[test]
fn redeclarations() {
let test = CursorTest::builder()
.source(
"main.py",
r#"
a: str = "test"
a: int = 10
print(a<CURSOR>)
a: bool = True
"#,
)
.build();
assert_snapshot!(test.goto_declaration(), @r#"
info[goto-declaration]: Declaration
--> main.py:2:1
|
2 | a: str = "test"
| ^
3 |
4 | a: int = 10
|
info: Source
--> main.py:6:7
|
4 | a: int = 10
5 |
6 | print(a)
| ^
7 |
8 | a: bool = True
|
info[goto-declaration]: Declaration
--> main.py:4:1
|
2 | a: str = "test"
3 |
4 | a: int = 10
| ^
5 |
6 | print(a)
|
info: Source
--> main.py:6:7
|
4 | a: int = 10
5 |
6 | print(a)
| ^
7 |
8 | a: bool = True
|
info[goto-declaration]: Declaration
--> main.py:8:1
|
6 | print(a)
7 |
8 | a: bool = True
| ^
|
info: Source
--> main.py:6:7
|
4 | a: int = 10
5 |
6 | print(a)
| ^
7 |
8 | a: bool = True
|
"#);
}
impl CursorTest {
fn goto_declaration(&self) -> String {
let Some(targets) = goto_declaration(&self.db, self.cursor.file, self.cursor.offset)

View File

@ -1714,6 +1714,86 @@ Traceb<CURSOR>ackType
assert_snapshot!(test.goto_definition(), @"No goto target found");
}
// TODO: Should only list `a: int`
#[test]
fn redeclarations() {
let test = CursorTest::builder()
.source(
"main.py",
r#"
a: str = "test"
a: int = 10
print(a<CURSOR>)
a: bool = True
"#,
)
.build();
assert_snapshot!(test.goto_definition(), @r#"
info[goto-definition]: Definition
--> main.py:2:1
|
2 | a: str = "test"
| ^
3 |
4 | a: int = 10
|
info: Source
--> main.py:6:7
|
4 | a: int = 10
5 |
6 | print(a)
| ^
7 |
8 | a: bool = True
|
info[goto-definition]: Definition
--> main.py:4:1
|
2 | a: str = "test"
3 |
4 | a: int = 10
| ^
5 |
6 | print(a)
|
info: Source
--> main.py:6:7
|
4 | a: int = 10
5 |
6 | print(a)
| ^
7 |
8 | a: bool = True
|
info[goto-definition]: Definition
--> main.py:8:1
|
6 | print(a)
7 |
8 | a: bool = True
| ^
|
info: Source
--> main.py:6:7
|
4 | a: int = 10
5 |
6 | print(a)
| ^
7 |
8 | a: bool = True
|
"#);
}
impl CursorTest {
fn goto_definition(&self) -> String {
let Some(targets) = goto_definition(&self.db, self.cursor.file, self.cursor.offset)

View File

@ -2143,15 +2143,13 @@ def function():
"#,
);
// TODO: This should just be `**AB@Alias2 (<variance>)`
// https://github.com/astral-sh/ty/issues/1581
assert_snapshot!(test.hover(), @r"
(
...
) -> tuple[typing.ParamSpec]
(**AB@Alias2) -> tuple[AB@Alias2]
---------------------------------------------
```python
(
...
) -> tuple[typing.ParamSpec]
(**AB@Alias2) -> tuple[AB@Alias2]
```
---------------------------------------------
info[hover]: Hovered content is
@ -2292,12 +2290,12 @@ def function():
"#,
);
// TODO: This should be `P@Alias (<variance>)`
// TODO: Should this be constravariant instead?
assert_snapshot!(test.hover(), @r"
typing.ParamSpec
P@Alias (bivariant)
---------------------------------------------
```python
typing.ParamSpec
P@Alias (bivariant)
```
---------------------------------------------
info[hover]: Hovered content is

View File

@ -37,6 +37,38 @@ pub enum ReferencesMode {
DocumentHighlights,
}
impl ReferencesMode {
pub(super) fn to_import_alias_resolution(self) -> ImportAliasResolution {
match self {
// Resolve import aliases for find references:
// ```py
// from warnings import deprecated as my_deprecated
//
// @my_deprecated
// def foo
// ```
//
// When finding references on `my_deprecated`, we want to find all usages of `deprecated` across the entire
// project.
Self::References | Self::ReferencesSkipDeclaration => {
ImportAliasResolution::ResolveAliases
}
// For rename, don't resolve import aliases.
//
// ```py
// from warnings import deprecated as my_deprecated
//
// @my_deprecated
// def foo
// ```
// When renaming `my_deprecated`, only rename the alias, but not the original definition in `warnings`.
Self::Rename | Self::RenameMultiFile | Self::DocumentHighlights => {
ImportAliasResolution::PreserveAliases
}
}
}
}
/// Find all references to a symbol at the given position.
/// Search for references across all files in the project.
pub(crate) fn references(
@ -45,12 +77,9 @@ pub(crate) fn references(
goto_target: &GotoTarget,
mode: ReferencesMode,
) -> Option<Vec<ReferenceTarget>> {
// Get the definitions for the symbol at the cursor position
// When finding references, do not resolve any local aliases.
let model = SemanticModel::new(db, file);
let target_definitions = goto_target
.get_definition_targets(&model, ImportAliasResolution::PreserveAliases)?
.get_definition_targets(&model, mode.to_import_alias_resolution())?
.declaration_targets(db)?;
// Extract the target text from the goto target for fast comparison
@ -318,7 +347,7 @@ impl LocalReferencesFinder<'_> {
{
// Get the definitions for this goto target
if let Some(current_definitions) = goto_target
.get_definition_targets(self.model, ImportAliasResolution::PreserveAliases)
.get_definition_targets(self.model, self.mode.to_import_alias_resolution())
.and_then(|definitions| definitions.declaration_targets(self.model.db()))
{
// Check if any of the current definitions match our target definitions

View File

@ -3,7 +3,7 @@ use crate::references::{ReferencesMode, references};
use crate::{Db, ReferenceTarget};
use ruff_db::files::File;
use ruff_text_size::{Ranged, TextSize};
use ty_python_semantic::{ImportAliasResolution, SemanticModel};
use ty_python_semantic::SemanticModel;
/// Returns the range of the symbol if it can be renamed, None if not.
pub fn can_rename(db: &dyn Db, file: File, offset: TextSize) -> Option<ruff_text_size::TextRange> {
@ -24,26 +24,22 @@ pub fn can_rename(db: &dyn Db, file: File, offset: TextSize) -> Option<ruff_text
let current_file_in_project = is_file_in_project(db, file);
if let Some(definition_targets) = goto_target
.get_definition_targets(&model, ImportAliasResolution::PreserveAliases)
.and_then(|definitions| definitions.declaration_targets(db))
{
for target in &definition_targets {
let target_file = target.file();
let definition_targets = goto_target
.get_definition_targets(&model, ReferencesMode::Rename.to_import_alias_resolution())?
.declaration_targets(db)?;
// If definition is outside the project, refuse rename
if !is_file_in_project(db, target_file) {
return None;
}
for target in &definition_targets {
let target_file = target.file();
// If current file is not in project and any definition is outside current file, refuse rename
if !current_file_in_project && target_file != file {
return None;
}
// If definition is outside the project, refuse rename
if !is_file_in_project(db, target_file) {
return None;
}
// If current file is not in project and any definition is outside current file, refuse rename
if !current_file_in_project && target_file != file {
return None;
}
} else {
// No definition targets found. This happens for keywords, so refuse rename
return None;
}
Some(goto_target.range())
@ -1186,7 +1182,6 @@ result = func(10, y=20)
");
}
// TODO Should rename the alias
#[test]
fn import_alias() {
let test = CursorTest::builder()
@ -1202,10 +1197,80 @@ result = func(10, y=20)
)
.build();
assert_snapshot!(test.rename("z"), @"Cannot rename");
assert_snapshot!(test.rename("z"), @r"
info[rename]: Rename symbol (found 2 locations)
--> main.py:3:20
|
2 | import warnings
3 | import warnings as abc
| ^^^
4 |
5 | x = abc
| ---
6 | y = warnings
|
");
}
#[test]
fn import_alias_to_first_party_definition() {
let test = CursorTest::builder()
.source("lib.py", "def deprecated(): pass")
.source(
"main.py",
r#"
import lib as lib2<CURSOR>
x = lib2
"#,
)
.build();
assert_snapshot!(test.rename("z"), @r"
info[rename]: Rename symbol (found 2 locations)
--> main.py:2:15
|
2 | import lib as lib2
| ^^^^
3 |
4 | x = lib2
| ----
|
");
}
#[test]
fn imported_first_party_definition() {
let test = CursorTest::builder()
.source("lib.py", "def deprecated(): pass")
.source(
"main.py",
r#"
from lib import deprecated<CURSOR>
x = deprecated
"#,
)
.build();
assert_snapshot!(test.rename("z"), @r"
info[rename]: Rename symbol (found 3 locations)
--> main.py:2:17
|
2 | from lib import deprecated
| ^^^^^^^^^^
3 |
4 | x = deprecated
| ----------
|
::: lib.py:1:5
|
1 | def deprecated(): pass
| ----------
|
");
}
// TODO Should rename the alias
#[test]
fn import_alias_use() {
let test = CursorTest::builder()
@ -1221,7 +1286,19 @@ result = func(10, y=20)
)
.build();
assert_snapshot!(test.rename("z"), @"Cannot rename");
assert_snapshot!(test.rename("z"), @r"
info[rename]: Rename symbol (found 2 locations)
--> main.py:3:20
|
2 | import warnings
3 | import warnings as abc
| ^^^
4 |
5 | x = abc
| ---
6 | y = warnings
|
");
}
#[test]
@ -1427,12 +1504,11 @@ result = func(10, y=20)
");
}
// TODO: This should rename all overloads
#[test]
fn rename_overloaded_function() {
let test = CursorTest::builder()
.source(
"lib1.py",
"lib.py",
r#"
from typing import overload, Any
@ -1450,16 +1526,16 @@ result = func(10, y=20)
.source(
"main.py",
r#"
from lib2 import test
from lib import test
test("test")
"#,
)
.build();
assert_snapshot!(test.rename("better_name"), @r"
info[rename]: Rename symbol (found 1 locations)
--> lib1.py:5:5
assert_snapshot!(test.rename("better_name"), @r#"
info[rename]: Rename symbol (found 3 locations)
--> lib.py:5:5
|
4 | @overload
5 | def test() -> None: ...
@ -1467,7 +1543,117 @@ result = func(10, y=20)
6 | @overload
7 | def test(a: str) -> str: ...
|
");
::: main.py:2:17
|
2 | from lib import test
| ----
3 |
4 | test("test")
| ----
|
"#);
}
#[test]
fn rename_overloaded_method() {
let test = CursorTest::builder()
.source(
"lib.py",
r#"
from typing import overload, Any
class Test:
@overload
def test<CURSOR>() -> None: ...
@overload
def test(a: str) -> str: ...
@overload
def test(a: int) -> int: ...
def test(a: Any) -> Any:
return a
"#,
)
.source(
"main.py",
r#"
from lib import Test
Test().test("test")
"#,
)
.build();
assert_snapshot!(test.rename("better_name"), @r#"
info[rename]: Rename symbol (found 2 locations)
--> lib.py:6:9
|
4 | class Test:
5 | @overload
6 | def test() -> None: ...
| ^^^^
7 | @overload
8 | def test(a: str) -> str: ...
|
::: main.py:4:8
|
2 | from lib import Test
3 |
4 | Test().test("test")
| ----
|
"#);
}
#[test]
fn rename_overloaded_function_usage() {
let test = CursorTest::builder()
.source(
"lib.py",
r#"
from typing import overload, Any
@overload
def test() -> None: ...
@overload
def test(a: str) -> str: ...
@overload
def test(a: int) -> int: ...
def test(a: Any) -> Any:
return a
"#,
)
.source(
"main.py",
r#"
from lib import test
test<CURSOR>("test")
"#,
)
.build();
assert_snapshot!(test.rename("better_name"), @r#"
info[rename]: Rename symbol (found 3 locations)
--> main.py:2:17
|
2 | from lib import test
| ^^^^
3 |
4 | test("test")
| ----
|
::: lib.py:5:5
|
4 | @overload
5 | def test() -> None: ...
| ----
6 | @overload
7 | def test(a: str) -> str: ...
|
"#);
}
#[test]
@ -2034,4 +2220,36 @@ result = func(10, y=20)
|
");
}
// TODO: Should not rename the first declaration
#[test]
fn rename_redeclarations() {
let test = CursorTest::builder()
.source(
"main.py",
r#"
a: str = "test"
a: int = 10
print(a<CURSOR>)
"#,
)
.build();
assert_snapshot!(test.rename("better_name"), @r#"
info[rename]: Rename symbol (found 3 locations)
--> main.py:2:1
|
2 | a: str = "test"
| ^
3 |
4 | a: int = 10
| -
5 |
6 | print(a)
| -
|
"#);
}
}

View File

@ -259,7 +259,11 @@ impl<'db> SemanticTokenVisitor<'db> {
fn classify_name(&self, name: &ast::ExprName) -> (SemanticTokenType, SemanticTokenModifier) {
// First try to classify the token based on its definition kind.
let definition = definition_for_name(self.model, name);
let definition = definition_for_name(
self.model,
name,
ty_python_semantic::ImportAliasResolution::ResolveAliases,
);
if let Some(definition) = definition {
let name_str = name.id.as_str();

View File

@ -307,12 +307,10 @@ Using a `ParamSpec` in a `Callable` annotation:
from typing_extensions import Callable
def _[**P1](c: Callable[P1, int]):
# TODO: Should reveal `ParamSpecArgs` and `ParamSpecKwargs`
reveal_type(P1.args) # revealed: @Todo(ParamSpecArgs / ParamSpecKwargs)
reveal_type(P1.kwargs) # revealed: @Todo(ParamSpecArgs / ParamSpecKwargs)
reveal_type(P1.args) # revealed: P1@_.args
reveal_type(P1.kwargs) # revealed: P1@_.kwargs
# TODO: Signature should be (**P1) -> int
reveal_type(c) # revealed: (...) -> int
reveal_type(c) # revealed: (**P1@_) -> int
```
And, using the legacy syntax:
@ -322,9 +320,8 @@ from typing_extensions import ParamSpec
P2 = ParamSpec("P2")
# TODO: argument list should not be `...` (requires `ParamSpec` support)
def _(c: Callable[P2, int]):
reveal_type(c) # revealed: (...) -> int
reveal_type(c) # revealed: (**P2@_) -> int
```
## Using `typing.Unpack`

View File

@ -18,9 +18,8 @@ def f(*args: Unpack[Ts]) -> tuple[Unpack[Ts]]:
def g() -> TypeGuard[int]: ...
def i(callback: Callable[Concatenate[int, P], R_co], *args: P.args, **kwargs: P.kwargs) -> R_co:
# TODO: Should reveal a type representing `P.args` and `P.kwargs`
reveal_type(args) # revealed: tuple[@Todo(ParamSpecArgs / ParamSpecKwargs), ...]
reveal_type(kwargs) # revealed: dict[str, @Todo(ParamSpecArgs / ParamSpecKwargs)]
reveal_type(args) # revealed: P@i.args
reveal_type(kwargs) # revealed: P@i.kwargs
return callback(42, *args, **kwargs)
class Foo:
@ -65,8 +64,9 @@ def _(
reveal_type(c) # revealed: Unknown
reveal_type(d) # revealed: Unknown
# error: [invalid-type-form] "Variable of type `ParamSpec` is not allowed in a type expression"
def foo(a_: e) -> None:
reveal_type(a_) # revealed: @Todo(Support for `typing.ParamSpec`)
reveal_type(a_) # revealed: Unknown
```
## Inheritance

View File

@ -229,9 +229,8 @@ def _(literals_2: Literal[0, 1], b: bool, flag: bool):
literals_128 = 2 * literals_64 + literals_2 # Literal[0, 1, .., 127]
literals_256 = 2 * literals_128 + literals_2 # Literal[0, 1, .., 255]
# Going beyond the MAX_UNION_LITERALS limit (currently 512):
literals_512 = 2 * literals_256 + literals_2 # Literal[0, 1, .., 511]
reveal_type(literals_512 if flag else 512) # revealed: int
# Going beyond the MAX_NON_RECURSIVE_UNION_LITERALS limit (currently 256):
reveal_type(literals_256 if flag else 256) # revealed: int
# Going beyond the limit when another type is already part of the union
bool_and_literals_128 = b if flag else literals_128 # bool | Literal[0, 1, ..., 127]
@ -245,6 +244,41 @@ def _(literals_2: Literal[0, 1], b: bool, flag: bool):
reveal_type(two if flag else literals_256_shifted) # revealed: int
```
Recursively defined literal union types are widened earlier than non-recursively defined types for
faster convergence.
```py
class RecursiveAttr:
def __init__(self):
self.i = 0
def update(self):
self.i = self.i + 1
reveal_type(RecursiveAttr().i) # revealed: Unknown | int
# Here are some recursive but saturating examples. Because it's difficult to statically determine whether literal unions saturate or diverge,
# we widen them early, even though they may actually be convergent.
class RecursiveAttr2:
def __init__(self):
self.i = 0
def update(self):
self.i = (self.i + 1) % 9
reveal_type(RecursiveAttr2().i) # revealed: Unknown | Literal[0, 1, 2, 3, 4, 5, 6, 7, 8]
class RecursiveAttr3:
def __init__(self):
self.i = 0
def update(self):
self.i = (self.i + 1) % 10
# Going beyond the MAX_RECURSIVE_UNION_LITERALS limit:
reveal_type(RecursiveAttr3().i) # revealed: Unknown | int
```
## Simplifying gradually-equivalent types
If two types are gradually equivalent, we can keep just one of them in a union:

View File

@ -115,3 +115,271 @@ P = ParamSpec("P", default=[A, B])
class A: ...
class B: ...
```
## Validating `ParamSpec` usage
In type annotations, `ParamSpec` is only valid as the first element to `Callable`, the final element
to `Concatenate`, or as a type parameter to `Protocol` or `Generic`.
```py
from typing import ParamSpec, Callable, Concatenate, Protocol, Generic
P = ParamSpec("P")
class ValidProtocol(Protocol[P]):
def method(self, c: Callable[P, int]) -> None: ...
class ValidGeneric(Generic[P]):
def method(self, c: Callable[P, int]) -> None: ...
def valid(
a1: Callable[P, int],
a2: Callable[Concatenate[int, P], int],
) -> None: ...
def invalid(
# TODO: error
a1: P,
# TODO: error
a2: list[P],
# TODO: error
a3: Callable[[P], int],
# TODO: error
a4: Callable[..., P],
# TODO: error
a5: Callable[Concatenate[P, ...], int],
) -> None: ...
```
## Validating `P.args` and `P.kwargs` usage
The components of `ParamSpec` i.e., `P.args` and `P.kwargs` are only valid when used as the
annotated types of `*args` and `**kwargs` respectively.
```py
from typing import Generic, Callable, ParamSpec
P = ParamSpec("P")
def foo1(c: Callable[P, int]) -> None:
def nested1(*args: P.args, **kwargs: P.kwargs) -> None: ...
def nested2(
# error: [invalid-type-form] "`P.kwargs` is valid only in `**kwargs` annotation: Did you mean `P.args`?"
*args: P.kwargs,
# error: [invalid-type-form] "`P.args` is valid only in `*args` annotation: Did you mean `P.kwargs`?"
**kwargs: P.args,
) -> None: ...
# TODO: error
def nested3(*args: P.args) -> None: ...
# TODO: error
def nested4(**kwargs: P.kwargs) -> None: ...
# TODO: error
def nested5(*args: P.args, x: int, **kwargs: P.kwargs) -> None: ...
# TODO: error
def bar1(*args: P.args, **kwargs: P.kwargs) -> None:
pass
class Foo1:
# TODO: error
def method(self, *args: P.args, **kwargs: P.kwargs) -> None: ...
```
And, they need to be used together.
```py
def foo2(c: Callable[P, int]) -> None:
# TODO: error
def nested1(*args: P.args) -> None: ...
# TODO: error
def nested2(**kwargs: P.kwargs) -> None: ...
class Foo2:
# TODO: error
args: P.args
# TODO: error
kwargs: P.kwargs
```
The name of these parameters does not need to be `args` or `kwargs`, it's the annotated type to the
respective variadic parameter that matters.
```py
class Foo3(Generic[P]):
def method1(self, *paramspec_args: P.args, **paramspec_kwargs: P.kwargs) -> None: ...
def method2(
self,
# error: [invalid-type-form] "`P.kwargs` is valid only in `**kwargs` annotation: Did you mean `P.args`?"
*paramspec_args: P.kwargs,
# error: [invalid-type-form] "`P.args` is valid only in `*args` annotation: Did you mean `P.kwargs`?"
**paramspec_kwargs: P.args,
) -> None: ...
```
## Specializing generic classes explicitly
```py
from typing import Any, Generic, ParamSpec, Callable, TypeVar
P1 = ParamSpec("P1")
P2 = ParamSpec("P2")
T1 = TypeVar("T1")
class OnlyParamSpec(Generic[P1]):
attr: Callable[P1, None]
class TwoParamSpec(Generic[P1, P2]):
attr1: Callable[P1, None]
attr2: Callable[P2, None]
class TypeVarAndParamSpec(Generic[T1, P1]):
attr: Callable[P1, T1]
```
Explicit specialization of a generic class involving `ParamSpec` is done by providing either a list
of types, `...`, or another in-scope `ParamSpec`.
```py
reveal_type(OnlyParamSpec[[int, str]]().attr) # revealed: (int, str, /) -> None
reveal_type(OnlyParamSpec[...]().attr) # revealed: (...) -> None
def func(c: Callable[P2, None]):
reveal_type(OnlyParamSpec[P2]().attr) # revealed: (**P2@func) -> None
# TODO: error: paramspec is unbound
reveal_type(OnlyParamSpec[P2]().attr) # revealed: (...) -> None
```
The square brackets can be omitted when `ParamSpec` is the only type variable
```py
reveal_type(OnlyParamSpec[int, str]().attr) # revealed: (int, str, /) -> None
reveal_type(OnlyParamSpec[int,]().attr) # revealed: (int, /) -> None
# Even when there is only one element
reveal_type(OnlyParamSpec[Any]().attr) # revealed: (Any, /) -> None
reveal_type(OnlyParamSpec[object]().attr) # revealed: (object, /) -> None
reveal_type(OnlyParamSpec[int]().attr) # revealed: (int, /) -> None
```
But, they cannot be omitted when there are multiple type variables.
```py
reveal_type(TypeVarAndParamSpec[int, [int, str]]().attr) # revealed: (int, str, /) -> int
reveal_type(TypeVarAndParamSpec[int, [str]]().attr) # revealed: (str, /) -> int
reveal_type(TypeVarAndParamSpec[int, ...]().attr) # revealed: (...) -> int
# TODO: We could still specialize for `T1` as the type is valid which would reveal `(...) -> int`
# TODO: error: paramspec is unbound
reveal_type(TypeVarAndParamSpec[int, P2]().attr) # revealed: (...) -> Unknown
# error: [invalid-type-arguments] "Type argument for `ParamSpec` must be either a list of types, `ParamSpec`, `Concatenate`, or `...`"
reveal_type(TypeVarAndParamSpec[int, int]().attr) # revealed: (...) -> Unknown
```
Nor can they be omitted when there are more than one `ParamSpec`s.
```py
p = TwoParamSpec[[int, str], [int]]()
reveal_type(p.attr1) # revealed: (int, str, /) -> None
reveal_type(p.attr2) # revealed: (int, /) -> None
# error: [invalid-type-arguments]
# error: [invalid-type-arguments]
TwoParamSpec[int, str]
```
Specializing `ParamSpec` type variable using `typing.Any` isn't explicitly allowed by the spec but
both mypy and Pyright allow this and there are usages of this in the wild e.g.,
`staticmethod[Any, Any]`.
```py
reveal_type(TypeVarAndParamSpec[int, Any]().attr) # revealed: (...) -> int
```
## Specialization when defaults are involved
```toml
[environment]
python-version = "3.13"
```
```py
from typing import Any, Generic, ParamSpec, Callable, TypeVar
P = ParamSpec("P")
PList = ParamSpec("PList", default=[int, str])
PEllipsis = ParamSpec("PEllipsis", default=...)
PAnother = ParamSpec("PAnother", default=P)
PAnotherWithDefault = ParamSpec("PAnotherWithDefault", default=PList)
```
```py
class ParamSpecWithDefault1(Generic[PList]):
attr: Callable[PList, None]
reveal_type(ParamSpecWithDefault1().attr) # revealed: (int, str, /) -> None
reveal_type(ParamSpecWithDefault1[[int]]().attr) # revealed: (int, /) -> None
```
```py
class ParamSpecWithDefault2(Generic[PEllipsis]):
attr: Callable[PEllipsis, None]
reveal_type(ParamSpecWithDefault2().attr) # revealed: (...) -> None
reveal_type(ParamSpecWithDefault2[[int, str]]().attr) # revealed: (int, str, /) -> None
```
```py
class ParamSpecWithDefault3(Generic[P, PAnother]):
attr1: Callable[P, None]
attr2: Callable[PAnother, None]
# `P` hasn't been specialized, so it defaults to `Unknown` gradual form
p1 = ParamSpecWithDefault3()
reveal_type(p1.attr1) # revealed: (...) -> None
reveal_type(p1.attr2) # revealed: (...) -> None
p2 = ParamSpecWithDefault3[[int, str]]()
reveal_type(p2.attr1) # revealed: (int, str, /) -> None
reveal_type(p2.attr2) # revealed: (int, str, /) -> None
p3 = ParamSpecWithDefault3[[int], [str]]()
reveal_type(p3.attr1) # revealed: (int, /) -> None
reveal_type(p3.attr2) # revealed: (str, /) -> None
class ParamSpecWithDefault4(Generic[PList, PAnotherWithDefault]):
attr1: Callable[PList, None]
attr2: Callable[PAnotherWithDefault, None]
p1 = ParamSpecWithDefault4()
reveal_type(p1.attr1) # revealed: (int, str, /) -> None
reveal_type(p1.attr2) # revealed: (int, str, /) -> None
p2 = ParamSpecWithDefault4[[int]]()
reveal_type(p2.attr1) # revealed: (int, /) -> None
reveal_type(p2.attr2) # revealed: (int, /) -> None
p3 = ParamSpecWithDefault4[[int], [str]]()
reveal_type(p3.attr1) # revealed: (int, /) -> None
reveal_type(p3.attr2) # revealed: (str, /) -> None
# TODO: error
# Un-ordered type variables as the default of `PAnother` is `P`
class ParamSpecWithDefault5(Generic[PAnother, P]):
attr: Callable[PAnother, None]
# TODO: error
# PAnother has default as P (another ParamSpec) which is not in scope
class ParamSpecWithDefault6(Generic[PAnother]):
attr: Callable[PAnother, None]
```
## Semantics
The semantics of `ParamSpec` are described in
[the PEP 695 `ParamSpec` document](./../pep695/paramspec.md) to avoid duplication unless there are
any behavior specific to the legacy `ParamSpec` implementation.

View File

@ -25,11 +25,11 @@ reveal_type(generic_context(SingleTypevar))
# revealed: ty_extensions.GenericContext[T@MultipleTypevars, S@MultipleTypevars]
reveal_type(generic_context(MultipleTypevars))
# TODO: support `ParamSpec`/`TypeVarTuple` properly
# (these should include the `ParamSpec`s and `TypeVarTuple`s in their generic contexts)
# revealed: ty_extensions.GenericContext[]
# TODO: support `TypeVarTuple` properly
# (these should include the `TypeVarTuple`s in their generic contexts)
# revealed: ty_extensions.GenericContext[P@SingleParamSpec]
reveal_type(generic_context(SingleParamSpec))
# revealed: ty_extensions.GenericContext[T@TypeVarAndParamSpec]
# revealed: ty_extensions.GenericContext[T@TypeVarAndParamSpec, P@TypeVarAndParamSpec]
reveal_type(generic_context(TypeVarAndParamSpec))
# revealed: ty_extensions.GenericContext[]
reveal_type(generic_context(SingleTypeVarTuple))

View File

@ -25,11 +25,11 @@ reveal_type(generic_context(SingleTypevar))
# revealed: ty_extensions.GenericContext[T@MultipleTypevars, S@MultipleTypevars]
reveal_type(generic_context(MultipleTypevars))
# TODO: support `ParamSpec`/`TypeVarTuple` properly
# (these should include the `ParamSpec`s and `TypeVarTuple`s in their generic contexts)
# revealed: ty_extensions.GenericContext[]
# TODO: support `TypeVarTuple` properly
# (these should include the `TypeVarTuple`s in their generic contexts)
# revealed: ty_extensions.GenericContext[P@SingleParamSpec]
reveal_type(generic_context(SingleParamSpec))
# revealed: ty_extensions.GenericContext[T@TypeVarAndParamSpec]
# revealed: ty_extensions.GenericContext[T@TypeVarAndParamSpec, P@TypeVarAndParamSpec]
reveal_type(generic_context(TypeVarAndParamSpec))
# revealed: ty_extensions.GenericContext[]
reveal_type(generic_context(SingleTypeVarTuple))

View File

@ -62,3 +62,588 @@ Other values are invalid.
def foo[**P = int]() -> None:
pass
```
## Validating `ParamSpec` usage
`ParamSpec` is only valid as the first element to `Callable` or the final element to `Concatenate`.
```py
from typing import ParamSpec, Callable, Concatenate
def valid[**P](
a1: Callable[P, int],
a2: Callable[Concatenate[int, P], int],
) -> None: ...
def invalid[**P](
# TODO: error
a1: P,
# TODO: error
a2: list[P],
# TODO: error
a3: Callable[[P], int],
# TODO: error
a4: Callable[..., P],
# TODO: error
a5: Callable[Concatenate[P, ...], int],
) -> None: ...
```
## Validating `P.args` and `P.kwargs` usage
The components of `ParamSpec` i.e., `P.args` and `P.kwargs` are only valid when used as the
annotated types of `*args` and `**kwargs` respectively.
```py
from typing import Callable
def foo[**P](c: Callable[P, int]) -> None:
def nested1(*args: P.args, **kwargs: P.kwargs) -> None: ...
# error: [invalid-type-form] "`P.kwargs` is valid only in `**kwargs` annotation: Did you mean `P.args`?"
# error: [invalid-type-form] "`P.args` is valid only in `*args` annotation: Did you mean `P.kwargs`?"
def nested2(*args: P.kwargs, **kwargs: P.args) -> None: ...
# TODO: error
def nested3(*args: P.args) -> None: ...
# TODO: error
def nested4(**kwargs: P.kwargs) -> None: ...
# TODO: error
def nested5(*args: P.args, x: int, **kwargs: P.kwargs) -> None: ...
```
And, they need to be used together.
```py
def foo[**P](c: Callable[P, int]) -> None:
# TODO: error
def nested1(*args: P.args) -> None: ...
# TODO: error
def nested2(**kwargs: P.kwargs) -> None: ...
class Foo[**P]:
# TODO: error
args: P.args
# TODO: error
kwargs: P.kwargs
```
The name of these parameters does not need to be `args` or `kwargs`, it's the annotated type to the
respective variadic parameter that matters.
```py
class Foo3[**P]:
def method1(self, *paramspec_args: P.args, **paramspec_kwargs: P.kwargs) -> None: ...
def method2(
self,
# error: [invalid-type-form] "`P.kwargs` is valid only in `**kwargs` annotation: Did you mean `P.args`?"
*paramspec_args: P.kwargs,
# error: [invalid-type-form] "`P.args` is valid only in `*args` annotation: Did you mean `P.kwargs`?"
**paramspec_kwargs: P.args,
) -> None: ...
```
It isn't allowed to annotate an instance attribute either:
```py
class Foo4[**P]:
def __init__(self, fn: Callable[P, int], *args: P.args, **kwargs: P.kwargs) -> None:
self.fn = fn
# TODO: error
self.args: P.args = args
# TODO: error
self.kwargs: P.kwargs = kwargs
```
## Semantics of `P.args` and `P.kwargs`
The type of `args` and `kwargs` inside the function is `P.args` and `P.kwargs` respectively instead
of `tuple[P.args, ...]` and `dict[str, P.kwargs]`.
### Passing `*args` and `**kwargs` to a callable
```py
from typing import Callable
def f[**P](func: Callable[P, int]) -> Callable[P, None]:
def wrapper(*args: P.args, **kwargs: P.kwargs) -> None:
reveal_type(args) # revealed: P@f.args
reveal_type(kwargs) # revealed: P@f.kwargs
reveal_type(func(*args, **kwargs)) # revealed: int
# error: [invalid-argument-type] "Argument is incorrect: Expected `P@f.args`, found `P@f.kwargs`"
# error: [invalid-argument-type] "Argument is incorrect: Expected `P@f.kwargs`, found `P@f.args`"
reveal_type(func(*kwargs, **args)) # revealed: int
# error: [invalid-argument-type] "Argument is incorrect: Expected `P@f.args`, found `P@f.kwargs`"
reveal_type(func(args, kwargs)) # revealed: int
# Both parameters are required
# TODO: error
reveal_type(func()) # revealed: int
reveal_type(func(*args)) # revealed: int
reveal_type(func(**kwargs)) # revealed: int
return wrapper
```
### Operations on `P.args` and `P.kwargs`
The type of `P.args` and `P.kwargs` behave like a `tuple` and `dict` respectively. Internally, they
are represented as a type variable that has an upper bound of `tuple[object, ...]` and
`Top[dict[str, Any]]` respectively.
```py
from typing import Callable, Any
def f[**P](func: Callable[P, int], *args: P.args, **kwargs: P.kwargs) -> None:
reveal_type(args + ("extra",)) # revealed: tuple[object, ...]
reveal_type(args + (1, 2, 3)) # revealed: tuple[object, ...]
reveal_type(args[0]) # revealed: object
reveal_type("key" in kwargs) # revealed: bool
reveal_type(kwargs.get("key")) # revealed: object
reveal_type(kwargs["key"]) # revealed: object
```
## Specializing generic classes explicitly
```py
from typing import Any, Callable, ParamSpec
class OnlyParamSpec[**P1]:
attr: Callable[P1, None]
class TwoParamSpec[**P1, **P2]:
attr1: Callable[P1, None]
attr2: Callable[P2, None]
class TypeVarAndParamSpec[T1, **P1]:
attr: Callable[P1, T1]
```
Explicit specialization of a generic class involving `ParamSpec` is done by providing either a list
of types, `...`, or another in-scope `ParamSpec`.
```py
reveal_type(OnlyParamSpec[[int, str]]().attr) # revealed: (int, str, /) -> None
reveal_type(OnlyParamSpec[...]().attr) # revealed: (...) -> None
def func[**P2](c: Callable[P2, None]):
reveal_type(OnlyParamSpec[P2]().attr) # revealed: (**P2@func) -> None
P2 = ParamSpec("P2")
# TODO: error: paramspec is unbound
reveal_type(OnlyParamSpec[P2]().attr) # revealed: (...) -> None
```
The square brackets can be omitted when `ParamSpec` is the only type variable
```py
reveal_type(OnlyParamSpec[int, str]().attr) # revealed: (int, str, /) -> None
reveal_type(OnlyParamSpec[int,]().attr) # revealed: (int, /) -> None
# Even when there is only one element
reveal_type(OnlyParamSpec[Any]().attr) # revealed: (Any, /) -> None
reveal_type(OnlyParamSpec[object]().attr) # revealed: (object, /) -> None
reveal_type(OnlyParamSpec[int]().attr) # revealed: (int, /) -> None
```
But, they cannot be omitted when there are multiple type variables.
```py
reveal_type(TypeVarAndParamSpec[int, [int, str]]().attr) # revealed: (int, str, /) -> int
reveal_type(TypeVarAndParamSpec[int, [str]]().attr) # revealed: (str, /) -> int
reveal_type(TypeVarAndParamSpec[int, ...]().attr) # revealed: (...) -> int
# TODO: error: paramspec is unbound
reveal_type(TypeVarAndParamSpec[int, P2]().attr) # revealed: (...) -> Unknown
# error: [invalid-type-arguments]
reveal_type(TypeVarAndParamSpec[int, int]().attr) # revealed: (...) -> Unknown
```
Nor can they be omitted when there are more than one `ParamSpec`.
```py
p = TwoParamSpec[[int, str], [int]]()
reveal_type(p.attr1) # revealed: (int, str, /) -> None
reveal_type(p.attr2) # revealed: (int, /) -> None
# error: [invalid-type-arguments] "Type argument for `ParamSpec` must be either a list of types, `ParamSpec`, `Concatenate`, or `...`"
# error: [invalid-type-arguments] "Type argument for `ParamSpec` must be either a list of types, `ParamSpec`, `Concatenate`, or `...`"
TwoParamSpec[int, str]
```
Specializing `ParamSpec` type variable using `typing.Any` isn't explicitly allowed by the spec but
both mypy and Pyright allow this and there are usages of this in the wild e.g.,
`staticmethod[Any, Any]`.
```py
reveal_type(TypeVarAndParamSpec[int, Any]().attr) # revealed: (...) -> int
```
## Specialization when defaults are involved
```py
from typing import Callable, ParamSpec
class ParamSpecWithDefault1[**P1 = [int, str]]:
attr: Callable[P1, None]
reveal_type(ParamSpecWithDefault1().attr) # revealed: (int, str, /) -> None
reveal_type(ParamSpecWithDefault1[int]().attr) # revealed: (int, /) -> None
```
```py
class ParamSpecWithDefault2[**P1 = ...]:
attr: Callable[P1, None]
reveal_type(ParamSpecWithDefault2().attr) # revealed: (...) -> None
reveal_type(ParamSpecWithDefault2[int, str]().attr) # revealed: (int, str, /) -> None
```
```py
class ParamSpecWithDefault3[**P1, **P2 = P1]:
attr1: Callable[P1, None]
attr2: Callable[P2, None]
# `P1` hasn't been specialized, so it defaults to `...` gradual form
p1 = ParamSpecWithDefault3()
reveal_type(p1.attr1) # revealed: (...) -> None
reveal_type(p1.attr2) # revealed: (...) -> None
p2 = ParamSpecWithDefault3[[int, str]]()
reveal_type(p2.attr1) # revealed: (int, str, /) -> None
reveal_type(p2.attr2) # revealed: (int, str, /) -> None
p3 = ParamSpecWithDefault3[[int], [str]]()
reveal_type(p3.attr1) # revealed: (int, /) -> None
reveal_type(p3.attr2) # revealed: (str, /) -> None
class ParamSpecWithDefault4[**P1 = [int, str], **P2 = P1]:
attr1: Callable[P1, None]
attr2: Callable[P2, None]
p1 = ParamSpecWithDefault4()
reveal_type(p1.attr1) # revealed: (int, str, /) -> None
reveal_type(p1.attr2) # revealed: (int, str, /) -> None
p2 = ParamSpecWithDefault4[[int]]()
reveal_type(p2.attr1) # revealed: (int, /) -> None
reveal_type(p2.attr2) # revealed: (int, /) -> None
p3 = ParamSpecWithDefault4[[int], [str]]()
reveal_type(p3.attr1) # revealed: (int, /) -> None
reveal_type(p3.attr2) # revealed: (str, /) -> None
P2 = ParamSpec("P2")
# TODO: error: paramspec is out of scope
class ParamSpecWithDefault5[**P1 = P2]:
attr: Callable[P1, None]
```
## Semantics
Most of these test cases are adopted from the
[typing documentation on `ParamSpec` semantics](https://typing.python.org/en/latest/spec/generics.html#semantics).
### Return type change using `ParamSpec` once
```py
from typing import Callable
def converter[**P](func: Callable[P, int]) -> Callable[P, bool]:
def wrapper(*args: P.args, **kwargs: P.kwargs) -> bool:
func(*args, **kwargs)
return True
return wrapper
def f1(x: int, y: str) -> int:
return 1
# This should preserve all the information about the parameters of `f1`
f2 = converter(f1)
reveal_type(f2) # revealed: (x: int, y: str) -> bool
reveal_type(f1(1, "a")) # revealed: int
reveal_type(f2(1, "a")) # revealed: bool
# As it preserves the parameter kinds, the following should work as well
reveal_type(f2(1, y="a")) # revealed: bool
reveal_type(f2(x=1, y="a")) # revealed: bool
reveal_type(f2(y="a", x=1)) # revealed: bool
# error: [missing-argument] "No argument provided for required parameter `y`"
f2(1)
# error: [invalid-argument-type] "Argument is incorrect: Expected `int`, found `Literal["a"]`"
f2("a", "b")
```
The `converter` function act as a decorator here:
```py
@converter
def f3(x: int, y: str) -> int:
return 1
# TODO: This should reveal `(x: int, y: str) -> bool` but there's a cycle: https://github.com/astral-sh/ty/issues/1729
reveal_type(f3) # revealed: ((x: int, y: str) -> bool) | ((x: Divergent, y: Divergent) -> bool)
reveal_type(f3(1, "a")) # revealed: bool
reveal_type(f3(x=1, y="a")) # revealed: bool
reveal_type(f3(1, y="a")) # revealed: bool
reveal_type(f3(y="a", x=1)) # revealed: bool
# TODO: There should only be one error but the type of `f3` is a union: https://github.com/astral-sh/ty/issues/1729
# error: [missing-argument] "No argument provided for required parameter `y`"
# error: [missing-argument] "No argument provided for required parameter `y`"
f3(1)
# error: [invalid-argument-type] "Argument is incorrect: Expected `int`, found `Literal["a"]`"
f3("a", "b")
```
### Return type change using the same `ParamSpec` multiple times
```py
from typing import Callable
def multiple[**P](func1: Callable[P, int], func2: Callable[P, int]) -> Callable[P, bool]:
def wrapper(*args: P.args, **kwargs: P.kwargs) -> bool:
func1(*args, **kwargs)
func2(*args, **kwargs)
return True
return wrapper
```
As per the spec,
> A user may include the same `ParamSpec` multiple times in the arguments of the same function, to
> indicate a dependency between multiple arguments. In these cases a type checker may choose to
> solve to a common behavioral supertype (i.e. a set of parameters for which all of the valid calls
> are valid in both of the subtypes), but is not obligated to do so.
TODO: Currently, we don't do this
```py
def xy(x: int, y: str) -> int:
return 1
def yx(y: int, x: str) -> int:
return 2
reveal_type(multiple(xy, xy)) # revealed: (x: int, y: str) -> bool
# The common supertype is `(int, str, /)` which is converting the positional-or-keyword parameters
# into positional-only parameters because the position of the types are the same.
# TODO: This shouldn't error
# error: [invalid-argument-type]
reveal_type(multiple(xy, yx)) # revealed: (x: int, y: str) -> bool
def keyword_only_with_default_1(*, x: int = 42) -> int:
return 1
def keyword_only_with_default_2(*, y: int = 42) -> int:
return 2
# The common supertype for two functions with only keyword-only parameters would be an empty
# parameter list i.e., `()`
# TODO: This shouldn't error
# error: [invalid-argument-type]
# revealed: (*, x: int = Literal[42]) -> bool
reveal_type(multiple(keyword_only_with_default_1, keyword_only_with_default_2))
def keyword_only1(*, x: int) -> int:
return 1
def keyword_only2(*, y: int) -> int:
return 2
# On the other hand, combining two functions with only keyword-only parameters does not have a
# common supertype, so it should result in an error.
# error: [invalid-argument-type] "Argument to function `multiple` is incorrect: Expected `(*, x: int) -> int`, found `def keyword_only2(*, y: int) -> int`"
reveal_type(multiple(keyword_only1, keyword_only2)) # revealed: (*, x: int) -> bool
```
### Constructors of user-defined generic class on `ParamSpec`
```py
from typing import Callable
class C[**P]:
f: Callable[P, int]
def __init__(self, f: Callable[P, int]) -> None:
self.f = f
def f(x: int, y: str) -> bool:
return True
c = C(f)
reveal_type(c.f) # revealed: (x: int, y: str) -> int
```
### `ParamSpec` in prepended positional parameters
> If one of these prepended positional parameters contains a free `ParamSpec`, we consider that
> variable in scope for the purposes of extracting the components of that `ParamSpec`.
```py
from typing import Callable
def foo1[**P1](func: Callable[P1, int], *args: P1.args, **kwargs: P1.kwargs) -> int:
return func(*args, **kwargs)
def foo1_with_extra_arg[**P1](func: Callable[P1, int], extra: str, *args: P1.args, **kwargs: P1.kwargs) -> int:
return func(*args, **kwargs)
def foo2[**P2](func: Callable[P2, int], *args: P2.args, **kwargs: P2.kwargs) -> None:
foo1(func, *args, **kwargs)
# error: [invalid-argument-type] "Argument to function `foo1` is incorrect: Expected `P2@foo2.args`, found `Literal[1]`"
foo1(func, 1, *args, **kwargs)
# error: [invalid-argument-type] "Argument to function `foo1_with_extra_arg` is incorrect: Expected `str`, found `P2@foo2.args`"
foo1_with_extra_arg(func, *args, **kwargs)
foo1_with_extra_arg(func, "extra", *args, **kwargs)
```
Here, the first argument to `f` can specialize `P` to the parameters of the callable passed to it
which is then used to type the `ParamSpec` components used in `*args` and `**kwargs`.
```py
def f1(x: int, y: str) -> int:
return 1
foo1(f1, 1, "a")
foo1(f1, x=1, y="a")
foo1(f1, 1, y="a")
# error: [missing-argument] "No arguments provided for required parameters `x`, `y` of function `foo1`"
foo1(f1)
# error: [missing-argument] "No argument provided for required parameter `y` of function `foo1`"
foo1(f1, 1)
# error: [invalid-argument-type] "Argument to function `foo1` is incorrect: Expected `str`, found `Literal[2]`"
foo1(f1, 1, 2)
# error: [too-many-positional-arguments] "Too many positional arguments to function `foo1`: expected 2, got 3"
foo1(f1, 1, "a", "b")
# error: [missing-argument] "No argument provided for required parameter `y` of function `foo1`"
# error: [unknown-argument] "Argument `z` does not match any known parameter of function `foo1`"
foo1(f1, x=1, z="a")
```
### Specializing `ParamSpec` with another `ParamSpec`
```py
class Foo[**P]:
def __init__(self, *args: P.args, **kwargs: P.kwargs) -> None:
self.args = args
self.kwargs = kwargs
def bar[**P](foo: Foo[P]) -> None:
reveal_type(foo) # revealed: Foo[P@bar]
reveal_type(foo.args) # revealed: Unknown | P@bar.args
reveal_type(foo.kwargs) # revealed: Unknown | P@bar.kwargs
```
ty will check whether the argument after `**` is a mapping type but as instance attribute are
unioned with `Unknown`, it shouldn't error here.
```py
from typing import Callable
def baz[**P](fn: Callable[P, None], foo: Foo[P]) -> None:
fn(*foo.args, **foo.kwargs)
```
The `Unknown` can be eliminated by using annotating these attributes with `Final`:
```py
from typing import Final
class FooWithFinal[**P]:
def __init__(self, *args: P.args, **kwargs: P.kwargs) -> None:
self.args: Final = args
self.kwargs: Final = kwargs
def with_final[**P](foo: FooWithFinal[P]) -> None:
reveal_type(foo) # revealed: FooWithFinal[P@with_final]
reveal_type(foo.args) # revealed: P@with_final.args
reveal_type(foo.kwargs) # revealed: P@with_final.kwargs
```
### Specializing `Self` when `ParamSpec` is involved
```py
class Foo[**P]:
def method(self, *args: P.args, **kwargs: P.kwargs) -> str:
return "hello"
foo = Foo[int, str]()
reveal_type(foo) # revealed: Foo[(int, str, /)]
reveal_type(foo.method) # revealed: bound method Foo[(int, str, /)].method(int, str, /) -> str
reveal_type(foo.method(1, "a")) # revealed: str
```
### Overloads
`overloaded.pyi`:
```pyi
from typing import overload
@overload
def int_int(x: int) -> int: ...
@overload
def int_int(x: str) -> int: ...
@overload
def int_str(x: int) -> int: ...
@overload
def int_str(x: str) -> str: ...
@overload
def str_str(x: int) -> str: ...
@overload
def str_str(x: str) -> str: ...
```
```py
from typing import Callable
from overloaded import int_int, int_str, str_str
def change_return_type[**P](f: Callable[P, int]) -> Callable[P, str]:
def nested(*args: P.args, **kwargs: P.kwargs) -> str:
return str(f(*args, **kwargs))
return nested
def with_parameters[**P](f: Callable[P, int], *args: P.args, **kwargs: P.kwargs) -> Callable[P, str]:
def nested(*args: P.args, **kwargs: P.kwargs) -> str:
return str(f(*args, **kwargs))
return nested
reveal_type(change_return_type(int_int)) # revealed: Overload[(x: int) -> str, (x: str) -> str]
# TODO: This shouldn't error and should pick the first overload because of the return type
# error: [invalid-argument-type]
reveal_type(change_return_type(int_str)) # revealed: Overload[(x: int) -> str, (x: str) -> str]
# error: [invalid-argument-type]
reveal_type(change_return_type(str_str)) # revealed: Overload[(x: int) -> str, (x: str) -> str]
# TODO: Both of these shouldn't raise an error
# error: [invalid-argument-type]
reveal_type(with_parameters(int_int, 1)) # revealed: Overload[(x: int) -> str, (x: str) -> str]
# error: [invalid-argument-type]
reveal_type(with_parameters(int_int, "a")) # revealed: Overload[(x: int) -> str, (x: str) -> str]
```

View File

@ -398,7 +398,7 @@ reveal_type(Sum) # revealed: <class 'tuple[T@Sum, U@Sum]'>
reveal_type(ListOrTuple) # revealed: <types.UnionType special form 'list[T@ListOrTuple] | tuple[T@ListOrTuple, ...]'>
# revealed: <types.UnionType special form 'list[T@ListOrTupleLegacy] | tuple[T@ListOrTupleLegacy, ...]'>
reveal_type(ListOrTupleLegacy)
reveal_type(MyCallable) # revealed: @Todo(Callable[..] specialized with ParamSpec)
reveal_type(MyCallable) # revealed: <typing.Callable special form '(**P@MyCallable) -> T@MyCallable'>
reveal_type(AnnotatedType) # revealed: <special form 'typing.Annotated[T@AnnotatedType, <metadata>]'>
reveal_type(TransparentAlias) # revealed: typing.TypeVar
reveal_type(MyOptional) # revealed: <types.UnionType special form 'T@MyOptional | None'>
@ -425,8 +425,7 @@ def _(
reveal_type(int_and_bytes) # revealed: tuple[int, bytes]
reveal_type(list_or_tuple) # revealed: list[int] | tuple[int, ...]
reveal_type(list_or_tuple_legacy) # revealed: list[int] | tuple[int, ...]
# TODO: This should be `(str, bytes) -> int`
reveal_type(my_callable) # revealed: @Todo(Callable[..] specialized with ParamSpec)
reveal_type(my_callable) # revealed: (str, bytes, /) -> int
reveal_type(annotated_int) # revealed: int
reveal_type(transparent_alias) # revealed: int
reveal_type(optional_int) # revealed: int | None
@ -463,7 +462,7 @@ reveal_type(ListOfPairs) # revealed: <class 'list[tuple[str, str]]'>
reveal_type(ListOrTupleOfInts) # revealed: <types.UnionType special form 'list[int] | tuple[int, ...]'>
reveal_type(AnnotatedInt) # revealed: <special form 'typing.Annotated[int, <metadata>]'>
reveal_type(SubclassOfInt) # revealed: <special form 'type[int]'>
reveal_type(CallableIntToStr) # revealed: @Todo(Callable[..] specialized with ParamSpec)
reveal_type(CallableIntToStr) # revealed: <typing.Callable special form '(int, /) -> str'>
def _(
ints_or_none: IntsOrNone,
@ -480,8 +479,7 @@ def _(
reveal_type(list_or_tuple_of_ints) # revealed: list[int] | tuple[int, ...]
reveal_type(annotated_int) # revealed: int
reveal_type(subclass_of_int) # revealed: type[int]
# TODO: This should be `(int, /) -> str`
reveal_type(callable_int_to_str) # revealed: @Todo(Callable[..] specialized with ParamSpec)
reveal_type(callable_int_to_str) # revealed: (int, /) -> str
```
A generic implicit type alias can also be used in another generic implicit type alias:
@ -534,8 +532,7 @@ def _(
reveal_type(unknown_and_unknown) # revealed: tuple[Unknown, Unknown]
reveal_type(list_or_tuple) # revealed: list[Unknown] | tuple[Unknown, ...]
reveal_type(list_or_tuple_legacy) # revealed: list[Unknown] | tuple[Unknown, ...]
# TODO: should be (...) -> Unknown
reveal_type(my_callable) # revealed: @Todo(Callable[..] specialized with ParamSpec)
reveal_type(my_callable) # revealed: (...) -> Unknown
reveal_type(annotated_unknown) # revealed: Unknown
reveal_type(optional_unknown) # revealed: Unknown | None
```

View File

@ -537,6 +537,9 @@ static_assert(is_assignable_to(tuple[Any, ...], tuple[Any, Any]))
static_assert(is_assignable_to(tuple[Any, ...], tuple[int, ...]))
static_assert(is_assignable_to(tuple[Any, ...], tuple[int]))
static_assert(is_assignable_to(tuple[Any, ...], tuple[int, int]))
static_assert(is_assignable_to(tuple[Any, ...], tuple[int, *tuple[int, ...]]))
static_assert(is_assignable_to(tuple[Any, ...], tuple[*tuple[int, ...], int]))
static_assert(is_assignable_to(tuple[Any, ...], tuple[int, *tuple[int, ...], int]))
```
This also applies when `tuple[Any, ...]` is unpacked into a mixed tuple.
@ -560,6 +563,10 @@ static_assert(is_assignable_to(tuple[*tuple[Any, ...], int], tuple[int, ...]))
static_assert(is_assignable_to(tuple[*tuple[Any, ...], int], tuple[int]))
static_assert(is_assignable_to(tuple[*tuple[Any, ...], int], tuple[int, int]))
# `*tuple[Any, ...]` can materialize to a tuple of any length as a special case,
# so this passes:
static_assert(is_assignable_to(tuple[*tuple[Any, ...], Any], tuple[*tuple[Any, ...], Any, Any]))
static_assert(is_assignable_to(tuple[int, *tuple[Any, ...], int], tuple[int, *tuple[Any, ...], int]))
static_assert(is_assignable_to(tuple[int, *tuple[Any, ...], int], tuple[Any, ...]))
static_assert(not is_assignable_to(tuple[int, *tuple[Any, ...], int], tuple[Any]))
@ -580,6 +587,9 @@ static_assert(not is_assignable_to(tuple[int, ...], tuple[Any, Any]))
static_assert(is_assignable_to(tuple[int, ...], tuple[int, ...]))
static_assert(not is_assignable_to(tuple[int, ...], tuple[int]))
static_assert(not is_assignable_to(tuple[int, ...], tuple[int, int]))
static_assert(not is_assignable_to(tuple[int, ...], tuple[int, *tuple[int, ...]]))
static_assert(not is_assignable_to(tuple[int, ...], tuple[*tuple[int, ...], int]))
static_assert(not is_assignable_to(tuple[int, ...], tuple[int, *tuple[int, ...], int]))
static_assert(is_assignable_to(tuple[int, *tuple[int, ...]], tuple[int, *tuple[Any, ...]]))
static_assert(is_assignable_to(tuple[int, *tuple[int, ...]], tuple[Any, ...]))
@ -1344,6 +1354,38 @@ static_assert(not is_assignable_to(TypeGuard[Unknown], str)) # error: [static-a
static_assert(not is_assignable_to(TypeIs[Any], str))
```
## `ParamSpec`
```py
from ty_extensions import TypeOf, static_assert, is_assignable_to, Unknown
from typing import ParamSpec, Mapping, Callable, Any
P = ParamSpec("P")
def f(func: Callable[P, int], *args: P.args, **kwargs: P.kwargs) -> None:
static_assert(is_assignable_to(TypeOf[args], tuple[Any, ...]))
static_assert(is_assignable_to(TypeOf[args], tuple[object, ...]))
static_assert(is_assignable_to(TypeOf[args], tuple[Unknown, ...]))
static_assert(not is_assignable_to(TypeOf[args], tuple[int, ...]))
static_assert(not is_assignable_to(TypeOf[args], tuple[int, str]))
static_assert(not is_assignable_to(tuple[Any, ...], TypeOf[args]))
static_assert(not is_assignable_to(tuple[object, ...], TypeOf[args]))
static_assert(not is_assignable_to(tuple[Unknown, ...], TypeOf[args]))
static_assert(is_assignable_to(TypeOf[kwargs], dict[str, Any]))
static_assert(is_assignable_to(TypeOf[kwargs], dict[str, Unknown]))
static_assert(not is_assignable_to(TypeOf[kwargs], dict[str, object]))
static_assert(not is_assignable_to(TypeOf[kwargs], dict[str, int]))
static_assert(is_assignable_to(TypeOf[kwargs], Mapping[str, Any]))
static_assert(is_assignable_to(TypeOf[kwargs], Mapping[str, object]))
static_assert(is_assignable_to(TypeOf[kwargs], Mapping[str, Unknown]))
static_assert(not is_assignable_to(dict[str, Any], TypeOf[kwargs]))
static_assert(not is_assignable_to(dict[str, object], TypeOf[kwargs]))
static_assert(not is_assignable_to(dict[str, Unknown], TypeOf[kwargs]))
```
[gradual form]: https://typing.python.org/en/latest/spec/glossary.html#term-gradual-form
[gradual tuple]: https://typing.python.org/en/latest/spec/tuples.html#tuple-type-form
[typing documentation]: https://typing.python.org/en/latest/spec/concepts.html#the-assignable-to-or-consistent-subtyping-relation

View File

@ -213,7 +213,7 @@ async def connect() -> AsyncGenerator[Session]:
yield Session()
# TODO: this should be `() -> _AsyncGeneratorContextManager[Session, None]`
reveal_type(connect) # revealed: (...) -> _AsyncGeneratorContextManager[Unknown, None]
reveal_type(connect) # revealed: () -> _AsyncGeneratorContextManager[Unknown, None]
async def main():
async with connect() as session:

View File

@ -1812,14 +1812,14 @@ impl<'db> Type<'db> {
Type::KnownBoundMethod(method) => Some(CallableTypes::one(CallableType::new(
db,
CallableSignature::from_overloads(method.signatures(db)),
false,
CallableTypeKind::Regular,
))),
Type::WrapperDescriptor(wrapper_descriptor) => {
Some(CallableTypes::one(CallableType::new(
db,
CallableSignature::from_overloads(wrapper_descriptor.signatures(db)),
false,
CallableTypeKind::Regular,
)))
}
@ -5058,11 +5058,17 @@ impl<'db> Type<'db> {
.into()
}
Type::KnownInstance(KnownInstanceType::TypeVar(typevar))
if typevar.kind(db).is_paramspec()
&& matches!(name.as_str(), "args" | "kwargs") =>
{
Place::bound(todo_type!("ParamSpecArgs / ParamSpecKwargs")).into()
Type::TypeVar(typevar) if name_str == "args" && typevar.is_paramspec(db) => {
Place::declared(Type::TypeVar(
typevar.with_paramspec_attr(db, ParamSpecAttrKind::Args),
))
.into()
}
Type::TypeVar(typevar) if name_str == "kwargs" && typevar.is_paramspec(db) => {
Place::declared(Type::TypeVar(
typevar.with_paramspec_attr(db, ParamSpecAttrKind::Kwargs),
))
.into()
}
Type::NominalInstance(instance)
@ -7269,6 +7275,9 @@ impl<'db> Type<'db> {
KnownInstanceType::TypeAliasType(alias) => Ok(Type::TypeAlias(*alias)),
KnownInstanceType::NewType(newtype) => Ok(Type::NewTypeInstance(*newtype)),
KnownInstanceType::TypeVar(typevar) => {
// TODO: A `ParamSpec` type variable cannot be used in type expressions. This
// requires storing additional context as it's allowed in some places
// (`Concatenate`, `Callable`) but not others.
let index = semantic_index(db, scope_id.file(db));
Ok(bind_typevar(
db,
@ -7495,9 +7504,6 @@ impl<'db> Type<'db> {
Some(KnownClass::TypeVar) => Ok(todo_type!(
"Support for `typing.TypeVar` instances in type expressions"
)),
Some(
KnownClass::ParamSpec | KnownClass::ParamSpecArgs | KnownClass::ParamSpecKwargs,
) => Ok(todo_type!("Support for `typing.ParamSpec`")),
Some(KnownClass::TypeVarTuple) => Ok(todo_type!(
"Support for `typing.TypeVarTuple` instances in type expressions"
)),
@ -7676,7 +7682,7 @@ impl<'db> Type<'db> {
KnownInstanceType::TypeVar(typevar) => {
match type_mapping {
TypeMapping::BindLegacyTypevars(binding_context) => {
Type::TypeVar(BoundTypeVarInstance::new(db, typevar, *binding_context))
Type::TypeVar(BoundTypeVarInstance::new(db, typevar, *binding_context, None))
}
TypeMapping::Specialization(_) |
TypeMapping::PartialSpecialization(_) |
@ -7930,18 +7936,28 @@ impl<'db> Type<'db> {
typevars: &mut FxOrderSet<BoundTypeVarInstance<'db>>,
visitor: &FindLegacyTypeVarsVisitor<'db>,
) {
let is_matching_typevar = |bound_typevar: &BoundTypeVarInstance<'db>| {
matches!(
bound_typevar.typevar(db).kind(db),
TypeVarKind::Legacy | TypeVarKind::TypingSelf | TypeVarKind::ParamSpec
) && binding_context.is_none_or(|binding_context| {
bound_typevar.binding_context(db) == BindingContext::Definition(binding_context)
})
let matching_typevar = |bound_typevar: &BoundTypeVarInstance<'db>| {
match bound_typevar.typevar(db).kind(db) {
TypeVarKind::Legacy | TypeVarKind::TypingSelf
if binding_context.is_none_or(|binding_context| {
bound_typevar.binding_context(db)
== BindingContext::Definition(binding_context)
}) =>
{
Some(*bound_typevar)
}
TypeVarKind::ParamSpec => {
// For `ParamSpec`, we're only interested in `P` itself, not `P.args` or
// `P.kwargs`.
Some(bound_typevar.without_paramspec_attr(db))
}
_ => None,
}
};
match self {
Type::TypeVar(bound_typevar) => {
if is_matching_typevar(&bound_typevar) {
if let Some(bound_typevar) = matching_typevar(&bound_typevar) {
typevars.insert(bound_typevar);
}
}
@ -8083,7 +8099,7 @@ impl<'db> Type<'db> {
Type::Dynamic(DynamicType::UnknownGeneric(generic_context)) => {
for variable in generic_context.variables(db) {
if is_matching_typevar(&variable) {
if let Some(variable) = matching_typevar(&variable) {
typevars.insert(variable);
}
}
@ -8885,7 +8901,7 @@ impl<'db> KnownInstanceType<'db> {
fn class(self, db: &'db dyn Db) -> KnownClass {
match self {
Self::SubscriptedProtocol(_) | Self::SubscriptedGeneric(_) => KnownClass::SpecialForm,
Self::TypeVar(typevar_instance) if typevar_instance.kind(db).is_paramspec() => {
Self::TypeVar(typevar_instance) if typevar_instance.is_paramspec(db) => {
KnownClass::ParamSpec
}
Self::TypeVar(_) => KnownClass::TypeVar,
@ -9533,7 +9549,7 @@ impl<'db> TypeVarInstance<'db> {
db: &'db dyn Db,
binding_context: Definition<'db>,
) -> BoundTypeVarInstance<'db> {
BoundTypeVarInstance::new(db, self, BindingContext::Definition(binding_context))
BoundTypeVarInstance::new(db, self, BindingContext::Definition(binding_context), None)
}
pub(crate) fn name(self, db: &'db dyn Db) -> &'db ast::name::Name {
@ -9552,6 +9568,10 @@ impl<'db> TypeVarInstance<'db> {
matches!(self.kind(db), TypeVarKind::TypingSelf)
}
pub(crate) fn is_paramspec(self, db: &'db dyn Db) -> bool {
self.kind(db).is_paramspec()
}
pub(crate) fn upper_bound(self, db: &'db dyn Db) -> Option<Type<'db>> {
if let Some(TypeVarBoundOrConstraints::UpperBound(ty)) = self.bound_or_constraints(db) {
Some(ty)
@ -9785,6 +9805,45 @@ impl<'db> TypeVarInstance<'db> {
#[salsa::tracked(cycle_fn=lazy_default_cycle_recover, cycle_initial=lazy_default_cycle_initial, heap_size=ruff_memory_usage::heap_size)]
fn lazy_default(self, db: &'db dyn Db) -> Option<Type<'db>> {
fn convert_type_to_paramspec_value<'db>(db: &'db dyn Db, ty: Type<'db>) -> Type<'db> {
let parameters = match ty {
Type::NominalInstance(nominal_instance)
if nominal_instance.has_known_class(db, KnownClass::EllipsisType) =>
{
Parameters::gradual_form()
}
Type::NominalInstance(nominal_instance) => nominal_instance
.own_tuple_spec(db)
.map_or_else(Parameters::unknown, |tuple_spec| {
Parameters::new(
db,
tuple_spec.all_elements().map(|ty| {
Parameter::positional_only(None).with_annotated_type(*ty)
}),
)
}),
Type::Dynamic(dynamic) => match dynamic {
DynamicType::Todo(_)
| DynamicType::TodoUnpack
| DynamicType::TodoStarredExpression => Parameters::todo(),
DynamicType::Any
| DynamicType::Unknown
| DynamicType::UnknownGeneric(_)
| DynamicType::Divergent(_) => Parameters::unknown(),
},
Type::TypeVar(typevar) if typevar.is_paramspec(db) => {
return ty;
}
Type::KnownInstance(KnownInstanceType::TypeVar(typevar))
if typevar.is_paramspec(db) =>
{
return ty;
}
_ => Parameters::unknown(),
};
Type::paramspec_value_callable(db, parameters)
}
let definition = self.definition(db)?;
let module = parsed_module(db, definition.file(db)).load(db);
let ty = match definition.kind(db) {
@ -9793,16 +9852,25 @@ impl<'db> TypeVarInstance<'db> {
let typevar_node = typevar.node(&module);
definition_expression_type(db, definition, typevar_node.default.as_ref()?)
}
// legacy typevar
// legacy typevar / ParamSpec
DefinitionKind::Assignment(assignment) => {
let call_expr = assignment.value(&module).as_call_expr()?;
let func_ty = definition_expression_type(db, definition, &call_expr.func);
let known_class = func_ty.as_class_literal().and_then(|cls| cls.known(db));
let expr = &call_expr.arguments.find_keyword("default")?.value;
definition_expression_type(db, definition, expr)
let default_type = definition_expression_type(db, definition, expr);
if known_class == Some(KnownClass::ParamSpec) {
convert_type_to_paramspec_value(db, default_type)
} else {
default_type
}
}
// PEP 695 ParamSpec
DefinitionKind::ParamSpec(paramspec) => {
let paramspec_node = paramspec.node(&module);
definition_expression_type(db, definition, paramspec_node.default.as_ref()?)
let default_ty =
definition_expression_type(db, definition, paramspec_node.default.as_ref()?);
convert_type_to_paramspec_value(db, default_ty)
}
_ => return None,
};
@ -9815,7 +9883,10 @@ impl<'db> TypeVarInstance<'db> {
}
pub fn bind_pep695(self, db: &'db dyn Db) -> Option<BoundTypeVarInstance<'db>> {
if self.identity(db).kind(db) != TypeVarKind::Pep695 {
if !matches!(
self.identity(db).kind(db),
TypeVarKind::Pep695 | TypeVarKind::Pep695ParamSpec
) {
return None;
}
let typevar_definition = self.definition(db)?;
@ -9910,6 +9981,21 @@ impl<'db> BindingContext<'db> {
}
}
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord, get_size2::GetSize)]
pub enum ParamSpecAttrKind {
Args,
Kwargs,
}
impl std::fmt::Display for ParamSpecAttrKind {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
ParamSpecAttrKind::Args => f.write_str("args"),
ParamSpecAttrKind::Kwargs => f.write_str("kwargs"),
}
}
}
/// The identity of a bound type variable.
///
/// This identifies a specific binding of a typevar to a context (e.g., `T@ClassC` vs `T@FunctionF`),
@ -9922,14 +10008,26 @@ impl<'db> BindingContext<'db> {
pub struct BoundTypeVarIdentity<'db> {
pub(crate) identity: TypeVarIdentity<'db>,
pub(crate) binding_context: BindingContext<'db>,
/// If [`Some`], this indicates that this type variable is the `args` or `kwargs` component
/// of a `ParamSpec` i.e., `P.args` or `P.kwargs`.
paramspec_attr: Option<ParamSpecAttrKind>,
}
/// A type variable that has been bound to a generic context, and which can be specialized to a
/// concrete type.
///
/// # Ordering
///
/// Ordering is based on the wrapped data's salsa-assigned id and not on its values.
/// The id may change between runs, or when e.g. a `BoundTypeVarInstance` was garbage-collected and recreated.
#[salsa::interned(debug, heap_size=ruff_memory_usage::heap_size)]
#[derive(PartialOrd, Ord)]
pub struct BoundTypeVarInstance<'db> {
pub typevar: TypeVarInstance<'db>,
binding_context: BindingContext<'db>,
/// If [`Some`], this indicates that this type variable is the `args` or `kwargs` component
/// of a `ParamSpec` i.e., `P.args` or `P.kwargs`.
paramspec_attr: Option<ParamSpecAttrKind>,
}
// The Salsa heap is tracked separately.
@ -9944,9 +10042,83 @@ impl<'db> BoundTypeVarInstance<'db> {
BoundTypeVarIdentity {
identity: self.typevar(db).identity(db),
binding_context: self.binding_context(db),
paramspec_attr: self.paramspec_attr(db),
}
}
pub(crate) fn name(self, db: &'db dyn Db) -> &'db ast::name::Name {
self.typevar(db).name(db)
}
pub(crate) fn kind(self, db: &'db dyn Db) -> TypeVarKind {
self.typevar(db).kind(db)
}
pub(crate) fn is_paramspec(self, db: &'db dyn Db) -> bool {
self.kind(db).is_paramspec()
}
/// Returns a new bound typevar instance with the given `ParamSpec` attribute set.
///
/// This method will also set an appropriate upper bound on the typevar, based on the
/// attribute kind. For `P.args`, the upper bound will be `tuple[object, ...]`, and for
/// `P.kwargs`, the upper bound will be `Top[dict[str, Any]]`.
///
/// It's the caller's responsibility to ensure that this method is only called on a `ParamSpec`
/// type variable.
pub(crate) fn with_paramspec_attr(self, db: &'db dyn Db, kind: ParamSpecAttrKind) -> Self {
debug_assert!(
self.is_paramspec(db),
"Expected a ParamSpec, got {:?}",
self.kind(db)
);
let upper_bound = TypeVarBoundOrConstraints::UpperBound(match kind {
ParamSpecAttrKind::Args => Type::homogeneous_tuple(db, Type::object()),
ParamSpecAttrKind::Kwargs => KnownClass::Dict
.to_specialized_instance(db, [KnownClass::Str.to_instance(db), Type::any()])
.top_materialization(db),
});
let typevar = TypeVarInstance::new(
db,
self.typevar(db).identity(db),
Some(TypeVarBoundOrConstraintsEvaluation::Eager(upper_bound)),
None, // ParamSpecs cannot have explicit variance
None, // `P.args` and `P.kwargs` cannot have defaults even though `P` can
);
Self::new(db, typevar, self.binding_context(db), Some(kind))
}
/// Returns a new bound typevar instance without any `ParamSpec` attribute set.
///
/// This method will also remove any upper bound that was set by `with_paramspec_attr`. This
/// means that the returned typevar will have no upper bound or constraints.
///
/// It's the caller's responsibility to ensure that this method is only called on a `ParamSpec`
/// type variable.
pub(crate) fn without_paramspec_attr(self, db: &'db dyn Db) -> Self {
debug_assert!(
self.is_paramspec(db),
"Expected a ParamSpec, got {:?}",
self.kind(db)
);
Self::new(
db,
TypeVarInstance::new(
db,
self.typevar(db).identity(db),
None, // Remove the upper bound set by `with_paramspec_attr`
None, // ParamSpecs cannot have explicit variance
None, // `P.args` and `P.kwargs` cannot have defaults even though `P` can
),
self.binding_context(db),
None,
)
}
/// Returns whether two bound typevars represent the same logical typevar, regardless of e.g.
/// differences in their bounds or constraints due to materialization.
pub(crate) fn is_same_typevar_as(self, db: &'db dyn Db, other: Self) -> bool {
@ -9973,7 +10145,7 @@ impl<'db> BoundTypeVarInstance<'db> {
Some(variance),
None, // _default
);
Self::new(db, typevar, BindingContext::Synthetic)
Self::new(db, typevar, BindingContext::Synthetic, None)
}
/// Create a new synthetic `Self` type variable with the given upper bound.
@ -9995,7 +10167,7 @@ impl<'db> BoundTypeVarInstance<'db> {
Some(TypeVarVariance::Invariant),
None, // _default
);
Self::new(db, typevar, binding_context)
Self::new(db, typevar, binding_context, None)
}
/// Returns an identical type variable with its `TypeVarBoundOrConstraints` mapped by the
@ -10014,7 +10186,12 @@ impl<'db> BoundTypeVarInstance<'db> {
self.typevar(db)._default(db),
);
Self::new(db, typevar, self.binding_context(db))
Self::new(
db,
typevar,
self.binding_context(db),
self.paramspec_attr(db),
)
}
pub(crate) fn variance_with_polarity(
@ -10046,10 +10223,42 @@ impl<'db> BoundTypeVarInstance<'db> {
) -> Type<'db> {
match type_mapping {
TypeMapping::Specialization(specialization) => {
specialization.get(db, self).unwrap_or(Type::TypeVar(self))
let typevar = if self.is_paramspec(db) {
self.without_paramspec_attr(db)
} else {
self
};
specialization
.get(db, typevar)
.map(|ty| {
if let Some(attr) = self.paramspec_attr(db)
&& let Type::TypeVar(typevar) = ty
&& typevar.is_paramspec(db)
{
return Type::TypeVar(typevar.with_paramspec_attr(db, attr));
}
ty
})
.unwrap_or(Type::TypeVar(self))
}
TypeMapping::PartialSpecialization(partial) => {
partial.get(db, self).unwrap_or(Type::TypeVar(self))
let typevar = if self.is_paramspec(db) {
self.without_paramspec_attr(db)
} else {
self
};
partial
.get(db, typevar)
.map(|ty| {
if let Some(attr) = self.paramspec_attr(db)
&& let Type::TypeVar(typevar) = ty
&& typevar.is_paramspec(db)
{
return Type::TypeVar(typevar.with_paramspec_attr(db, attr));
}
ty
})
.unwrap_or(Type::TypeVar(self))
}
TypeMapping::BindSelf {
self_type,
@ -10132,6 +10341,7 @@ impl<'db> BoundTypeVarInstance<'db> {
db,
self.typevar(db).normalized_impl(db, visitor),
self.binding_context(db),
self.paramspec_attr(db),
)
}
@ -10146,6 +10356,7 @@ impl<'db> BoundTypeVarInstance<'db> {
self.typevar(db)
.materialize_impl(db, materialization_kind, visitor),
self.binding_context(db),
self.paramspec_attr(db),
)
}
@ -10154,6 +10365,7 @@ impl<'db> BoundTypeVarInstance<'db> {
db,
self.typevar(db).to_instance(db)?,
self.binding_context(db),
self.paramspec_attr(db),
))
}
}
@ -11906,7 +12118,7 @@ impl<'db> BoundMethodType<'db> {
.iter()
.map(|signature| signature.bind_self(db, Some(self_instance))),
),
true,
CallableTypeKind::FunctionLike,
)
}
@ -11987,6 +12199,20 @@ impl<'db> BoundMethodType<'db> {
}
}
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, get_size2::GetSize)]
pub enum CallableTypeKind {
/// Represents regular callable objects.
Regular,
/// Represents function-like objects, like the synthesized methods of dataclasses or
/// `NamedTuples`. These callables act like real functions when accessed as attributes on
/// instances, i.e. they bind `self`.
FunctionLike,
/// Represents the value bound to a `typing.ParamSpec` type variable.
ParamSpecValue,
}
/// This type represents the set of all callable objects with a certain, possibly overloaded,
/// signature.
///
@ -12003,10 +12229,7 @@ pub struct CallableType<'db> {
#[returns(ref)]
pub(crate) signatures: CallableSignature<'db>,
/// We use `CallableType` to represent function-like objects, like the synthesized methods
/// of dataclasses or NamedTuples. These callables act like real functions when accessed
/// as attributes on instances, i.e. they bind `self`.
is_function_like: bool,
kind: CallableTypeKind,
}
pub(super) fn walk_callable_type<'db, V: visitor::TypeVisitor<'db> + ?Sized>(
@ -12034,15 +12257,43 @@ impl<'db> Type<'db> {
pub(crate) fn function_like_callable(db: &'db dyn Db, signature: Signature<'db>) -> Type<'db> {
Type::Callable(CallableType::function_like(db, signature))
}
/// Create a non-overloaded callable type which represents the value bound to a `ParamSpec`
/// type variable.
pub(crate) fn paramspec_value_callable(
db: &'db dyn Db,
parameters: Parameters<'db>,
) -> Type<'db> {
Type::Callable(CallableType::paramspec_value(db, parameters))
}
}
impl<'db> CallableType<'db> {
pub(crate) fn single(db: &'db dyn Db, signature: Signature<'db>) -> CallableType<'db> {
CallableType::new(db, CallableSignature::single(signature), false)
CallableType::new(
db,
CallableSignature::single(signature),
CallableTypeKind::Regular,
)
}
pub(crate) fn function_like(db: &'db dyn Db, signature: Signature<'db>) -> CallableType<'db> {
CallableType::new(db, CallableSignature::single(signature), true)
CallableType::new(
db,
CallableSignature::single(signature),
CallableTypeKind::FunctionLike,
)
}
pub(crate) fn paramspec_value(
db: &'db dyn Db,
parameters: Parameters<'db>,
) -> CallableType<'db> {
CallableType::new(
db,
CallableSignature::single(Signature::new(parameters, None)),
CallableTypeKind::ParamSpecValue,
)
}
/// Create a callable type which accepts any parameters and returns an `Unknown` type.
@ -12050,6 +12301,10 @@ impl<'db> CallableType<'db> {
Self::single(db, Signature::unknown())
}
pub(crate) fn is_function_like(self, db: &'db dyn Db) -> bool {
matches!(self.kind(db), CallableTypeKind::FunctionLike)
}
pub(crate) fn bind_self(
self,
db: &'db dyn Db,
@ -12058,7 +12313,7 @@ impl<'db> CallableType<'db> {
CallableType::new(
db,
self.signatures(db).bind_self(db, self_type),
self.is_function_like(db),
self.kind(db),
)
}
@ -12066,7 +12321,7 @@ impl<'db> CallableType<'db> {
CallableType::new(
db,
self.signatures(db).apply_self(db, self_type),
self.is_function_like(db),
self.kind(db),
)
}
@ -12075,7 +12330,7 @@ impl<'db> CallableType<'db> {
/// Specifically, this represents a callable type with a single signature:
/// `(*args: object, **kwargs: object) -> Never`.
pub(crate) fn bottom(db: &'db dyn Db) -> CallableType<'db> {
Self::new(db, CallableSignature::bottom(), false)
Self::new(db, CallableSignature::bottom(), CallableTypeKind::Regular)
}
/// Return a "normalized" version of this `Callable` type.
@ -12085,7 +12340,7 @@ impl<'db> CallableType<'db> {
CallableType::new(
db,
self.signatures(db).normalized_impl(db, visitor),
self.is_function_like(db),
self.kind(db),
)
}
@ -12099,7 +12354,7 @@ impl<'db> CallableType<'db> {
db,
self.signatures(db)
.recursive_type_normalized_impl(db, div, nested)?,
self.is_function_like(db),
self.kind(db),
))
}
@ -12114,7 +12369,7 @@ impl<'db> CallableType<'db> {
db,
self.signatures(db)
.apply_type_mapping_impl(db, type_mapping, tcx, visitor),
self.is_function_like(db),
self.kind(db),
)
}

View File

@ -150,6 +150,14 @@ impl<'a, 'db> CallArguments<'a, 'db> {
(self.arguments.iter().copied()).zip(self.types.iter_mut())
}
/// Create a new [`CallArguments`] starting from the specified index.
pub(super) fn start_from(&self, index: usize) -> Self {
Self {
arguments: self.arguments[index..].to_vec(),
types: self.types[index..].to_vec(),
}
}
/// Returns an iterator on performing [argument type expansion].
///
/// Each element of the iterator represents a set of argument lists, where each argument list

View File

@ -3,6 +3,7 @@
//! [signatures][crate::types::signatures], we have to handle the fact that the callable might be a
//! union of types, each of which might contain multiple overloads.
use std::borrow::Cow;
use std::collections::HashSet;
use std::fmt;
@ -32,16 +33,15 @@ use crate::types::function::{
use crate::types::generics::{
InferableTypeVars, Specialization, SpecializationBuilder, SpecializationError,
};
use crate::types::signatures::{
CallableSignature, Parameter, ParameterForm, ParameterKind, Parameters,
};
use crate::types::tuple::{TupleLength, TupleType};
use crate::types::signatures::{Parameter, ParameterForm, ParameterKind, Parameters};
use crate::types::tuple::{TupleLength, TupleSpec, TupleType};
use crate::types::{
BoundMethodType, BoundTypeVarIdentity, ClassLiteral, DATACLASS_FLAGS, DataclassFlags,
DataclassParams, FieldInstance, KnownBoundMethodType, KnownClass, KnownInstanceType,
MemberLookupPolicy, NominalInstanceType, PropertyInstanceType, SpecialFormType,
TrackedConstraintSet, TypeAliasType, TypeContext, TypeVarVariance, UnionBuilder, UnionType,
WrapperDescriptorKind, enums, list_members, todo_type,
BoundMethodType, BoundTypeVarIdentity, BoundTypeVarInstance, CallableSignature,
CallableTypeKind, ClassLiteral, DATACLASS_FLAGS, DataclassFlags, DataclassParams,
FieldInstance, KnownBoundMethodType, KnownClass, KnownInstanceType, MemberLookupPolicy,
NominalInstanceType, PropertyInstanceType, SpecialFormType, TrackedConstraintSet,
TypeAliasType, TypeContext, TypeVarVariance, UnionBuilder, UnionType, WrapperDescriptorKind,
enums, list_members, todo_type,
};
use ruff_db::diagnostic::{Annotation, Diagnostic, SubDiagnostic, SubDiagnosticSeverity};
use ruff_python_ast::{self as ast, ArgOrKeyword, PythonVersion};
@ -2581,20 +2581,62 @@ impl<'a, 'db> ArgumentMatcher<'a, 'db> {
argument: Argument<'a>,
argument_type: Option<Type<'db>>,
) -> Result<(), ()> {
// TODO: `Type::iterate` internally handles unions, but in a lossy way.
// It might be superior here to manually map over the union and call `try_iterate`
// on each element, similar to the way that `unpacker.rs` does in the `unpack_inner` method.
// It might be a bit of a refactor, though.
// See <https://github.com/astral-sh/ruff/pull/20377#issuecomment-3401380305>
// for more details. --Alex
let tuple = argument_type.map(|ty| ty.iterate(db));
let (mut argument_types, length, variable_element) = match tuple.as_ref() {
Some(tuple) => (
enum VariadicArgumentType<'db> {
ParamSpec(Type<'db>),
Other(Cow<'db, TupleSpec<'db>>),
None,
}
let variadic_type = match argument_type {
Some(argument_type @ Type::Union(union)) => {
// When accessing an instance attribute that is a `P.args`, the type we infer is
// `Unknown | P.args`. This needs to be special cased here to avoid calling
// `iterate` on it which will lose the `ParamSpec` information as it will return
// `object` that comes from the upper bound of `P.args`. What we want is to always
// use the `P.args` type to perform type checking against the parameter type. This
// will allow us to error when `*args: P.args` is matched against, for example,
// `n: int` and correctly type check when `*args: P.args` is matched against
// `*args: P.args` (another ParamSpec).
match union.elements(db) {
[paramspec @ Type::TypeVar(typevar), other]
| [other, paramspec @ Type::TypeVar(typevar)]
if typevar.is_paramspec(db) && other.is_unknown() =>
{
VariadicArgumentType::ParamSpec(*paramspec)
}
_ => {
// TODO: Same todo comment as in the non-paramspec case below
VariadicArgumentType::Other(argument_type.iterate(db))
}
}
}
Some(paramspec @ Type::TypeVar(typevar)) if typevar.is_paramspec(db) => {
VariadicArgumentType::ParamSpec(paramspec)
}
Some(argument_type) => {
// TODO: `Type::iterate` internally handles unions, but in a lossy way.
// It might be superior here to manually map over the union and call `try_iterate`
// on each element, similar to the way that `unpacker.rs` does in the `unpack_inner` method.
// It might be a bit of a refactor, though.
// See <https://github.com/astral-sh/ruff/pull/20377#issuecomment-3401380305>
// for more details. --Alex
VariadicArgumentType::Other(argument_type.iterate(db))
}
None => VariadicArgumentType::None,
};
let (mut argument_types, length, variable_element) = match &variadic_type {
VariadicArgumentType::ParamSpec(paramspec) => (
Either::Right(std::iter::empty()),
TupleLength::unknown(),
Some(*paramspec),
),
VariadicArgumentType::Other(tuple) => (
Either::Left(tuple.all_elements().copied()),
tuple.len(),
tuple.variable_element().copied(),
),
None => (
VariadicArgumentType::None => (
Either::Right(std::iter::empty()),
TupleLength::unknown(),
None,
@ -2669,21 +2711,39 @@ impl<'a, 'db> ArgumentMatcher<'a, 'db> {
);
}
} else {
let value_type = match argument_type.map(|ty| {
ty.member_lookup_with_policy(
let dunder_getitem_return_type = |ty: Type<'db>| match ty
.member_lookup_with_policy(
db,
Name::new_static("__getitem__"),
MemberLookupPolicy::NO_INSTANCE_FALLBACK,
)
.place
}) {
Some(Place::Defined(keys_method, _, Definedness::AlwaysDefined)) => keys_method
{
Place::Defined(getitem_method, _, Definedness::AlwaysDefined) => getitem_method
.try_call(db, &CallArguments::positional([Type::unknown()]))
.ok()
.map_or_else(Type::unknown, |bindings| bindings.return_type(db)),
_ => Type::unknown(),
};
let value_type = match argument_type {
Some(argument_type @ Type::Union(union)) => {
// See the comment in `match_variadic` for why we special case this situation.
match union.elements(db) {
[paramspec @ Type::TypeVar(typevar), other]
| [other, paramspec @ Type::TypeVar(typevar)]
if typevar.is_paramspec(db) && other.is_unknown() =>
{
*paramspec
}
_ => dunder_getitem_return_type(argument_type),
}
}
Some(paramspec @ Type::TypeVar(typevar)) if typevar.is_paramspec(db) => paramspec,
Some(argument_type) => dunder_getitem_return_type(argument_type),
None => Type::unknown(),
};
for (parameter_index, parameter) in self.parameters.iter().enumerate() {
if self.parameter_info[parameter_index].matched && !parameter.is_keyword_variadic()
{
@ -2753,6 +2813,7 @@ impl<'a, 'db> ArgumentMatcher<'a, 'db> {
struct ArgumentTypeChecker<'a, 'db> {
db: &'db dyn Db,
signature_type: Type<'db>,
signature: &'a Signature<'db>,
arguments: &'a CallArguments<'a, 'db>,
argument_matches: &'a [MatchedArgument<'db>],
@ -2770,6 +2831,7 @@ impl<'a, 'db> ArgumentTypeChecker<'a, 'db> {
#[expect(clippy::too_many_arguments)]
fn new(
db: &'db dyn Db,
signature_type: Type<'db>,
signature: &'a Signature<'db>,
arguments: &'a CallArguments<'a, 'db>,
argument_matches: &'a [MatchedArgument<'db>],
@ -2781,6 +2843,7 @@ impl<'a, 'db> ArgumentTypeChecker<'a, 'db> {
) -> Self {
Self {
db,
signature_type,
signature,
arguments,
argument_matches,
@ -3029,9 +3092,23 @@ impl<'a, 'db> ArgumentTypeChecker<'a, 'db> {
}
fn check_argument_types(&mut self) {
let paramspec = self
.signature
.parameters()
.find_paramspec_from_args_kwargs(self.db);
for (argument_index, adjusted_argument_index, argument, argument_type) in
self.enumerate_argument_types()
{
if let Some((_, paramspec)) = paramspec {
if self.try_paramspec_evaluation_at(argument_index, paramspec) {
// Once we find an argument that matches the `ParamSpec`, we can stop checking
// the remaining arguments since `ParamSpec` should always be the last
// parameter.
return;
}
}
match argument {
Argument::Variadic => self.check_variadic_argument_type(
argument_index,
@ -3057,6 +3134,131 @@ impl<'a, 'db> ArgumentTypeChecker<'a, 'db> {
}
}
}
if let Some((_, paramspec)) = paramspec {
// If we reach here, none of the arguments matched the `ParamSpec` parameter, but the
// `ParamSpec` could specialize to a parameter list containing some parameters. For
// example,
//
// ```py
// from typing import Callable
//
// def foo[**P](f: Callable[P, None], *args: P.args, **kwargs: P.kwargs) -> None: ...
//
// def f(x: int) -> None: ...
//
// foo(f)
// ```
//
// Here, no arguments match the `ParamSpec` parameter, but `P` specializes to `(x: int)`,
// so we need to perform a sub-call with no arguments.
self.evaluate_paramspec_sub_call(None, paramspec);
}
}
/// Try to evaluate a `ParamSpec` sub-call at the given argument index.
///
/// The `ParamSpec` parameter is always going to be at the end of the parameter list but there
/// can be other parameter before it. If one of these prepended positional parameters contains
/// a free `ParamSpec`, we consider that variable in scope for the purposes of extracting the
/// components of that `ParamSpec`. For example:
///
/// ```py
/// from typing import Callable
///
/// def foo[**P](f: Callable[P, None], *args: P.args, **kwargs: P.kwargs) -> None: ...
///
/// def f(x: int, y: str) -> None: ...
///
/// foo(f, 1, "hello") # P: (x: int, y: str)
/// ```
///
/// Here, `P` specializes to `(x: int, y: str)` when `foo` is called with `f`, which means that
/// the parameters of `f` become a part of `foo`'s parameter list replacing the `ParamSpec`
/// parameter which is:
///
/// ```py
/// def foo(f: Callable[[x: int, y: str], None], x: int, y: str) -> None: ...
/// ```
///
/// This method will check whether the parameter matching the argument at `argument_index` is
/// annotated with the components of `ParamSpec`, and if so, will invoke a sub-call considering
/// the arguments starting from `argument_index` against the specialized parameter list.
///
/// Returns `true` if the sub-call was invoked, `false` otherwise.
fn try_paramspec_evaluation_at(
&mut self,
argument_index: usize,
paramspec: BoundTypeVarInstance<'db>,
) -> bool {
let [parameter_index] = self.argument_matches[argument_index].parameters.as_slice() else {
return false;
};
if !self.signature.parameters()[*parameter_index]
.annotated_type()
.is_some_and(|ty| matches!(ty, Type::TypeVar(typevar) if typevar.is_paramspec(self.db)))
{
return false;
}
self.evaluate_paramspec_sub_call(Some(argument_index), paramspec)
}
/// Invoke a sub-call for the given `ParamSpec` type variable, using the remaining arguments.
///
/// The remaining arguments start from `argument_index` if provided, otherwise no arguments
/// are passed.
///
/// This method returns `false` if the specialization does not contain a mapping for the given
/// `paramspec`, contains an invalid mapping (i.e., not a `Callable` of kind `ParamSpecValue`)
/// or if the value is an overloaded callable.
///
/// For more details, refer to [`Self::try_paramspec_evaluation_at`].
fn evaluate_paramspec_sub_call(
&mut self,
argument_index: Option<usize>,
paramspec: BoundTypeVarInstance<'db>,
) -> bool {
let Some(Type::Callable(callable)) = self
.specialization
.and_then(|specialization| specialization.get(self.db, paramspec))
else {
return false;
};
if callable.kind(self.db) != CallableTypeKind::ParamSpecValue {
return false;
}
// TODO: Support overloads?
let [signature] = callable.signatures(self.db).overloads.as_slice() else {
return false;
};
let sub_arguments = if let Some(argument_index) = argument_index {
self.arguments.start_from(argument_index)
} else {
CallArguments::none()
};
// TODO: What should be the `signature_type` here?
let bindings = match Bindings::from(Binding::single(self.signature_type, signature.clone()))
.match_parameters(self.db, &sub_arguments)
.check_types(self.db, &sub_arguments, self.call_expression_tcx, &[])
{
Ok(bindings) => Box::new(bindings),
Err(CallError(_, bindings)) => bindings,
};
// SAFETY: `bindings` was created from a single binding above.
let [binding] = bindings.single_element().unwrap().overloads.as_slice() else {
unreachable!("ParamSpec sub-call should only contain a single binding");
};
self.errors.extend(binding.errors.iter().cloned());
true
}
fn check_variadic_argument_type(
@ -3099,69 +3301,94 @@ impl<'a, 'db> ArgumentTypeChecker<'a, 'db> {
);
}
} else {
// TODO: Instead of calling the `keys` and `__getitem__` methods, we should instead
// get the constraints which satisfies the `SupportsKeysAndGetItem` protocol i.e., the
// key and value type.
let key_type = match argument_type
.member_lookup_with_policy(
self.db,
Name::new_static("keys"),
MemberLookupPolicy::NO_INSTANCE_FALLBACK,
)
.place
{
Place::Defined(keys_method, _, Definedness::AlwaysDefined) => keys_method
.try_call(self.db, &CallArguments::none())
.ok()
.and_then(|bindings| {
Some(
bindings
.return_type(self.db)
.try_iterate(self.db)
.ok()?
.homogeneous_element_type(self.db),
let mut value_type_fallback = |argument_type: Type<'db>| {
// TODO: Instead of calling the `keys` and `__getitem__` methods, we should
// instead get the constraints which satisfies the `SupportsKeysAndGetItem`
// protocol i.e., the key and value type.
let key_type = match argument_type
.member_lookup_with_policy(
self.db,
Name::new_static("keys"),
MemberLookupPolicy::NO_INSTANCE_FALLBACK,
)
.place
{
Place::Defined(keys_method, _, Definedness::AlwaysDefined) => keys_method
.try_call(self.db, &CallArguments::none())
.ok()
.and_then(|bindings| {
Some(
bindings
.return_type(self.db)
.try_iterate(self.db)
.ok()?
.homogeneous_element_type(self.db),
)
}),
_ => None,
};
let Some(key_type) = key_type else {
self.errors.push(BindingError::KeywordsNotAMapping {
argument_index: adjusted_argument_index,
provided_ty: argument_type,
});
return None;
};
if !key_type
.when_assignable_to(
self.db,
KnownClass::Str.to_instance(self.db),
self.inferable_typevars,
)
.is_always_satisfied(self.db)
{
self.errors.push(BindingError::InvalidKeyType {
argument_index: adjusted_argument_index,
provided_ty: key_type,
});
}
Some(
match argument_type
.member_lookup_with_policy(
self.db,
Name::new_static("__getitem__"),
MemberLookupPolicy::NO_INSTANCE_FALLBACK,
)
}),
_ => None,
.place
{
Place::Defined(keys_method, _, Definedness::AlwaysDefined) => keys_method
.try_call(self.db, &CallArguments::positional([Type::unknown()]))
.ok()
.map_or_else(Type::unknown, |bindings| bindings.return_type(self.db)),
_ => Type::unknown(),
},
)
};
let Some(key_type) = key_type else {
self.errors.push(BindingError::KeywordsNotAMapping {
argument_index: adjusted_argument_index,
provided_ty: argument_type,
});
let value_type = match argument_type {
Type::Union(union) => {
// See the comment in `match_variadic` for why we special case this situation.
match union.elements(self.db) {
[paramspec @ Type::TypeVar(typevar), other]
| [other, paramspec @ Type::TypeVar(typevar)]
if typevar.is_paramspec(self.db) && other.is_unknown() =>
{
Some(*paramspec)
}
_ => value_type_fallback(argument_type),
}
}
Type::TypeVar(typevar) if typevar.is_paramspec(self.db) => Some(argument_type),
_ => value_type_fallback(argument_type),
};
let Some(value_type) = value_type else {
return;
};
if !key_type
.when_assignable_to(
self.db,
KnownClass::Str.to_instance(self.db),
self.inferable_typevars,
)
.is_always_satisfied(self.db)
{
self.errors.push(BindingError::InvalidKeyType {
argument_index: adjusted_argument_index,
provided_ty: key_type,
});
}
let value_type = match argument_type
.member_lookup_with_policy(
self.db,
Name::new_static("__getitem__"),
MemberLookupPolicy::NO_INSTANCE_FALLBACK,
)
.place
{
Place::Defined(keys_method, _, Definedness::AlwaysDefined) => keys_method
.try_call(self.db, &CallArguments::positional([Type::unknown()]))
.ok()
.map_or_else(Type::unknown, |bindings| bindings.return_type(self.db)),
_ => Type::unknown(),
};
for (argument_type, parameter_index) in
std::iter::repeat(value_type).zip(&self.argument_matches[argument_index].parameters)
{
@ -3339,6 +3566,7 @@ impl<'db> Binding<'db> {
) {
let mut checker = ArgumentTypeChecker::new(
db,
self.signature_type,
&self.signature,
arguments,
&self.argument_matches,

View File

@ -32,12 +32,13 @@ use crate::types::tuple::{TupleSpec, TupleType};
use crate::types::typed_dict::typed_dict_params_from_class_def;
use crate::types::visitor::{TypeCollector, TypeVisitor, walk_type_with_recursion_guard};
use crate::types::{
ApplyTypeMappingVisitor, Binding, BoundSuperType, CallableType, CallableTypes, DATACLASS_FLAGS,
DataclassFlags, DataclassParams, DeprecatedInstance, FindLegacyTypeVarsVisitor,
HasRelationToVisitor, IsDisjointVisitor, IsEquivalentVisitor, KnownInstanceType,
ManualPEP695TypeAliasType, MaterializationKind, NormalizedVisitor, PropertyInstanceType,
StringLiteralType, TypeAliasType, TypeContext, TypeMapping, TypeRelation, TypedDictParams,
UnionBuilder, VarianceInferable, binding_type, declaration_type, determine_upper_bound,
ApplyTypeMappingVisitor, Binding, BoundSuperType, CallableType, CallableTypeKind,
CallableTypes, DATACLASS_FLAGS, DataclassFlags, DataclassParams, DeprecatedInstance,
FindLegacyTypeVarsVisitor, HasRelationToVisitor, IsDisjointVisitor, IsEquivalentVisitor,
KnownInstanceType, ManualPEP695TypeAliasType, MaterializationKind, NormalizedVisitor,
PropertyInstanceType, StringLiteralType, TypeAliasType, TypeContext, TypeMapping, TypeRelation,
TypedDictParams, UnionBuilder, VarianceInferable, binding_type, declaration_type,
determine_upper_bound,
};
use crate::{
Db, FxIndexMap, FxIndexSet, FxOrderSet, Program,
@ -1023,8 +1024,11 @@ impl<'db> ClassType<'db> {
let getitem_signature =
CallableSignature::from_overloads(overload_signatures);
let getitem_type =
Type::Callable(CallableType::new(db, getitem_signature, true));
let getitem_type = Type::Callable(CallableType::new(
db,
getitem_signature,
CallableTypeKind::FunctionLike,
));
Member::definitely_declared(getitem_type)
})
.unwrap_or_else(fallback_member_lookup)
@ -1190,7 +1194,7 @@ impl<'db> ClassType<'db> {
let dunder_new_bound_method = CallableType::new(
db,
dunder_new_signature.bind_self(db, Some(instance_ty)),
true,
CallableTypeKind::FunctionLike,
);
if returns_non_subclass {
@ -1259,7 +1263,7 @@ impl<'db> ClassType<'db> {
Some(CallableType::new(
db,
synthesized_dunder_init_signature,
true,
CallableTypeKind::FunctionLike,
))
} else {
None
@ -2082,9 +2086,11 @@ impl<'db> ClassLiteral<'db> {
) -> PlaceAndQualifiers<'db> {
fn into_function_like_callable<'d>(db: &'d dyn Db, ty: Type<'d>) -> Type<'d> {
match ty {
Type::Callable(callable_ty) => {
Type::Callable(CallableType::new(db, callable_ty.signatures(db), true))
}
Type::Callable(callable_ty) => Type::Callable(CallableType::new(
db,
callable_ty.signatures(db),
CallableTypeKind::FunctionLike,
)),
Type::Union(union) => {
union.map(db, |element| into_function_like_callable(db, *element))
}
@ -2679,7 +2685,7 @@ impl<'db> ClassLiteral<'db> {
),
Some(Type::none(db)),
)),
true,
CallableTypeKind::FunctionLike,
)));
}
@ -2705,7 +2711,7 @@ impl<'db> ClassLiteral<'db> {
Some(Type::Callable(CallableType::new(
db,
CallableSignature::from_overloads(overloads),
true,
CallableTypeKind::FunctionLike,
)))
}
(CodeGeneratorKind::TypedDict, "__getitem__") => {
@ -2732,7 +2738,7 @@ impl<'db> ClassLiteral<'db> {
Some(Type::Callable(CallableType::new(
db,
CallableSignature::from_overloads(overloads),
true,
CallableTypeKind::FunctionLike,
)))
}
(CodeGeneratorKind::TypedDict, "get") => {
@ -2840,7 +2846,7 @@ impl<'db> ClassLiteral<'db> {
Some(Type::Callable(CallableType::new(
db,
CallableSignature::from_overloads(overloads),
true,
CallableTypeKind::FunctionLike,
)))
}
(CodeGeneratorKind::TypedDict, "pop") => {
@ -2900,7 +2906,7 @@ impl<'db> ClassLiteral<'db> {
Some(Type::Callable(CallableType::new(
db,
CallableSignature::from_overloads(overloads),
true,
CallableTypeKind::FunctionLike,
)))
}
(CodeGeneratorKind::TypedDict, "setdefault") => {
@ -2928,7 +2934,7 @@ impl<'db> ClassLiteral<'db> {
Some(Type::Callable(CallableType::new(
db,
CallableSignature::from_overloads(overloads),
true,
CallableTypeKind::FunctionLike,
)))
}
(CodeGeneratorKind::TypedDict, "update") => {

View File

@ -17,13 +17,16 @@ use crate::Db;
use crate::types::class::{ClassLiteral, ClassType, GenericAlias};
use crate::types::function::{FunctionType, OverloadLiteral};
use crate::types::generics::{GenericContext, Specialization};
use crate::types::signatures::{CallableSignature, Parameter, Parameters, Signature};
use crate::types::signatures::{
CallableSignature, Parameter, Parameters, ParametersKind, Signature,
};
use crate::types::tuple::TupleSpec;
use crate::types::visitor::TypeVisitor;
use crate::types::{
BoundTypeVarIdentity, CallableType, IntersectionType, KnownBoundMethodType, KnownClass,
KnownInstanceType, MaterializationKind, Protocol, ProtocolInstanceType, SpecialFormType,
StringLiteralType, SubclassOfInner, Type, UnionType, WrapperDescriptorKind, visitor,
BoundTypeVarIdentity, CallableType, CallableTypeKind, IntersectionType, KnownBoundMethodType,
KnownClass, KnownInstanceType, MaterializationKind, Protocol, ProtocolInstanceType,
SpecialFormType, StringLiteralType, SubclassOfInner, Type, UnionType, WrapperDescriptorKind,
visitor,
};
/// Settings for displaying types and signatures
@ -937,6 +940,9 @@ impl Display for DisplayBoundTypeVarIdentity<'_> {
if let Some(binding_context) = self.bound_typevar_identity.binding_context.name(self.db) {
write!(f, "@{binding_context}")?;
}
if let Some(paramspec_attr) = self.bound_typevar_identity.paramspec_attr {
write!(f, ".{paramspec_attr}")?;
}
Ok(())
}
}
@ -1298,7 +1304,12 @@ impl<'db> DisplayGenericContext<'_, 'db> {
f.write_str(", ")?;
}
f.set_invalid_syntax();
f.write_str(bound_typevar.typevar(self.db).name(self.db))?;
let typevar = bound_typevar.typevar(self.db);
if typevar.is_paramspec(self.db) {
write!(f, "**{}", typevar.name(self.db))?;
} else {
f.write_str(typevar.name(self.db))?;
}
}
f.write_char(']')
}
@ -1459,6 +1470,7 @@ impl<'db> CallableType<'db> {
) -> DisplayCallableType<'a, 'db> {
DisplayCallableType {
signatures: self.signatures(db),
kind: self.kind(db),
db,
settings,
}
@ -1467,6 +1479,7 @@ impl<'db> CallableType<'db> {
pub(crate) struct DisplayCallableType<'a, 'db> {
signatures: &'a CallableSignature<'db>,
kind: CallableTypeKind,
db: &'db dyn Db,
settings: DisplaySettings<'db>,
}
@ -1474,9 +1487,18 @@ pub(crate) struct DisplayCallableType<'a, 'db> {
impl<'db> FmtDetailed<'db> for DisplayCallableType<'_, 'db> {
fn fmt_detailed(&self, f: &mut TypeWriter<'_, '_, 'db>) -> fmt::Result {
match self.signatures.overloads.as_slice() {
[signature] => signature
.display_with(self.db, self.settings.clone())
.fmt_detailed(f),
[signature] => {
if matches!(self.kind, CallableTypeKind::ParamSpecValue) {
signature
.parameters()
.display_with(self.db, self.settings.clone())
.fmt_detailed(f)
} else {
signature
.display_with(self.db, self.settings.clone())
.fmt_detailed(f)
}
}
signatures => {
// TODO: How to display overloads?
if !self.settings.multiline {
@ -1552,73 +1574,11 @@ impl<'db> FmtDetailed<'db> for DisplaySignature<'_, 'db> {
f.set_invalid_syntax();
// When we exit this function, write a marker signaling we're ending a signature
let mut f = f.with_detail(TypeDetail::SignatureEnd);
let multiline = self.settings.multiline && self.parameters.len() > 1;
// Opening parenthesis
f.write_char('(')?;
if multiline {
f.write_str("\n ")?;
}
if self.parameters.is_gradual() {
// We represent gradual form as `...` in the signature, internally the parameters still
// contain `(*args, **kwargs)` parameters.
f.write_str("...")?;
} else {
let mut star_added = false;
let mut needs_slash = false;
let mut first = true;
let arg_separator = if multiline { ",\n " } else { ", " };
for parameter in self.parameters.as_slice() {
// Handle special separators
if !star_added && parameter.is_keyword_only() {
if !first {
f.write_str(arg_separator)?;
}
f.write_char('*')?;
star_added = true;
first = false;
}
if parameter.is_positional_only() {
needs_slash = true;
} else if needs_slash {
if !first {
f.write_str(arg_separator)?;
}
f.write_char('/')?;
needs_slash = false;
first = false;
}
// Add comma before parameter if not first
if !first {
f.write_str(arg_separator)?;
}
// Write parameter with range tracking
let param_name = parameter
.display_name()
.map(|name| name.to_string())
.unwrap_or_default();
parameter
.display_with(self.db, self.settings.singleline())
.fmt_detailed(&mut f.with_detail(TypeDetail::Parameter(param_name)))?;
first = false;
}
if needs_slash {
if !first {
f.write_str(arg_separator)?;
}
f.write_char('/')?;
}
}
if multiline {
f.write_char('\n')?;
}
// Closing parenthesis
f.write_char(')')?;
// Parameters
self.parameters
.display_with(self.db, self.settings.clone())
.fmt_detailed(&mut f)?;
// Return type
let return_ty = self.return_ty.unwrap_or_else(Type::unknown);
@ -1646,6 +1606,120 @@ pub(crate) struct SignatureDisplayDetails {
pub parameter_names: Vec<String>,
}
impl<'db> Parameters<'db> {
fn display_with<'a>(
&'a self,
db: &'db dyn Db,
settings: DisplaySettings<'db>,
) -> DisplayParameters<'a, 'db> {
DisplayParameters {
parameters: self,
db,
settings,
}
}
}
struct DisplayParameters<'a, 'db> {
parameters: &'a Parameters<'db>,
db: &'db dyn Db,
settings: DisplaySettings<'db>,
}
impl<'db> FmtDetailed<'db> for DisplayParameters<'_, 'db> {
fn fmt_detailed(&self, f: &mut TypeWriter<'_, '_, 'db>) -> fmt::Result {
// For `ParamSpec` kind, the parameters still contain `*args` and `**kwargs`, but we
// display them as `**P` instead, so avoid multiline in that case.
// TODO: This might change once we support `Concatenate`
let multiline = self.settings.multiline
&& self.parameters.len() > 1
&& !matches!(
self.parameters.kind(),
ParametersKind::Gradual | ParametersKind::ParamSpec(_)
);
// Opening parenthesis
f.write_char('(')?;
if multiline {
f.write_str("\n ")?;
}
match self.parameters.kind() {
ParametersKind::Standard => {
let mut star_added = false;
let mut needs_slash = false;
let mut first = true;
let arg_separator = if multiline { ",\n " } else { ", " };
for parameter in self.parameters.as_slice() {
// Handle special separators
if !star_added && parameter.is_keyword_only() {
if !first {
f.write_str(arg_separator)?;
}
f.write_char('*')?;
star_added = true;
first = false;
}
if parameter.is_positional_only() {
needs_slash = true;
} else if needs_slash {
if !first {
f.write_str(arg_separator)?;
}
f.write_char('/')?;
needs_slash = false;
first = false;
}
// Add comma before parameter if not first
if !first {
f.write_str(arg_separator)?;
}
// Write parameter with range tracking
let param_name = parameter
.display_name()
.map(|name| name.to_string())
.unwrap_or_default();
parameter
.display_with(self.db, self.settings.singleline())
.fmt_detailed(&mut f.with_detail(TypeDetail::Parameter(param_name)))?;
first = false;
}
if needs_slash {
if !first {
f.write_str(arg_separator)?;
}
f.write_char('/')?;
}
}
ParametersKind::Gradual => {
// We represent gradual form as `...` in the signature, internally the parameters still
// contain `(*args, **kwargs)` parameters.
f.write_str("...")?;
}
ParametersKind::ParamSpec(typevar) => {
write!(f, "**{}", typevar.name(self.db))?;
if let Some(name) = typevar.binding_context(self.db).name(self.db) {
write!(f, "@{name}")?;
}
}
}
if multiline {
f.write_char('\n')?;
}
// Closing parenthesis
f.write_char(')')
}
}
impl Display for DisplayParameters<'_, '_> {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
self.fmt_detailed(&mut TypeWriter::Formatter(f))
}
}
impl<'db> Parameter<'db> {
fn display_with<'a>(
&'a self,

View File

@ -79,8 +79,8 @@ use crate::types::narrow::ClassInfoConstraintFunction;
use crate::types::signatures::{CallableSignature, Signature};
use crate::types::visitor::any_over_type;
use crate::types::{
ApplyTypeMappingVisitor, BoundMethodType, BoundTypeVarInstance, CallableType, ClassBase,
ClassLiteral, ClassType, DeprecatedInstance, DynamicType, FindLegacyTypeVarsVisitor,
ApplyTypeMappingVisitor, BoundMethodType, BoundTypeVarInstance, CallableType, CallableTypeKind,
ClassBase, ClassLiteral, ClassType, DeprecatedInstance, DynamicType, FindLegacyTypeVarsVisitor,
HasRelationToVisitor, IsDisjointVisitor, IsEquivalentVisitor, KnownClass, KnownInstanceType,
NormalizedVisitor, SpecialFormType, Truthiness, Type, TypeContext, TypeMapping, TypeRelation,
UnionBuilder, binding_type, definition_expression_type, walk_signature,
@ -1007,7 +1007,7 @@ impl<'db> FunctionType<'db> {
/// Convert the `FunctionType` into a [`CallableType`].
pub(crate) fn into_callable_type(self, db: &'db dyn Db) -> CallableType<'db> {
CallableType::new(db, self.signature(db), true)
CallableType::new(db, self.signature(db), CallableTypeKind::FunctionLike)
}
/// Convert the `FunctionType` into a [`BoundMethodType`].

View File

@ -13,16 +13,17 @@ use crate::types::class::ClassType;
use crate::types::class_base::ClassBase;
use crate::types::constraints::ConstraintSet;
use crate::types::instance::{Protocol, ProtocolInstanceType};
use crate::types::signatures::Parameters;
use crate::types::signatures::{Parameters, ParametersKind};
use crate::types::tuple::{TupleSpec, TupleType, walk_tuple_type};
use crate::types::visitor::{
TypeCollector, TypeVisitor, any_over_type, walk_type_with_recursion_guard,
};
use crate::types::{
ApplyTypeMappingVisitor, BindingContext, BoundTypeVarIdentity, BoundTypeVarInstance,
ClassLiteral, FindLegacyTypeVarsVisitor, HasRelationToVisitor, IsDisjointVisitor,
IsEquivalentVisitor, KnownClass, KnownInstanceType, MaterializationKind, NormalizedVisitor,
Type, TypeContext, TypeMapping, TypeRelation, TypeVarBoundOrConstraints, TypeVarIdentity,
CallableSignature, CallableType, CallableTypeKind, CallableTypes, ClassLiteral,
FindLegacyTypeVarsVisitor, HasRelationToVisitor, IsDisjointVisitor, IsEquivalentVisitor,
KnownClass, KnownInstanceType, MaterializationKind, NormalizedVisitor, Signature, Type,
TypeContext, TypeMapping, TypeRelation, TypeVarBoundOrConstraints, TypeVarIdentity,
TypeVarInstance, TypeVarKind, TypeVarVariance, UnionType, declaration_type,
walk_bound_type_var_type,
};
@ -349,6 +350,21 @@ impl<'db> GenericContext<'db> {
self.variables_inner(db).values().copied()
}
/// Returns `true` if this generic context contains exactly one `ParamSpec` and no other type
/// variables.
///
/// For example:
/// ```py
/// class Foo[**P]: ... # true
/// class Bar[T, **P]: ... # false
/// class Baz[T]: ... # false
/// ```
pub(crate) fn exactly_one_paramspec(self, db: &'db dyn Db) -> bool {
self.variables(db)
.exactly_one()
.is_ok_and(|bound_typevar| bound_typevar.is_paramspec(db))
}
fn variable_from_type_param(
db: &'db dyn Db,
index: &'db SemanticIndex<'db>,
@ -365,8 +381,16 @@ impl<'db> GenericContext<'db> {
};
Some(typevar.with_binding_context(db, binding_context))
}
// TODO: Support these!
ast::TypeParam::ParamSpec(_) => None,
ast::TypeParam::ParamSpec(node) => {
let definition = index.expect_single_definition(node);
let Type::KnownInstance(KnownInstanceType::TypeVar(typevar)) =
declaration_type(db, definition).inner_type()
else {
return None;
};
Some(typevar.with_binding_context(db, binding_context))
}
// TODO: Support this!
ast::TypeParam::TypeVarTuple(_) => None,
}
}
@ -580,7 +604,15 @@ impl<'db> GenericContext<'db> {
//
// If there is a mapping for `T`, we want to map `U` to that type, not to `T`. To handle
// this, we repeatedly apply the specialization to itself, until we reach a fixed point.
let mut expanded = vec![Type::unknown(); types.len()];
let mut expanded = Vec::with_capacity(types.len());
for typevar in variables.clone() {
if typevar.is_paramspec(db) {
expanded.push(Type::paramspec_value_callable(db, Parameters::unknown()));
} else {
expanded.push(Type::unknown());
}
}
for (idx, (ty, typevar)) in types.zip(variables).enumerate() {
if let Some(ty) = ty {
expanded[idx] = ty;
@ -1419,6 +1451,15 @@ impl<'db> SpecializationBuilder<'db> {
match self.types.entry(identity) {
Entry::Occupied(mut entry) => {
// TODO: The spec says that when a ParamSpec is used multiple times in a signature,
// the type checker can solve it to a common behavioral supertype. We don't
// implement that yet so in case there are multiple ParamSpecs, use the
// specialization from the first occurrence.
// https://github.com/astral-sh/ty/issues/1778
// https://github.com/astral-sh/ruff/pull/21445#discussion_r2591510145
if bound_typevar.is_paramspec(self.db) {
return;
}
*entry.get_mut() = UnionType::from_elements(self.db, [*entry.get(), ty]);
}
Entry::Vacant(entry) => {

View File

@ -1,5 +1,6 @@
use std::collections::HashMap;
use crate::FxIndexSet;
use crate::place::builtins_module_scope;
use crate::semantic_index::definition::Definition;
use crate::semantic_index::definition::DefinitionKind;
@ -24,8 +25,9 @@ use resolve_definition::{find_symbol_in_scope, resolve_definition};
pub fn definition_for_name<'db>(
model: &SemanticModel<'db>,
name: &ast::ExprName,
alias_resolution: ImportAliasResolution,
) -> Option<Definition<'db>> {
let definitions = definitions_for_name(model, name.id.as_str(), name.into());
let definitions = definitions_for_name(model, name.id.as_str(), name.into(), alias_resolution);
// Find the first valid definition and return its kind
for declaration in definitions {
@ -43,6 +45,7 @@ pub fn definitions_for_name<'db>(
model: &SemanticModel<'db>,
name_str: &str,
node: AnyNodeRef<'_>,
alias_resolution: ImportAliasResolution,
) -> Vec<ResolvedDefinition<'db>> {
let db = model.db();
let file = model.file();
@ -53,7 +56,7 @@ pub fn definitions_for_name<'db>(
return vec![];
};
let mut all_definitions = Vec::new();
let mut all_definitions = FxIndexSet::default();
// Search through the scope hierarchy: start from the current scope and
// traverse up through parent scopes to find definitions
@ -89,13 +92,13 @@ pub fn definitions_for_name<'db>(
for binding in global_bindings {
if let Some(def) = binding.binding.definition() {
all_definitions.push(def);
all_definitions.insert(def);
}
}
for declaration in global_declarations {
if let Some(def) = declaration.declaration.definition() {
all_definitions.push(def);
all_definitions.insert(def);
}
}
}
@ -116,13 +119,13 @@ pub fn definitions_for_name<'db>(
for binding in bindings {
if let Some(def) = binding.binding.definition() {
all_definitions.push(def);
all_definitions.insert(def);
}
}
for declaration in declarations {
if let Some(def) = declaration.declaration.definition() {
all_definitions.push(def);
all_definitions.insert(def);
}
}
@ -136,21 +139,14 @@ pub fn definitions_for_name<'db>(
let mut resolved_definitions = Vec::new();
for definition in &all_definitions {
let resolved = resolve_definition(
db,
*definition,
Some(name_str),
ImportAliasResolution::ResolveAliases,
);
let resolved = resolve_definition(db, *definition, Some(name_str), alias_resolution);
resolved_definitions.extend(resolved);
}
// If we didn't find any definitions in scopes, fallback to builtins
if resolved_definitions.is_empty() {
let Some(builtins_scope) = builtins_module_scope(db) else {
return resolved_definitions;
};
if resolved_definitions.is_empty()
&& let Some(builtins_scope) = builtins_module_scope(db)
{
// Special cases for `float` and `complex` in type annotation positions.
// We don't know whether we're in a type annotation position, so we'll just ask `Name`'s type,
// which resolves to `int | float` or `int | float | complex` if `float` or `complex` is used in
@ -932,6 +928,12 @@ mod resolve_definition {
let module = parsed_module(db, file).load(db);
let alias = import_def.alias(&module);
if alias.asname.is_some()
&& alias_resolution == ImportAliasResolution::PreserveAliases
{
return vec![ResolvedDefinition::Definition(definition)];
}
// Get the full module name being imported
let Some(module_name) = ModuleName::new(&alias.name) else {
return Vec::new(); // Invalid module name, return empty list
@ -955,7 +957,13 @@ mod resolve_definition {
let file = definition.file(db);
let module = parsed_module(db, file).load(db);
let import_node = import_from_def.import(&module);
let name = &import_from_def.alias(&module).name;
let alias = import_from_def.alias(&module);
if alias.asname.is_some()
&& alias_resolution == ImportAliasResolution::PreserveAliases
{
return vec![ResolvedDefinition::Definition(definition)];
}
// For `ImportFrom`, we need to resolve the original imported symbol name
// (alias.name), not the local alias (symbol_name)
@ -963,7 +971,7 @@ mod resolve_definition {
db,
file,
import_node,
name,
&alias.name,
visited,
alias_resolution,
)

View File

@ -56,17 +56,17 @@ use crate::types::class::{CodeGeneratorKind, FieldKind, MetaclassErrorKind, Meth
use crate::types::context::{InNoTypeCheck, InferContext};
use crate::types::cyclic::CycleDetector;
use crate::types::diagnostic::{
CALL_NON_CALLABLE, CONFLICTING_DECLARATIONS, CONFLICTING_METACLASS, CYCLIC_CLASS_DEFINITION,
CYCLIC_TYPE_ALIAS_DEFINITION, DIVISION_BY_ZERO, DUPLICATE_KW_ONLY, INCONSISTENT_MRO,
INVALID_ARGUMENT_TYPE, INVALID_ASSIGNMENT, INVALID_ATTRIBUTE_ACCESS, INVALID_BASE,
INVALID_DECLARATION, INVALID_GENERIC_CLASS, INVALID_KEY, INVALID_LEGACY_TYPE_VARIABLE,
INVALID_METACLASS, INVALID_NAMED_TUPLE, INVALID_NEWTYPE, INVALID_OVERLOAD,
INVALID_PARAMETER_DEFAULT, INVALID_PARAMSPEC, INVALID_PROTOCOL, INVALID_TYPE_ARGUMENTS,
INVALID_TYPE_FORM, INVALID_TYPE_GUARD_CALL, INVALID_TYPE_VARIABLE_CONSTRAINTS,
IncompatibleBases, NON_SUBSCRIPTABLE, POSSIBLY_MISSING_ATTRIBUTE,
POSSIBLY_MISSING_IMPLICIT_CALL, POSSIBLY_MISSING_IMPORT, SUBCLASS_OF_FINAL_CLASS,
UNDEFINED_REVEAL, UNRESOLVED_ATTRIBUTE, UNRESOLVED_GLOBAL, UNRESOLVED_IMPORT,
UNRESOLVED_REFERENCE, UNSUPPORTED_OPERATOR, USELESS_OVERLOAD_BODY,
self, CALL_NON_CALLABLE, CONFLICTING_DECLARATIONS, CONFLICTING_METACLASS,
CYCLIC_CLASS_DEFINITION, CYCLIC_TYPE_ALIAS_DEFINITION, DIVISION_BY_ZERO, DUPLICATE_KW_ONLY,
INCONSISTENT_MRO, INVALID_ARGUMENT_TYPE, INVALID_ASSIGNMENT, INVALID_ATTRIBUTE_ACCESS,
INVALID_BASE, INVALID_DECLARATION, INVALID_GENERIC_CLASS, INVALID_KEY,
INVALID_LEGACY_TYPE_VARIABLE, INVALID_METACLASS, INVALID_NAMED_TUPLE, INVALID_NEWTYPE,
INVALID_OVERLOAD, INVALID_PARAMETER_DEFAULT, INVALID_PARAMSPEC, INVALID_PROTOCOL,
INVALID_TYPE_ARGUMENTS, INVALID_TYPE_FORM, INVALID_TYPE_GUARD_CALL,
INVALID_TYPE_VARIABLE_CONSTRAINTS, IncompatibleBases, NON_SUBSCRIPTABLE,
POSSIBLY_MISSING_ATTRIBUTE, POSSIBLY_MISSING_IMPLICIT_CALL, POSSIBLY_MISSING_IMPORT,
SUBCLASS_OF_FINAL_CLASS, UNDEFINED_REVEAL, UNRESOLVED_ATTRIBUTE, UNRESOLVED_GLOBAL,
UNRESOLVED_IMPORT, UNRESOLVED_REFERENCE, UNSUPPORTED_OPERATOR, USELESS_OVERLOAD_BODY,
hint_if_stdlib_attribute_exists_on_other_versions,
hint_if_stdlib_submodule_exists_on_other_versions, report_attempted_protocol_instantiation,
report_bad_dunder_set_call, report_cannot_pop_required_field_on_typed_dict,
@ -94,7 +94,6 @@ use crate::types::infer::nearest_enclosing_function;
use crate::types::instance::SliceLiteral;
use crate::types::mro::MroErrorKind;
use crate::types::newtype::NewType;
use crate::types::signatures::{Parameter, Parameters, Signature};
use crate::types::subclass_of::SubclassOfInner;
use crate::types::tuple::{Tuple, TupleLength, TupleSpec, TupleType};
use crate::types::typed_dict::{
@ -103,16 +102,17 @@ use crate::types::typed_dict::{
};
use crate::types::visitor::any_over_type;
use crate::types::{
BoundTypeVarInstance, CallDunderError, CallableBinding, CallableType, CallableTypes,
BoundTypeVarInstance, CallDunderError, CallableBinding, CallableType, CallableTypeKind,
ClassLiteral, ClassType, DataclassParams, DynamicType, InternedType, IntersectionBuilder,
IntersectionType, KnownClass, KnownInstanceType, LintDiagnosticGuard, MemberLookupPolicy,
MetaclassCandidate, PEP695TypeAliasType, ParameterForm, SpecialFormType, SubclassOfType,
TrackedConstraintSet, Truthiness, Type, TypeAliasType, TypeAndQualifiers, TypeContext,
TypeQualifiers, TypeVarBoundOrConstraints, TypeVarBoundOrConstraintsEvaluation,
TypeVarDefaultEvaluation, TypeVarIdentity, TypeVarInstance, TypeVarKind, TypeVarVariance,
TypedDictType, UnionBuilder, UnionType, UnionTypeInstance, binding_type, infer_scope_types,
overrides, todo_type,
MetaclassCandidate, PEP695TypeAliasType, ParamSpecAttrKind, Parameter, ParameterForm,
Parameters, Signature, SpecialFormType, SubclassOfType, TrackedConstraintSet, Truthiness, Type,
TypeAliasType, TypeAndQualifiers, TypeContext, TypeQualifiers, TypeVarBoundOrConstraints,
TypeVarBoundOrConstraintsEvaluation, TypeVarDefaultEvaluation, TypeVarIdentity,
TypeVarInstance, TypeVarKind, TypeVarVariance, TypedDictType, UnionBuilder, UnionType,
UnionTypeInstance, binding_type, infer_scope_types, todo_type,
};
use crate::types::{CallableTypes, overrides};
use crate::types::{ClassBase, add_inferred_python_version_hint_to_diagnostic};
use crate::unpack::{EvaluationMode, UnpackPosition};
use crate::{Db, FxIndexSet, FxOrderSet, Program};
@ -2347,7 +2347,7 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> {
Type::Callable(callable) => Some(Type::Callable(CallableType::new(
db,
callable.signatures(db),
true,
CallableTypeKind::FunctionLike,
))),
Type::Union(union) => union
.try_map(db, |element| into_function_like_callable(db, *element)),
@ -2612,7 +2612,41 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> {
todo_type!("PEP 646")
} else {
let annotated_type = self.file_expression_type(annotation);
Type::homogeneous_tuple(self.db(), annotated_type)
if let Type::TypeVar(typevar) = annotated_type
&& typevar.is_paramspec(self.db())
{
match typevar.paramspec_attr(self.db()) {
// `*args: P.args`
Some(ParamSpecAttrKind::Args) => annotated_type,
// `*args: P.kwargs`
Some(ParamSpecAttrKind::Kwargs) => {
// TODO: Should this diagnostic be raised as part of
// `ArgumentTypeChecker`?
if let Some(builder) =
self.context.report_lint(&INVALID_TYPE_FORM, annotation)
{
let name = typevar.name(self.db());
let mut diag = builder.into_diagnostic(format_args!(
"`{name}.kwargs` is valid only in `**kwargs` annotation",
));
diag.set_primary_message(format_args!(
"Did you mean `{name}.args`?"
));
diagnostic::add_type_expression_reference_link(diag);
}
Type::homogeneous_tuple(self.db(), Type::unknown())
}
// `*args: P`
None => {
// The diagnostic for this case is handled in `in_type_expression`.
Type::homogeneous_tuple(self.db(), Type::unknown())
}
}
} else {
Type::homogeneous_tuple(self.db(), annotated_type)
}
};
self.add_declaration_with_binding(
@ -2695,7 +2729,7 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> {
typing_self(db, self.scope(), Some(method_definition), class_literal)
}
/// Set initial declared/inferred types for a `*args` variadic positional parameter.
/// Set initial declared/inferred types for a `**kwargs` keyword-variadic parameter.
///
/// The annotated type is implicitly wrapped in a string-keyed dictionary.
///
@ -2708,11 +2742,48 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> {
definition: Definition<'db>,
) {
if let Some(annotation) = parameter.annotation() {
let annotated_ty = self.file_expression_type(annotation);
let ty = KnownClass::Dict.to_specialized_instance(
self.db(),
[KnownClass::Str.to_instance(self.db()), annotated_ty],
);
let annotated_type = self.file_expression_type(annotation);
let ty = if let Type::TypeVar(typevar) = annotated_type
&& typevar.is_paramspec(self.db())
{
match typevar.paramspec_attr(self.db()) {
// `**kwargs: P.args`
Some(ParamSpecAttrKind::Args) => {
// TODO: Should this diagnostic be raised as part of `ArgumentTypeChecker`?
if let Some(builder) =
self.context.report_lint(&INVALID_TYPE_FORM, annotation)
{
let name = typevar.name(self.db());
let mut diag = builder.into_diagnostic(format_args!(
"`{name}.args` is valid only in `*args` annotation",
));
diag.set_primary_message(format_args!("Did you mean `{name}.kwargs`?"));
diagnostic::add_type_expression_reference_link(diag);
}
KnownClass::Dict.to_specialized_instance(
self.db(),
[KnownClass::Str.to_instance(self.db()), Type::unknown()],
)
}
// `**kwargs: P.kwargs`
Some(ParamSpecAttrKind::Kwargs) => annotated_type,
// `**kwargs: P`
None => {
// The diagnostic for this case is handled in `in_type_expression`.
KnownClass::Dict.to_specialized_instance(
self.db(),
[KnownClass::Str.to_instance(self.db()), Type::unknown()],
)
}
}
} else {
KnownClass::Dict.to_specialized_instance(
self.db(),
[KnownClass::Str.to_instance(self.db()), annotated_type],
)
};
self.add_declaration_with_binding(
parameter.into(),
definition,
@ -3337,20 +3408,81 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> {
};
let previous_deferred_state =
std::mem::replace(&mut self.deferred_state, DeferredExpressionState::Deferred);
let default_ty = self.infer_paramspec_default(default);
self.store_expression_type(default, default_ty);
self.infer_paramspec_default(default);
self.deferred_state = previous_deferred_state;
}
fn infer_paramspec_default(&mut self, default: &ast::Expr) -> Type<'db> {
// This is the same logic as `TypeInferenceBuilder::infer_callable_parameter_types` except
// for the subscript branch which is required for `Concatenate` but that cannot be
// specified in this context.
match default {
ast::Expr::EllipsisLiteral(_) => {
Type::single_callable(self.db(), Signature::new(Parameters::gradual_form(), None))
fn infer_paramspec_default(&mut self, default_expr: &ast::Expr) {
match default_expr {
ast::Expr::EllipsisLiteral(ellipsis) => {
let ty = self.infer_ellipsis_literal_expression(ellipsis);
self.store_expression_type(default_expr, ty);
return;
}
ast::Expr::List(ast::ExprList { elts, .. }) => {
let types = elts
.iter()
.map(|elt| self.infer_type_expression(elt))
.collect::<Vec<_>>();
// N.B. We cannot represent a heterogeneous list of types in our type system, so we
// use a heterogeneous tuple type to represent the list of types instead.
self.store_expression_type(
default_expr,
Type::heterogeneous_tuple(self.db(), types),
);
return;
}
ast::Expr::Name(_) => {
let ty = self.infer_type_expression(default_expr);
let is_paramspec = match ty {
Type::TypeVar(typevar) => typevar.is_paramspec(self.db()),
Type::KnownInstance(known_instance) => {
known_instance.class(self.db()) == KnownClass::ParamSpec
}
_ => false,
};
if is_paramspec {
return;
}
}
_ => {}
}
if let Some(builder) = self.context.report_lint(&INVALID_PARAMSPEC, default_expr) {
builder.into_diagnostic(
"The default value to `ParamSpec` must be either \
a list of types, `ParamSpec`, or `...`",
);
}
}
/// Infer the type of the expression that represents an explicit specialization of a
/// `ParamSpec` type variable.
fn infer_paramspec_explicit_specialization_value(
&mut self,
expr: &ast::Expr,
exactly_one_paramspec: bool,
) -> Result<Type<'db>, ()> {
let db = self.db();
match expr {
ast::Expr::EllipsisLiteral(_) => {
return Ok(Type::paramspec_value_callable(
db,
Parameters::gradual_form(),
));
}
ast::Expr::Tuple(ast::ExprTuple { elts, .. })
| ast::Expr::List(ast::ExprList { elts, .. }) => {
// This should be taken care of by the caller.
if expr.is_tuple_expr() {
assert!(
exactly_one_paramspec,
"Inferring ParamSpec value during explicit specialization for a \
tuple expression should only happen when it contains exactly one ParamSpec"
);
}
let mut parameter_types = Vec::with_capacity(elts.len());
// Whether to infer `Todo` for the parameters
@ -3379,41 +3511,109 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> {
)
};
Type::single_callable(self.db(), Signature::new(parameters, None))
return Ok(Type::paramspec_value_callable(db, parameters));
}
ast::Expr::Name(name) => {
let name_ty = self.infer_name_load(name);
let is_paramspec = match name_ty {
Type::KnownInstance(known_instance) => {
known_instance.class(self.db()) == KnownClass::ParamSpec
ast::Expr::Subscript(_) => {
// TODO: Support `Concatenate[...]`
return Ok(Type::paramspec_value_callable(db, Parameters::todo()));
}
ast::Expr::Name(_) => {
let param_type = self.infer_type_expression(expr);
match param_type {
Type::TypeVar(typevar) if typevar.is_paramspec(db) => {
return Ok(param_type);
}
Type::NominalInstance(nominal) => {
nominal.has_known_class(self.db(), KnownClass::ParamSpec)
Type::KnownInstance(known_instance)
if known_instance.class(self.db()) == KnownClass::ParamSpec =>
{
// TODO: Emit diagnostic: "ParamSpec "P" is unbound"
return Err(());
}
_ => false,
};
if is_paramspec {
name_ty
} else {
if let Some(builder) = self.context.report_lint(&INVALID_PARAMSPEC, default) {
builder.into_diagnostic(
"The default value to `ParamSpec` must be either a list of types, \
`ParamSpec`, or `...`",
);
// This is to handle the following case:
//
// ```python
// from typing import ParamSpec
//
// class Foo[**P]: ...
//
// Foo[ParamSpec] # P: (ParamSpec, /)
// ```
Type::NominalInstance(nominal)
if nominal.has_known_class(self.db(), KnownClass::ParamSpec) =>
{
return Ok(Type::paramspec_value_callable(
db,
Parameters::new(
self.db(),
[
Parameter::positional_only(None)
.with_annotated_type(param_type),
],
),
));
}
Type::unknown()
_ if exactly_one_paramspec => {
// Square brackets are optional when `ParamSpec` is the only type variable
// being specialized. This means that a single name expression represents a
// parameter list with a single parameter. For example,
//
// ```python
// class OnlyParamSpec[**P]: ...
//
// OnlyParamSpec[int] # P: (int, /)
// ```
let parameters =
if param_type.is_todo() {
Parameters::todo()
} else {
Parameters::new(
self.db(),
[Parameter::positional_only(None)
.with_annotated_type(param_type)],
)
};
return Ok(Type::paramspec_value_callable(db, parameters));
}
// This is specifically to handle a case where there are more than one type
// variables and at least one of them is a `ParamSpec` which is specialized
// using `typing.Any`. This isn't explicitly allowed in the spec, but both mypy
// and Pyright allows this and the ecosystem report suggested there are usages
// of this in the wild e.g., `staticmethod[Any, Any]`. For example,
//
// ```python
// class Foo[**P, T]: ...
//
// Foo[Any, int] # P: (Any, /), T: int
// ```
Type::Dynamic(DynamicType::Any) => {
return Ok(Type::paramspec_value_callable(
db,
Parameters::gradual_form(),
));
}
_ => {}
}
}
_ => {
if let Some(builder) = self.context.report_lint(&INVALID_PARAMSPEC, default) {
builder.into_diagnostic(
"The default value to `ParamSpec` must be either a list of types, \
`ParamSpec`, or `...`",
);
}
Type::unknown()
}
_ => {}
}
if let Some(builder) = self.context.report_lint(&INVALID_TYPE_ARGUMENTS, expr) {
builder.into_diagnostic(
"Type argument for `ParamSpec` must be either \
a list of types, `ParamSpec`, `Concatenate`, or `...`",
);
}
Err(())
}
fn infer_typevartuple_definition(
@ -9121,10 +9321,23 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> {
let ast::ExprAttribute { value, attr, .. } = attribute;
let value_type = self.infer_maybe_standalone_expression(value, TypeContext::default());
let mut value_type = self.infer_maybe_standalone_expression(value, TypeContext::default());
let db = self.db();
let mut constraint_keys = vec![];
if let Type::KnownInstance(KnownInstanceType::TypeVar(typevar)) = value_type
&& typevar.is_paramspec(db)
&& let Some(bound_typevar) = bind_typevar(
db,
self.index,
self.scope().file_scope_id(db),
self.typevar_binding_context,
typevar,
)
{
value_type = Type::TypeVar(bound_typevar);
}
let mut assigned_type = None;
if let Some(place_expr) = PlaceExpr::try_from_expr(attribute) {
let (resolved, keys) = self.infer_place_load(
@ -11176,7 +11389,7 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> {
std::slice::from_ref(&*subscript.slice)
};
// TODO: Remove this once we support ParamSpec and Concatenate properly. This is necessary
// TODO: Remove this once we support Concatenate properly. This is necessary
// to avoid a lot of false positives downstream, because we can't represent the typevar-
// specialized `Callable` types yet.
let num_arguments = arguments.len();
@ -11184,27 +11397,7 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> {
let first_arg = &arguments[0];
let second_arg = &arguments[1];
if first_arg.is_name_expr() {
let first_arg_ty = self.infer_expression(first_arg, TypeContext::default());
if let Type::KnownInstance(KnownInstanceType::TypeVar(typevar)) =
first_arg_ty
&& typevar.kind(self.db()).is_paramspec()
{
return todo_type!("Callable[..] specialized with ParamSpec");
}
if let Some(builder) =
self.context.report_lint(&INVALID_TYPE_FORM, subscript)
{
builder.into_diagnostic(format_args!(
"The first argument to `Callable` must be either a list of types, \
ParamSpec, Concatenate, or `...`",
));
}
return Type::KnownInstance(KnownInstanceType::Callable(
CallableType::unknown(self.db()),
));
} else if first_arg.is_subscript_expr() {
if first_arg.is_subscript_expr() {
let first_arg_ty = self.infer_expression(first_arg, TypeContext::default());
if let Type::Dynamic(DynamicType::UnknownGeneric(generic_context)) =
first_arg_ty
@ -11436,22 +11629,18 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> {
let db = self.db();
let slice_node = subscript.slice.as_ref();
// Extract type arguments from the subscript
let type_arguments: Vec<Type<'db>> = match slice_node {
let exactly_one_paramspec = generic_context.exactly_one_paramspec(db);
let (type_arguments, store_inferred_type_arguments) = match slice_node {
ast::Expr::Tuple(tuple) => {
let types: Vec<_> = tuple
.elts
.iter()
.map(|elt| self.infer_type_expression(elt))
.collect();
self.store_expression_type(
slice_node,
Type::heterogeneous_tuple(db, types.iter().copied()),
);
types
if exactly_one_paramspec {
(std::slice::from_ref(slice_node), false)
} else {
(tuple.elts.as_slice(), true)
}
}
_ => vec![self.infer_type_expression(slice_node)],
_ => (std::slice::from_ref(slice_node), false),
};
let mut inferred_type_arguments = Vec::with_capacity(type_arguments.len());
let typevars = generic_context.variables(db);
let typevars_len = typevars.len();
@ -11464,7 +11653,7 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> {
// Helper to get the AST node corresponding to the type argument at `index`.
let get_node = |index: usize| -> ast::AnyNodeRef<'_> {
match slice_node {
ast::Expr::Tuple(ast::ExprTuple { elts, .. }) => elts
ast::Expr::Tuple(ast::ExprTuple { elts, .. }) if !exactly_one_paramspec => elts
.get(index)
.expect("type argument index should not be out of range")
.into(),
@ -11476,10 +11665,28 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> {
for (index, item) in typevars.zip_longest(type_arguments.iter()).enumerate() {
match item {
EitherOrBoth::Both(typevar, &provided_type) => {
EitherOrBoth::Both(typevar, expr) => {
if typevar.default_type(db).is_some() {
typevar_with_defaults += 1;
}
let provided_type = if typevar.is_paramspec(db) {
match self.infer_paramspec_explicit_specialization_value(
expr,
exactly_one_paramspec,
) {
Ok(paramspec_value) => paramspec_value,
Err(()) => {
has_error = true;
Type::unknown()
}
}
} else {
self.infer_type_expression(expr)
};
inferred_type_arguments.push(provided_type);
// TODO consider just accepting the given specialization without checking
// against bounds/constraints, but recording the expression for deferred
// checking at end of scope. This would avoid a lot of cycles caused by eagerly
@ -11543,17 +11750,20 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> {
}
None => {}
}
specialization_types.push(Some(provided_type));
}
EitherOrBoth::Left(typevar) => {
if typevar.default_type(db).is_none() {
// This is an error case, so no need to push into the specialization types.
missing_typevars.push(typevar);
} else {
typevar_with_defaults += 1;
specialization_types.push(None);
}
specialization_types.push(None);
}
EitherOrBoth::Right(_) => {
EitherOrBoth::Right(expr) => {
inferred_type_arguments.push(self.infer_type_expression(expr));
first_excess_type_argument_index.get_or_insert(index);
}
}
@ -11605,10 +11815,23 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> {
has_error = true;
}
if store_inferred_type_arguments {
self.store_expression_type(
slice_node,
Type::heterogeneous_tuple(db, inferred_type_arguments),
);
}
if has_error {
let unknowns = generic_context
.variables(self.db())
.map(|_| Some(Type::unknown()))
.map(|typevar| {
Some(if typevar.is_paramspec(db) {
Type::paramspec_value_callable(db, Parameters::unknown())
} else {
Type::unknown()
})
})
.collect::<Vec<_>>();
return specialize(&unknowns);
}
@ -12044,10 +12267,9 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> {
Type::Dynamic(
DynamicType::TodoUnpack | DynamicType::TodoStarredExpression,
) => true,
Type::NominalInstance(nominal) => matches!(
nominal.known_class(self.db()),
Some(KnownClass::TypeVarTuple | KnownClass::ParamSpec)
),
Type::NominalInstance(nominal) => {
nominal.has_known_class(self.db(), KnownClass::TypeVarTuple)
}
_ => false,
},
true,

View File

@ -190,12 +190,16 @@ impl<'db> TypeInferenceBuilder<'db, '_> {
}
ast::Expr::Attribute(attribute) => match attribute.ctx {
ast::ExprContext::Load => infer_name_or_attribute(
self.infer_attribute_expression(attribute),
annotation,
self,
pep_613_policy,
),
ast::ExprContext::Load => {
let attribute_type = self.infer_attribute_expression(attribute);
if let Type::TypeVar(typevar) = attribute_type
&& typevar.paramspec_attr(self.db()).is_some()
{
TypeAndQualifiers::declared(attribute_type)
} else {
infer_name_or_attribute(attribute_type, annotation, self, pep_613_policy)
}
}
ast::ExprContext::Invalid => TypeAndQualifiers::declared(Type::unknown()),
ast::ExprContext::Store | ast::ExprContext::Del => TypeAndQualifiers::declared(
todo_type!("Attribute expression annotation in Store/Del context"),

View File

@ -3,19 +3,21 @@ use ruff_python_ast as ast;
use super::{DeferredExpressionState, TypeInferenceBuilder};
use crate::FxOrderSet;
use crate::semantic_index::semantic_index;
use crate::types::diagnostic::{
self, INVALID_TYPE_FORM, NON_SUBSCRIPTABLE, report_invalid_argument_number_to_special_form,
report_invalid_arguments_to_callable,
};
use crate::types::generics::bind_typevar;
use crate::types::infer::builder::InnerExpressionInferenceState;
use crate::types::signatures::{Parameter, Parameters, Signature};
use crate::types::signatures::Signature;
use crate::types::string_annotation::parse_string_annotation;
use crate::types::tuple::{TupleSpecBuilder, TupleType};
use crate::types::visitor::any_over_type;
use crate::types::{
BindingContext, CallableType, DynamicType, GenericContext, IntersectionBuilder, KnownClass,
KnownInstanceType, LintDiagnosticGuard, SpecialFormType, SubclassOfType, Type, TypeAliasType,
TypeContext, TypeIsType, TypeMapping, UnionBuilder, UnionType, todo_type,
KnownInstanceType, LintDiagnosticGuard, Parameter, Parameters, SpecialFormType, SubclassOfType,
Type, TypeAliasType, TypeContext, TypeIsType, TypeMapping, UnionBuilder, UnionType,
any_over_type, todo_type,
};
/// Type expressions
@ -821,7 +823,7 @@ impl<'db> TypeInferenceBuilder<'db, '_> {
)
}
fn infer_subscript_type_expression(
pub(super) fn infer_subscript_type_expression(
&mut self,
subscript: &ast::ExprSubscript,
value_ty: Type<'db>,
@ -1749,21 +1751,22 @@ impl<'db> TypeInferenceBuilder<'db, '_> {
// `Callable[]`.
return None;
}
if any_over_type(
self.db(),
self.infer_name_load(name),
&|ty| match ty {
Type::KnownInstance(known_instance) => {
known_instance.class(self.db()) == KnownClass::ParamSpec
}
Type::NominalInstance(nominal) => {
nominal.has_known_class(self.db(), KnownClass::ParamSpec)
}
_ => false,
},
true,
) {
return Some(Parameters::todo());
let name_ty = self.infer_name_load(name);
if let Type::KnownInstance(KnownInstanceType::TypeVar(typevar)) = name_ty
&& typevar.is_paramspec(self.db())
{
let index = semantic_index(self.db(), self.scope().file(self.db()));
let Some(bound_typevar) = bind_typevar(
self.db(),
index,
self.scope().file_scope_id(self.db()),
self.typevar_binding_context,
typevar,
) else {
// TODO: What to do here?
return None;
};
return Some(Parameters::paramspec(self.db(), bound_typevar));
}
}
_ => {}

View File

@ -6,7 +6,7 @@ use itertools::Itertools;
use ruff_python_ast::name::Name;
use rustc_hash::FxHashMap;
use crate::types::TypeContext;
use crate::types::{CallableTypeKind, TypeContext};
use crate::{
Db, FxOrderSet,
place::{Definedness, Place, PlaceAndQualifiers, place_from_bindings, place_from_declarations},
@ -986,5 +986,9 @@ fn protocol_bind_self<'db>(
callable: CallableType<'db>,
self_type: Option<Type<'db>>,
) -> CallableType<'db> {
CallableType::new(db, callable.signatures(db).bind_self(db, self_type), false)
CallableType::new(
db,
callable.signatures(db).bind_self(db, self_type),
CallableTypeKind::Regular,
)
}

View File

@ -29,10 +29,10 @@ use crate::types::generics::{
};
use crate::types::infer::nearest_enclosing_class;
use crate::types::{
ApplyTypeMappingVisitor, BindingContext, BoundTypeVarInstance, ClassLiteral,
ApplyTypeMappingVisitor, BindingContext, BoundTypeVarInstance, CallableTypeKind, ClassLiteral,
FindLegacyTypeVarsVisitor, HasRelationToVisitor, IsDisjointVisitor, IsEquivalentVisitor,
KnownClass, MaterializationKind, NormalizedVisitor, TypeContext, TypeMapping, TypeRelation,
VarianceInferable, todo_type,
KnownClass, MaterializationKind, NormalizedVisitor, ParamSpecAttrKind, TypeContext,
TypeMapping, TypeRelation, VarianceInferable, todo_type,
};
use crate::{Db, FxOrderSet};
use ruff_python_ast::{self as ast, name::Name};
@ -151,6 +151,10 @@ impl<'db> CallableSignature<'db> {
self.overloads.iter()
}
pub(crate) fn as_slice(&self) -> &[Signature<'db>] {
&self.overloads
}
pub(crate) fn with_inherited_generic_context(
&self,
db: &'db dyn Db,
@ -197,6 +201,122 @@ impl<'db> CallableSignature<'db> {
tcx: TypeContext<'db>,
visitor: &ApplyTypeMappingVisitor<'db>,
) -> Self {
fn try_apply_type_mapping_for_paramspec<'db>(
db: &'db dyn Db,
self_signature: &Signature<'db>,
prefix_parameters: &[Parameter<'db>],
paramspec_value: Type<'db>,
type_mapping: &TypeMapping<'_, 'db>,
tcx: TypeContext<'db>,
visitor: &ApplyTypeMappingVisitor<'db>,
) -> Option<CallableSignature<'db>> {
match paramspec_value {
Type::TypeVar(typevar) if typevar.is_paramspec(db) => {
Some(CallableSignature::single(Signature {
generic_context: self_signature.generic_context.map(|context| {
type_mapping.update_signature_generic_context(db, context)
}),
definition: self_signature.definition,
parameters: Parameters::new(
db,
prefix_parameters
.iter()
.map(|param| {
param.apply_type_mapping_impl(db, type_mapping, tcx, visitor)
})
.chain([
Parameter::variadic(Name::new_static("args"))
.with_annotated_type(Type::TypeVar(
typevar
.with_paramspec_attr(db, ParamSpecAttrKind::Args),
)),
Parameter::keyword_variadic(Name::new_static("kwargs"))
.with_annotated_type(Type::TypeVar(
typevar
.with_paramspec_attr(db, ParamSpecAttrKind::Kwargs),
)),
]),
),
return_ty: self_signature
.return_ty
.map(|ty| ty.apply_type_mapping_impl(db, type_mapping, tcx, visitor)),
}))
}
Type::Callable(callable)
if matches!(callable.kind(db), CallableTypeKind::ParamSpecValue) =>
{
Some(CallableSignature::from_overloads(
callable.signatures(db).iter().map(|signature| Signature {
generic_context: self_signature.generic_context.map(|context| {
type_mapping.update_signature_generic_context(db, context)
}),
definition: signature.definition,
parameters: Parameters::new(
db,
prefix_parameters
.iter()
.map(|param| {
param.apply_type_mapping_impl(
db,
type_mapping,
tcx,
visitor,
)
})
.chain(signature.parameters().iter().cloned()),
),
return_ty: self_signature.return_ty.map(|ty| {
ty.apply_type_mapping_impl(db, type_mapping, tcx, visitor)
}),
}),
))
}
_ => None,
}
}
match type_mapping {
TypeMapping::Specialization(specialization) => {
if let [self_signature] = self.overloads.as_slice()
&& let Some((prefix_parameters, paramspec)) = self_signature
.parameters
.find_paramspec_from_args_kwargs(db)
&& let Some(paramspec_value) = specialization.get(db, paramspec)
&& let Some(result) = try_apply_type_mapping_for_paramspec(
db,
self_signature,
prefix_parameters,
paramspec_value,
type_mapping,
tcx,
visitor,
)
{
return result;
}
}
TypeMapping::PartialSpecialization(partial) => {
if let [self_signature] = self.overloads.as_slice()
&& let Some((prefix_parameters, paramspec)) = self_signature
.parameters
.find_paramspec_from_args_kwargs(db)
&& let Some(paramspec_value) = partial.get(db, paramspec)
&& let Some(result) = try_apply_type_mapping_for_paramspec(
db,
self_signature,
prefix_parameters,
paramspec_value,
type_mapping,
tcx,
visitor,
)
{
return result;
}
}
_ => {}
}
Self::from_overloads(
self.overloads
.iter()
@ -1343,15 +1463,18 @@ impl<'db> VarianceInferable<'db> for &Signature<'db> {
}
}
#[derive(Clone, Debug, PartialEq, Eq, Hash, salsa::Update, get_size2::GetSize)]
pub(crate) struct Parameters<'db> {
// TODO: use SmallVec here once invariance bug is fixed
value: Vec<Parameter<'db>>,
// TODO: the spec also allows signatures like `Concatenate[int, ...]` or `Concatenate[int, P]`,
// which have some number of required positional-only parameters followed by a gradual form or a
// `ParamSpec`. Our representation will need some adjustments to represent that.
/// Whether this parameter list represents a gradual form using `...` as the only parameter.
///
/// If this is `true`, the `value` will still contain the variadic and keyword-variadic
/// parameters.
/// The kind of parameter list represented.
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, Hash, salsa::Update, get_size2::GetSize)]
pub(crate) enum ParametersKind<'db> {
/// A standard parameter list.
#[default]
Standard,
/// Represents a gradual parameter list using `...` as the only parameter.
///
/// Per [the typing specification], any signature with a variadic and a keyword-variadic
/// argument, both annotated (explicitly or implicitly) as `Any` or `Unknown`, is considered
@ -1362,35 +1485,68 @@ pub(crate) struct Parameters<'db> {
///
/// Note: This flag can also result from invalid forms of `Callable` annotations.
///
/// TODO: the spec also allows signatures like `Concatenate[int, ...]`, which have some number
/// of required positional parameters followed by a gradual form. Our representation will need
/// some adjustments to represent that.
/// [the typing specification]: https://typing.python.org/en/latest/spec/callables.html#meaning-of-in-callable
Gradual,
/// Represents a parameter list containing a `ParamSpec` as the only parameter.
///
/// [the typing specification]: https://typing.python.org/en/latest/spec/callables.html#meaning-of-in-callable
is_gradual: bool,
/// Note that this is distinct from a parameter list _containing_ a `ParamSpec` which is
/// considered a standard parameter list that just contains a `ParamSpec`.
// TODO: Maybe we should use `find_paramspec_from_args_kwargs` instead of storing the typevar
// here?
ParamSpec(BoundTypeVarInstance<'db>),
}
#[derive(Clone, Debug, PartialEq, Eq, Hash, salsa::Update, get_size2::GetSize)]
pub(crate) struct Parameters<'db> {
// TODO: use SmallVec here once invariance bug is fixed
value: Vec<Parameter<'db>>,
kind: ParametersKind<'db>,
}
impl<'db> Parameters<'db> {
/// Create a new parameter list from an iterator of parameters.
///
/// The kind of the parameter list is determined based on the provided parameters.
/// Specifically, if the parameters is made up of `*args` and `**kwargs` only, it checks
/// their annotated types to determine if they represent a gradual form or a `ParamSpec`.
pub(crate) fn new(
_db: &'db dyn Db,
db: &'db dyn Db,
parameters: impl IntoIterator<Item = Parameter<'db>>,
) -> Self {
let value: Vec<Parameter<'db>> = parameters.into_iter().collect();
let is_gradual = value.len() == 2
&& value
.iter()
.any(|p| p.is_variadic() && p.annotated_type().is_none_or(|ty| ty.is_dynamic()))
&& value.iter().any(|p| {
p.is_keyword_variadic() && p.annotated_type().is_none_or(|ty| ty.is_dynamic())
});
Self { value, is_gradual }
let mut kind = ParametersKind::Standard;
if let [p1, p2] = value.as_slice()
&& p1.is_variadic()
&& p2.is_keyword_variadic()
{
match (p1.annotated_type(), p2.annotated_type()) {
(None | Some(Type::Dynamic(_)), None | Some(Type::Dynamic(_))) => {
kind = ParametersKind::Gradual;
}
(Some(Type::TypeVar(args_typevar)), Some(Type::TypeVar(kwargs_typevar))) => {
if let (Some(ParamSpecAttrKind::Args), Some(ParamSpecAttrKind::Kwargs)) = (
args_typevar.paramspec_attr(db),
kwargs_typevar.paramspec_attr(db),
) {
let typevar = args_typevar.without_paramspec_attr(db);
if typevar.is_same_typevar_as(db, kwargs_typevar.without_paramspec_attr(db))
{
kind = ParametersKind::ParamSpec(typevar);
}
}
}
_ => {}
}
}
Self { value, kind }
}
/// Create an empty parameter list.
pub(crate) fn empty() -> Self {
Self {
value: Vec::new(),
is_gradual: false,
kind: ParametersKind::Standard,
}
}
@ -1398,8 +1554,12 @@ impl<'db> Parameters<'db> {
self.value.as_slice()
}
pub(crate) const fn kind(&self) -> ParametersKind<'db> {
self.kind
}
pub(crate) const fn is_gradual(&self) -> bool {
self.is_gradual
matches!(self.kind, ParametersKind::Gradual)
}
/// Return todo parameters: (*args: Todo, **kwargs: Todo)
@ -1411,7 +1571,7 @@ impl<'db> Parameters<'db> {
Parameter::keyword_variadic(Name::new_static("kwargs"))
.with_annotated_type(todo_type!("todo signature **kwargs")),
],
is_gradual: true,
kind: ParametersKind::Gradual,
}
}
@ -1428,7 +1588,21 @@ impl<'db> Parameters<'db> {
Parameter::keyword_variadic(Name::new_static("kwargs"))
.with_annotated_type(Type::Dynamic(DynamicType::Any)),
],
is_gradual: true,
kind: ParametersKind::Gradual,
}
}
pub(crate) fn paramspec(db: &'db dyn Db, typevar: BoundTypeVarInstance<'db>) -> Self {
Self {
value: vec![
Parameter::variadic(Name::new_static("args")).with_annotated_type(Type::TypeVar(
typevar.with_paramspec_attr(db, ParamSpecAttrKind::Args),
)),
Parameter::keyword_variadic(Name::new_static("kwargs")).with_annotated_type(
Type::TypeVar(typevar.with_paramspec_attr(db, ParamSpecAttrKind::Kwargs)),
),
],
kind: ParametersKind::ParamSpec(typevar),
}
}
@ -1446,7 +1620,7 @@ impl<'db> Parameters<'db> {
Parameter::keyword_variadic(Name::new_static("kwargs"))
.with_annotated_type(Type::Dynamic(DynamicType::Unknown)),
],
is_gradual: true,
kind: ParametersKind::Gradual,
}
}
@ -1458,10 +1632,48 @@ impl<'db> Parameters<'db> {
Parameter::keyword_variadic(Name::new_static("kwargs"))
.with_annotated_type(Type::object()),
],
is_gradual: false,
kind: ParametersKind::Standard,
}
}
/// Returns the bound `ParamSpec` type variable if the parameters contain a `ParamSpec`.
pub(crate) fn find_paramspec_from_args_kwargs<'a>(
&'a self,
db: &'db dyn Db,
) -> Option<(&'a [Parameter<'db>], BoundTypeVarInstance<'db>)> {
let [prefix @ .., maybe_args, maybe_kwargs] = self.value.as_slice() else {
return None;
};
if !maybe_args.is_variadic() || !maybe_kwargs.is_keyword_variadic() {
return None;
}
let (Type::TypeVar(args_typevar), Type::TypeVar(kwargs_typevar)) =
(maybe_args.annotated_type()?, maybe_kwargs.annotated_type()?)
else {
return None;
};
if matches!(
(
args_typevar.paramspec_attr(db),
kwargs_typevar.paramspec_attr(db)
),
(
Some(ParamSpecAttrKind::Args),
Some(ParamSpecAttrKind::Kwargs)
)
) {
let typevar = args_typevar.without_paramspec_attr(db);
if typevar.is_same_typevar_as(db, kwargs_typevar.without_paramspec_attr(db)) {
return Some((prefix, typevar));
}
}
None
}
fn from_parameters(
db: &'db dyn Db,
definition: Definition<'db>,
@ -1649,13 +1861,13 @@ impl<'db> Parameters<'db> {
// Note that we've already flipped the materialization in Signature.apply_type_mapping_impl(),
// so the "top" materialization here is the bottom materialization of the whole Signature.
// It might make sense to flip the materialization here instead.
TypeMapping::Materialize(MaterializationKind::Top) if self.is_gradual => {
TypeMapping::Materialize(MaterializationKind::Top) if self.is_gradual() => {
Parameters::object()
}
// TODO: This is wrong, the empty Parameters is not a subtype of all materializations.
// The bottom materialization is not currently representable and implementing it
// properly requires extending the Parameters struct.
TypeMapping::Materialize(MaterializationKind::Bottom) if self.is_gradual => {
TypeMapping::Materialize(MaterializationKind::Bottom) if self.is_gradual() => {
Parameters::empty()
}
_ => Self {
@ -1664,7 +1876,7 @@ impl<'db> Parameters<'db> {
.iter()
.map(|param| param.apply_type_mapping_impl(db, type_mapping, tcx, visitor))
.collect(),
is_gradual: self.is_gradual,
kind: self.kind,
},
}
}

View File

@ -998,10 +998,22 @@ impl<'db> VariableLengthTuple<Type<'db>> {
relation_visitor,
disjointness_visitor,
),
EitherOrBoth::Right(_) => {
EitherOrBoth::Right(other_ty) => {
// The rhs has a required element that the lhs is not guaranteed to
// provide.
return ConstraintSet::from(false);
// provide, unless the lhs has a dynamic variable-length portion
// that can materialize to provide it (for assignability only),
// as in `tuple[Any, ...]` matching `tuple[int, int]`.
if !relation.is_assignability() || !self.variable.is_dynamic() {
return ConstraintSet::from(false);
}
self.variable.has_relation_to_impl(
db,
other_ty,
inferable,
relation,
relation_visitor,
disjointness_visitor,
)
}
};
if result
@ -1037,10 +1049,22 @@ impl<'db> VariableLengthTuple<Type<'db>> {
relation_visitor,
disjointness_visitor,
),
EitherOrBoth::Right(_) => {
EitherOrBoth::Right(other_ty) => {
// The rhs has a required element that the lhs is not guaranteed to
// provide.
return ConstraintSet::from(false);
// provide, unless the lhs has a dynamic variable-length portion
// that can materialize to provide it (for assignability only),
// as in `tuple[Any, ...]` matching `tuple[int, int]`.
if !relation.is_assignability() || !self.variable.is_dynamic() {
return ConstraintSet::from(false);
}
self.variable.has_relation_to_impl(
db,
*other_ty,
inferable,
relation,
relation_visitor,
disjointness_visitor,
)
}
};
if result

View File

@ -29,6 +29,7 @@ ERROR src/black/trans.py:544:10-23: `type[Err[CannotTransform] | Ok[TypeVar[T]]]
ERROR src/black/trans.py:752:55-68: `type[Err[CannotTransform] | Ok[TypeVar[T]]]` is not subscriptable [unsupported-operation]
ERROR src/black/trans.py:985:19-32: `type[Err[CannotTransform] | Ok[TypeVar[T]]]` is not subscriptable [unsupported-operation]
ERROR src/black/trans.py:1111:57-70: `type[Err[CannotTransform] | Ok[TypeVar[T]]]` is not subscriptable [unsupported-operation]
ERROR src/black/trans.py:1349:17-1350:27: `int` is not assignable to `int` (caused by inconsistent types when breaking cycles) [bad-assignment]
ERROR src/black/trans.py:1480:19-32: `type[Err[CannotTransform] | Ok[TypeVar[T]]]` is not subscriptable [unsupported-operation]
ERROR src/black/trans.py:1630:25-31: `csplit` may be uninitialized [unbound-name]
ERROR src/black/trans.py:2162:19-32: `type[Err[CannotTransform] | Ok[TypeVar[T]]]` is not subscriptable [unsupported-operation]
@ -42,4 +43,4 @@ ERROR src/blib2to3/pytree.py:670:24-34: `newcontent` may be uninitialized [unbou
ERROR src/blib2to3/pytree.py:756:24-39: `wrapped_content` may be uninitialized [unbound-name]
ERROR src/blib2to3/pytree.py:847:34-45: `save_stderr` may be uninitialized [unbound-name]
INFO Checking project configured at `<CWD>/pyrefly.toml`
INFO 43 errors (2 suppressed)
INFO 44 errors (2 suppressed)

View File

@ -1,6 +1,6 @@
src/black/__init__.py:989:13: warning[possibly-missing-attribute] Attribute `detach` may be missing on object of type `TextIOWrapper[_WrappedBuffer] | AnsiToWin32`
src/black/__init__.py:1378:23: warning[possibly-missing-attribute] Attribute `value` may be missing on object of type `Node | Leaf`
src/black/cache.py:144:59: error[invalid-assignment] Object of type `dict[str | Unknown, tuple[@Todo] | Unknown]` is not assignable to `dict[str, tuple[int | float, int, str]]`
src/black/cache.py:144:59: error[invalid-assignment] Object of type `dict[str | Unknown, tuple[@Todo(StarredExpression)] | Unknown]` is not assignable to `dict[str, tuple[int | float, int, str]]`
src/black/handle_ipynb_magics.py:106:10: error[unresolved-import] Cannot resolve imported module `tokenize_rt`
src/black/handle_ipynb_magics.py:130:10: error[unresolved-import] Cannot resolve imported module `tokenize_rt`
src/black/handle_ipynb_magics.py:171:10: error[unresolved-import] Cannot resolve imported module `IPython.core.inputtransformer2`
@ -18,9 +18,16 @@ src/black/linegen.py:1757:25: warning[possibly-missing-attribute] Attribute `val
src/black/linegen.py:1795:13: error[invalid-assignment] Object of type `Literal[""]` is not assignable to attribute `value` on type `Node | Leaf`
src/black/linegen.py:1796:13: error[invalid-assignment] Object of type `Literal[""]` is not assignable to attribute `value` on type `Node | Leaf`
src/black/nodes.py:746:32: warning[possibly-missing-attribute] Attribute `value` may be missing on object of type `Leaf | Node`
src/black/rusty.py:28:27: error[invalid-type-arguments] Type `typing.TypeVar` is not assignable to upper bound `Exception` of type variable `E@Err`
src/black/trans.py:297:20: error[invalid-raise] Cannot use object of type `object` as an exception cause
src/black/trans.py:306:24: error[invalid-raise] Cannot use object of type `object` as an exception cause
src/black/trans.py:466:20: error[invalid-return-type] Return type does not match returned value: expected `Ok[list[int]] | Err[CannotTransform]`, found `Ok[list[Unknown] & ~AlwaysFalsy]`
src/black/trans.py:481:47: error[invalid-argument-type] Argument to bound method `_merge_string_group` is incorrect: Expected `Line`, found `object`
src/black/trans.py:493:13: error[unresolved-attribute] Unresolved attribute `__cause__` on type `object`.
src/black/trans.py:494:13: error[invalid-assignment] Object of type `object` is not assignable to attribute `__cause__` of type `BaseException | None`
src/black/trans.py:980:20: error[invalid-return-type] Return type does not match returned value: expected `Ok[list[int]] | Err[CannotTransform]`, found `Ok[list[Unknown] & ~AlwaysFalsy]`
src/black/trans.py:1107:20: error[invalid-return-type] Return type does not match returned value: expected `Ok[list[int]] | Err[CannotTransform]`, found `(Ok[None] & Top[Err[Unknown]]) | Err[CannotTransform]`
src/blib2to3/pgen2/conv.py:35:6: error[unresolved-import] Cannot resolve imported module `pgen2`
src/blib2to3/pgen2/conv.py:77:34: warning[possibly-missing-attribute] Attribute `groups` may be missing on object of type `Match[str] | None`
src/blib2to3/pgen2/parse.py:367:13: warning[possibly-missing-attribute] Attribute `append` may be missing on object of type `list[Node | Leaf] | None`
src/blib2to3/pytree.py:149:13: error[unresolved-attribute] Unresolved attribute `parent` on type `object`.
Found 25 diagnostics
Found 32 diagnostics

View File

@ -1,7 +1,7 @@
ERROR discord/abc.py:123:9-15: Class member `PinnedMessage.pinned` overrides parent class `Message` in an inconsistent manner [bad-override]
ERROR discord/abc.py:474:28-29: Argument `dict[str, Any]` is not assignable to parameter `object` with type `TypedDict[ChannelPositionUpdate]` in function `list.append` [bad-argument-type]
ERROR discord/abc.py:578:44-81: Argument `list[TypedDict[PermissionOverwrite]] | list[@_] | object` is not assignable to parameter `iterable` with type `Iterable[str]` in function `enumerate.__new__` [bad-argument-type]
ERROR discord/abc.py:579:37-47: Argument `str` is not assignable to parameter `data` with type `TypedDict[PermissionOverwrite]` in function `_Overwrites.__init__` [bad-argument-type]
ERROR discord/abc.py:474:28-29: Argument `dict[str, Any]` is not assignable to parameter `object` with type `ChannelPositionUpdate` in function `list.append` [bad-argument-type]
ERROR discord/abc.py:578:44-81: Argument `list[PermissionOverwrite] | list[@_] | object` is not assignable to parameter `iterable` with type `Iterable[str]` in function `enumerate.__new__` [bad-argument-type]
ERROR discord/abc.py:579:37-47: Argument `str` is not assignable to parameter `data` with type `PermissionOverwrite` in function `_Overwrites.__init__` [bad-argument-type]
ERROR discord/abc.py:1031:72-81: Argument `int` is not assignable to parameter `type` with type `Literal[0, 1]` in function `discord.http.HTTPClient.edit_channel_permissions` [bad-argument-type]
ERROR discord/abc.py:1052:64-79: Argument `int` is not assignable to parameter `channel_type` with type `Literal[0, 1, 2, 3, 4, 5, 6, 10, 11, 12, 13, 15, 16]` in function `discord.http.HTTPClient.create_channel` [bad-argument-type]
ERROR discord/abc.py:1224:25-37: Object of class `NoneType` has no attribute `id` [missing-attribute]
@ -13,7 +13,7 @@ ERROR discord/activity.py:455:9-16: Class member `Game.to_dict` overrides parent
ERROR discord/activity.py:566:9-16: Class member `Streaming.to_dict` overrides parent class `BaseActivity` in an inconsistent manner [bad-override]
ERROR discord/activity.py:822:9-16: Class member `CustomActivity.to_dict` overrides parent class `BaseActivity` in an inconsistent manner [bad-override]
ERROR discord/activity.py:836:26-46: Cannot set item in `dict[str, int | str | None]` [unsupported-operation]
ERROR discord/app_commands/checks.py:390:64-71: Argument `((Interaction[Any]) -> Cooldown | None) | ((Interaction[Any]) -> Coroutine[Any, Any, Cooldown | None])` is not assignable to parameter with type `(Interaction[Any]) -> Awaitable[Cooldown] | Cooldown` in function `discord.utils.maybe_coroutine` [bad-argument-type]
ERROR discord/app_commands/checks.py:390:64-71: Argument `((Interaction[Any]) -> Cooldown | None) | ((Interaction[Any]) -> Coroutine[Any, Any, Cooldown | None])` is not assignable to parameter with type `(Interaction[Any]) -> MaybeAwaitable` in function `discord.utils.maybe_coroutine` [bad-argument-type]
ERROR discord/app_commands/commands.py:235:9-38: Object of class `FunctionType` has no attribute `pass_command_binding` [missing-attribute]
ERROR discord/app_commands/commands.py:393:29-76: Object of class `FunctionType` has no attribute `__discord_app_commands_param_description__` [missing-attribute]
ERROR discord/app_commands/commands.py:402:19-61: Object of class `FunctionType` has no attribute `__discord_app_commands_param_rename__` [missing-attribute]
@ -26,9 +26,10 @@ ERROR discord/app_commands/commands.py:2477:17-53: Object of class `FunctionType
ERROR discord/app_commands/commands.py:2479:13-49: Object of class `FunctionType` has no attribute `__discord_app_commands_checks__` [missing-attribute]
ERROR discord/app_commands/errors.py:483:27-33: `errors` may be uninitialized [unbound-name]
ERROR discord/app_commands/errors.py:484:72-78: `errors` may be uninitialized [unbound-name]
ERROR discord/app_commands/installs.py:113:16-22: Returned type `list[int]` is not assignable to declared return type `list[Literal[0, 1]]` [bad-return]
ERROR discord/app_commands/installs.py:213:16-22: Returned type `list[int]` is not assignable to declared return type `list[Literal[0, 1, 2]]` [bad-return]
ERROR discord/app_commands/installs.py:113:16-22: Returned type `list[int]` is not assignable to declared return type `list[InteractionInstallationType]` [bad-return]
ERROR discord/app_commands/installs.py:213:16-22: Returned type `list[int]` is not assignable to declared return type `list[InteractionContextType]` [bad-return]
ERROR discord/app_commands/models.py:217:89-112: Type `object` is not iterable [not-iterable]
ERROR discord/app_commands/models.py:250:16-261:10: Returned type `dict[str, dict[str, str] | int | list[_BooleanApplicationCommandOption | _ChannelApplicationCommandOptionChoice | _IntegerApplicationCommandOption | _NonChannelSnowflakeApplicationCommandOptionChoice | _NumberApplicationCommandOption | _StringApplicationCommandOption | _SubCommandCommandOption | _SubCommandGroupCommandOption] | list[int] | str | None]` is not assignable to declared return type `_ChatInputApplicationCommand | _GuildChatInputApplicationCommand | _GuildMessageApplicationCommand | _GuildUserApplicationCommand | _MessageApplicationCommand | _UserApplicationCommand` [bad-return]
ERROR discord/app_commands/models.py:370:57-89: Cannot set item in `dict[str, str]` [unsupported-operation]
ERROR discord/app_commands/models.py:372:57-61: Cannot set item in `dict[str, str]` [unsupported-operation]
ERROR discord/app_commands/models.py:375:40-53: Cannot set item in `dict[str, str]` [unsupported-operation]
@ -43,7 +44,9 @@ ERROR discord/app_commands/models.py:1061:42-64: `int | object | None` is not as
ERROR discord/app_commands/models.py:1062:35-66: `bool | object` is not assignable to attribute `autocomplete` with type `bool` [bad-assignment]
ERROR discord/app_commands/models.py:1063:84-113: Type `object` is not iterable [not-iterable]
ERROR discord/app_commands/models.py:1064:92-115: Type `object` is not iterable [not-iterable]
ERROR discord/app_commands/models.py:1069:16-1084:10: Returned type `dict[str, bool | dict[str, str] | float | int | list[dict[str, Any]] | list[int] | list[@_] | str | None]` is not assignable to declared return type `_BooleanApplicationCommandOption | _ChannelApplicationCommandOptionChoice | _IntegerApplicationCommandOption | _NonChannelSnowflakeApplicationCommandOptionChoice | _NumberApplicationCommandOption | _StringApplicationCommandOption | _SubCommandCommandOption | _SubCommandGroupCommandOption` [bad-return]
ERROR discord/app_commands/models.py:1162:89-112: Type `object` is not iterable [not-iterable]
ERROR discord/app_commands/models.py:1168:16-1175:10: Returned type `dict[str, dict[str, str] | int | list[_BooleanApplicationCommandOption | _ChannelApplicationCommandOptionChoice | _IntegerApplicationCommandOption | _NonChannelSnowflakeApplicationCommandOptionChoice | _NumberApplicationCommandOption | _StringApplicationCommandOption | _SubCommandCommandOption | _SubCommandGroupCommandOption] | str]` is not assignable to declared return type `_BooleanApplicationCommandOption | _ChannelApplicationCommandOptionChoice | _IntegerApplicationCommandOption | _NonChannelSnowflakeApplicationCommandOptionChoice | _NumberApplicationCommandOption | _StringApplicationCommandOption | _SubCommandCommandOption | _SubCommandGroupCommandOption` [bad-return]
ERROR discord/app_commands/models.py:1235:21-36: `int` is not assignable to TypedDict key `type` with type `Literal[1, 2, 3]` [bad-typed-dict-key]
ERROR discord/app_commands/transformers.py:110:67-73: Argument `locale_str | str` is not assignable to parameter `string` with type `locale_str` in function `discord.app_commands.translator.Translator._checked_translate` [bad-argument-type]
ERROR discord/app_commands/transformers.py:115:67-78: Argument `locale_str | str` is not assignable to parameter `string` with type `locale_str` in function `discord.app_commands.translator.Translator._checked_translate` [bad-argument-type]
@ -62,13 +65,13 @@ ERROR discord/app_commands/tree.py:366:29-36: Cannot set item in `dict[tuple[str
ERROR discord/app_commands/tree.py:748:27-34: Type of yielded value `ContextMenu` is not assignable to declared return type `Command[Any, Ellipsis, Any] | Group` [invalid-yield]
ERROR discord/app_commands/tree.py:814:19-38: No matching overload found for function `discord.utils.CachedSlotProperty.__get__` called with arguments: (Interaction[ClientT], type[Interaction]) [no-matching-overload]
ERROR discord/app_commands/tree.py:1127:19-38: No matching overload found for function `discord.utils.CachedSlotProperty.__get__` called with arguments: (Interaction[ClientT], type[Interaction]) [no-matching-overload]
ERROR discord/app_commands/tree.py:1180:66-89: `list[TypedDict[_BooleanValueApplicationCommandInteractionDataOption] | TypedDict[_CommandGroupApplicationCommandInteractionDataOption] | TypedDict[_IntegerValueApplicationCommandInteractionDataOption] | TypedDict[_NumberValueApplicationCommandInteractionDataOption] | TypedDict[_SnowflakeValueApplicationCommandInteractionDataOption] | TypedDict[_StringValueApplicationCommandInteractionDataOption]] | object` is not assignable to `list[TypedDict[_BooleanValueApplicationCommandInteractionDataOption] | TypedDict[_CommandGroupApplicationCommandInteractionDataOption] | TypedDict[_IntegerValueApplicationCommandInteractionDataOption] | TypedDict[_NumberValueApplicationCommandInteractionDataOption] | TypedDict[_SnowflakeValueApplicationCommandInteractionDataOption] | TypedDict[_StringValueApplicationCommandInteractionDataOption]]` [bad-assignment]
ERROR discord/app_commands/tree.py:1190:31-56: `list[TypedDict[_BooleanValueApplicationCommandInteractionDataOption] | TypedDict[_CommandGroupApplicationCommandInteractionDataOption] | TypedDict[_IntegerValueApplicationCommandInteractionDataOption] | TypedDict[_NumberValueApplicationCommandInteractionDataOption] | TypedDict[_SnowflakeValueApplicationCommandInteractionDataOption] | TypedDict[_StringValueApplicationCommandInteractionDataOption]] | object` is not assignable to variable `options` with type `list[TypedDict[_BooleanValueApplicationCommandInteractionDataOption] | TypedDict[_CommandGroupApplicationCommandInteractionDataOption] | TypedDict[_IntegerValueApplicationCommandInteractionDataOption] | TypedDict[_NumberValueApplicationCommandInteractionDataOption] | TypedDict[_SnowflakeValueApplicationCommandInteractionDataOption] | TypedDict[_StringValueApplicationCommandInteractionDataOption]]` [bad-assignment]
ERROR discord/app_commands/tree.py:1180:66-89: `list[ApplicationCommandInteractionDataOption] | object` is not assignable to `list[ApplicationCommandInteractionDataOption]` [bad-assignment]
ERROR discord/app_commands/tree.py:1190:31-56: `list[ApplicationCommandInteractionDataOption] | object` is not assignable to variable `options` with type `list[ApplicationCommandInteractionDataOption]` [bad-assignment]
ERROR discord/app_commands/tree.py:1216:9-32: Object of class `Interaction` has no attribute `_cs_command` [missing-attribute]
ERROR discord/app_commands/tree.py:1221:63-87: Argument `dict[@_, @_] | TypedDict[ResolvedData]` is not assignable to parameter `resolved` with type `TypedDict[ResolvedData]` in function `discord.app_commands.namespace.Namespace._get_resolved_items` [bad-argument-type]
ERROR discord/app_commands/tree.py:1221:63-87: Argument `dict[@_, @_] | ResolvedData` is not assignable to parameter `resolved` with type `ResolvedData` in function `discord.app_commands.namespace.Namespace._get_resolved_items` [bad-argument-type]
ERROR discord/app_commands/tree.py:1224:48-69: `int | object | str | None` is not assignable to `int | str | None` [bad-assignment]
ERROR discord/app_commands/tree.py:1273:9-32: Object of class `Interaction` has no attribute `_cs_command` [missing-attribute]
ERROR discord/app_commands/tree.py:1277:44-68: Argument `dict[@_, @_] | TypedDict[ResolvedData]` is not assignable to parameter `resolved` with type `TypedDict[ResolvedData]` in function `discord.app_commands.namespace.Namespace.__init__` [bad-argument-type]
ERROR discord/app_commands/tree.py:1277:44-68: Argument `dict[@_, @_] | ResolvedData` is not assignable to parameter `resolved` with type `ResolvedData` in function `discord.app_commands.namespace.Namespace.__init__` [bad-argument-type]
ERROR discord/app_commands/tree.py:1280:9-34: Object of class `Interaction` has no attribute `_cs_namespace` [missing-attribute]
ERROR discord/appinfo.py:222:45-83: `int | object` is not assignable to attribute `approximate_guild_count` with type `int` [bad-assignment]
ERROR discord/appinfo.py:412:17-41: Cannot set item in `None` [unsupported-operation]
@ -96,11 +99,12 @@ ERROR discord/automod.py:171:23-96: No matching overload found for function `Aut
ERROR discord/automod.py:304:32-58: Argument `list[str] | object | None` is not assignable to parameter `keyword_filter` with type `list[str] | None` in function `AutoModTrigger.__init__` [bad-argument-type]
ERROR discord/automod.py:305:32-58: Argument `list[str] | object | None` is not assignable to parameter `regex_patterns` with type `list[str] | None` in function `AutoModTrigger.__init__` [bad-argument-type]
ERROR discord/automod.py:306:28-50: Argument `list[str] | object | None` is not assignable to parameter `allow_list` with type `list[str] | None` in function `AutoModTrigger.__init__` [bad-argument-type]
ERROR discord/automod.py:310:64-87: Argument `list[Literal[1, 2, 3]] | list[int] | object` is not assignable to parameter `value` with type `Sequence[int]` in function `discord.flags.ArrayFlags._from_value` [bad-argument-type]
ERROR discord/automod.py:310:64-87: Argument `list[AutoModerationTriggerPresets] | list[int] | object` is not assignable to parameter `value` with type `Sequence[int]` in function `discord.flags.ArrayFlags._from_value` [bad-argument-type]
ERROR discord/automod.py:310:101-123: Argument `list[str] | object | None` is not assignable to parameter `allow_list` with type `list[str] | None` in function `AutoModTrigger.__init__` [bad-argument-type]
ERROR discord/automod.py:315:31-62: Argument `int | object | None` is not assignable to parameter `mention_limit` with type `int | None` in function `AutoModTrigger.__init__` [bad-argument-type]
ERROR discord/automod.py:316:41-84: Argument `bool | object | None` is not assignable to parameter `mention_raid_protection` with type `bool | None` in function `AutoModTrigger.__init__` [bad-argument-type]
ERROR discord/automod.py:388:92-120: Argument `object | TypedDict[_AutoModerationTriggerMetadataKeyword] | TypedDict[_AutoModerationTriggerMetadataKeywordPreset] | None` is not assignable to parameter `data` with type `TypedDict[Empty] | TypedDict[_AutoModerationTriggerMetadataKeyword] | TypedDict[_AutoModerationTriggerMetadataKeywordPreset] | TypedDict[_AutoModerationTriggerMetadataMentionLimit] | None` in function `AutoModTrigger.from_data` [bad-argument-type]
ERROR discord/automod.py:388:92-120: Argument `object | _AutoModerationTriggerMetadataKeyword | _AutoModerationTriggerMetadataKeywordPreset | None` is not assignable to parameter `data` with type `Empty | _AutoModerationTriggerMetadataKeyword | _AutoModerationTriggerMetadataKeywordPreset | _AutoModerationTriggerMetadataMentionLimit | None` in function `AutoModTrigger.from_data` [bad-argument-type]
ERROR discord/automod.py:398:42-410:10: `dict[str, bool | dict[str, Any] | int | list[dict[str, Any]] | list[str] | str | None]` is not assignable to `_AutoModerationRuleKeyword | _AutoModerationRuleKeywordPreset | _AutoModerationRuleOther` [bad-assignment]
ERROR discord/automod.py:434:20-85: No matching overload found for function `filter.__new__` called with arguments: (type[filter[_T]], None, map[CategoryChannel | ForumChannel | StageChannel | TextChannel | Thread | VoiceChannel | None]) [no-matching-overload]
ERROR discord/automod.py:512:31-35: Cannot set item in `dict[str, list[dict[str, Any]]]` [unsupported-operation]
ERROR discord/automod.py:515:37-53: Cannot set item in `dict[str, list[dict[str, Any]]]` [unsupported-operation]
@ -138,7 +142,8 @@ ERROR discord/client.py:782:33-787:18: No matching overload found for function `
ERROR discord/client.py:2975:83-99: Argument `int` is not assignable to parameter `owner_type` with type `Literal[1, 2]` in function `discord.http.HTTPClient.create_entitlement` [bad-argument-type]
ERROR discord/components.py:213:21-36: `int` is not assignable to TypedDict key `type` with type `Literal[1]` [bad-typed-dict-key]
ERROR discord/components.py:297:22-38: `int` is not assignable to TypedDict key `style` with type `Literal[1, 2, 3, 4, 5, 6]` [bad-typed-dict-key]
ERROR discord/components.py:412:40-77: `list[int]` is not assignable to TypedDict key `channel_types` with type `list[Literal[0, 1, 2, 3, 4, 5, 6, 10, 11, 12, 13, 15, 16]]` [bad-typed-dict-key]
ERROR discord/components.py:382:9-18: Attribute `type` of class `SelectMenu` is a read-only property and cannot be set [read-only]
ERROR discord/components.py:412:40-77: `list[int]` is not assignable to TypedDict key `channel_types` with type `list[ChannelType]` [bad-typed-dict-key]
ERROR discord/components.py:512:27-31: `None` is not assignable to attribute `_emoji` with type `PartialEmoji` [bad-assignment]
ERROR discord/components.py:613:21-36: `int` is not assignable to TypedDict key `type` with type `Literal[4]` [bad-typed-dict-key]
ERROR discord/components.py:614:22-38: `int` is not assignable to TypedDict key `style` with type `Literal[1, 2]` [bad-typed-dict-key]
@ -150,7 +155,7 @@ ERROR discord/components.py:1196:21-36: `int` is not assignable to TypedDict key
ERROR discord/components.py:1249:21-36: `int` is not assignable to TypedDict key `type` with type `Literal[14]` [bad-typed-dict-key]
ERROR discord/components.py:1251:24-42: `int` is not assignable to TypedDict key `spacing` with type `Literal[1, 2]` [bad-typed-dict-key]
ERROR discord/components.py:1324:21-36: `int` is not assignable to TypedDict key `type` with type `Literal[17]` [bad-typed-dict-key]
ERROR discord/components.py:1326:27-63: `list[TypedDict[ActionRow] | TypedDict[ButtonComponent] | TypedDict[ContainerComponent] | TypedDict[FileComponent] | TypedDict[FileUploadComponent] | TypedDict[LabelComponent] | TypedDict[MediaGalleryComponent] | TypedDict[SectionComponent] | TypedDict[SelectMenu] | TypedDict[SeparatorComponent] | TypedDict[TextComponent] | TypedDict[TextInput] | TypedDict[ThumbnailComponent]]` is not assignable to TypedDict key `components` with type `list[TypedDict[ActionRow] | TypedDict[ContainerComponent] | TypedDict[FileComponent] | TypedDict[MediaGalleryComponent] | TypedDict[SectionComponent] | TypedDict[SeparatorComponent] | TypedDict[TextComponent] | TypedDict[ThumbnailComponent]]` [bad-typed-dict-key]
ERROR discord/components.py:1326:27-63: `list[Component]` is not assignable to TypedDict key `components` with type `list[ContainerChildComponent]` [bad-typed-dict-key]
ERROR discord/components.py:1380:21-36: `int` is not assignable to TypedDict key `type` with type `Literal[18]` [bad-typed-dict-key]
ERROR discord/components.py:1444:21-36: `int` is not assignable to TypedDict key `type` with type `Literal[19]` [bad-typed-dict-key]
ERROR discord/embeds.py:246:28-55: `Colour` is not assignable to attribute `_colour` with type `None` [bad-assignment]
@ -164,7 +169,7 @@ ERROR discord/emoji.py:279:32-59: Cannot set item in `dict[str, str]` [unsupport
ERROR discord/enums.py:96:22-42: Expected string literal "cls" [invalid-argument]
ERROR discord/enums.py:113:9-17: ClassVar `EnumMeta.__name__` overrides instance variable of the same name in parent class `type` [bad-override]
ERROR discord/enums.py:960:5-9: Class member `StatusDisplayType.name` overrides parent class `Enum` in an inconsistent manner [bad-override]
ERROR discord/ext/commands/bot.py:89:33-54: `type[(TypeVar[BotT], Message) -> Awaitable[Iterable[str] | str] | Iterable[str] | str]` is not subscriptable [unsupported-operation]
ERROR discord/ext/commands/bot.py:89:33-54: `type[(TypeVar[BotT], Message) -> MaybeAwaitable]` is not subscriptable [unsupported-operation]
ERROR discord/ext/commands/cog.py:229:38-43: Cannot set item in `dict[Unknown, Command[Any, Ellipsis, Any]]` [unsupported-operation]
ERROR discord/ext/commands/cog.py:268:5-32: Object of class `FunctionType` has no attribute `__cog_special_method__` [missing-attribute]
ERROR discord/ext/commands/cog.py:497:24-39: Object of class `FunctionType` has no attribute `__func__` [missing-attribute]
@ -185,6 +190,7 @@ ERROR discord/ext/commands/context.py:535:26-30: Argument `Literal[True]` is not
ERROR discord/ext/commands/context.py:536:31-36: Argument `Literal[False]` is not assignable to parameter `send_tts_messages` with type `BoolOrNoneT` in function `discord.permissions.Permissions.update` [bad-argument-type]
ERROR discord/ext/commands/context.py:783:9-15: Class member `Context.typing` overrides parent class `Messageable` in an inconsistent manner [bad-override]
ERROR discord/ext/commands/context.py:847:19-44: No matching overload found for function `discord.utils.CachedSlotProperty.__get__` called with arguments: (Interaction[BotT], type[Interaction]) [no-matching-overload]
ERROR discord/ext/commands/context.py:1102:38-1119:14: No matching overload found for function `discord.abc.Messageable.send` called with arguments: (content=str | None, tts=bool, embed=Embed | None, embeds=Sequence[Embed] | None, file=File | None, files=Sequence[File] | None, stickers=Sequence[GuildSticker | StickerItem] | None, delete_after=float | None, nonce=int | str | None, allowed_mentions=AllowedMentions | None, reference=Message | MessageReference | PartialMessage | None, mention_author=bool | None, view=BaseView | None, suppress_embeds=bool, silent=bool, poll=Poll | None) [no-matching-overload]
ERROR discord/ext/commands/context.py:1137:12-37: No matching overload found for function `discord.utils.CachedSlotProperty.__get__` called with arguments: (Interaction[BotT], type[Interaction]) [no-matching-overload]
ERROR discord/ext/commands/context.py:1138:25-50: No matching overload found for function `discord.utils.CachedSlotProperty.__get__` called with arguments: (Interaction[BotT], type[Interaction]) [no-matching-overload]
ERROR discord/ext/commands/context.py:1140:30-55: No matching overload found for function `discord.utils.CachedSlotProperty.__get__` called with arguments: (Interaction[BotT], type[Interaction]) [no-matching-overload]
@ -217,10 +223,10 @@ ERROR discord/ext/commands/core.py:1261:31-45: Argument `str` is not assignable
ERROR discord/ext/commands/core.py:1263:31-42: Argument `str` is not assignable to parameter `object` with type `LiteralString` in function `list.append` [bad-argument-type]
ERROR discord/ext/commands/core.py:1265:31-42: Argument `str` is not assignable to parameter `object` with type `LiteralString` in function `list.append` [bad-argument-type]
ERROR discord/ext/commands/core.py:1312:58-71: Object of class `NoneType` has no attribute `cog_check` [missing-attribute]
ERROR discord/ext/commands/core.py:1502:9-16: Implementation signature `(self: Self@GroupMixin, name: str = ..., cls: type[Command[Any, Ellipsis, Any]] = ..., *args: Any, **kwargs: Unpack[TypedDict[_CommandDecoratorKwargs]]) -> Any` does not accept all arguments that overload signature `(self: GroupMixin[CogT], name: str = ..., *args: Any, **kwargs: Unpack[TypedDict[_CommandDecoratorKwargs]]) -> [ContextT, P, T](((CogT, ContextT, ParamSpec(P)) -> Coroutine[Any, Any, T]) | ((ContextT, ParamSpec(P)) -> Coroutine[Any, Any, T])) -> Command[CogT, P, T]` accepts [inconsistent-overload]
ERROR discord/ext/commands/core.py:1552:29-66: No matching overload found for function `command` called with arguments: (*tuple[Any, ...], name=str, cls=type[Command[Any, Ellipsis, Any]], **TypedDict[_CommandDecoratorKwargs]) [no-matching-overload]
ERROR discord/ext/commands/core.py:1559:9-14: Implementation signature `(self: Self@GroupMixin, name: str = ..., cls: type[Group[Any, Ellipsis, Any]] = ..., *args: Any, **kwargs: Unpack[TypedDict[_GroupDecoratorKwargs]]) -> Any` does not accept all arguments that overload signature `(self: GroupMixin[CogT], name: str = ..., *args: Any, **kwargs: Unpack[TypedDict[_GroupDecoratorKwargs]]) -> [ContextT, P, T](((CogT, ContextT, ParamSpec(P)) -> Coroutine[Any, Any, T]) | ((ContextT, ParamSpec(P)) -> Coroutine[Any, Any, T])) -> Group[CogT, P, T]` accepts [inconsistent-overload]
ERROR discord/ext/commands/core.py:1609:27-64: No matching overload found for function `group` called with arguments: (*tuple[Any, ...], name=str, cls=type[Group[Any, Ellipsis, Any]], **TypedDict[_GroupDecoratorKwargs]) [no-matching-overload]
ERROR discord/ext/commands/core.py:1502:9-16: Implementation signature `(self: Self@GroupMixin, name: str = ..., cls: type[Command[Any, Ellipsis, Any]] = ..., *args: Any, **kwargs: Unpack[_CommandDecoratorKwargs]) -> Any` does not accept all arguments that overload signature `(self: GroupMixin[CogT], name: str = ..., *args: Any, **kwargs: Unpack[_CommandDecoratorKwargs]) -> [ContextT, P, T](((CogT, ContextT, ParamSpec(P)) -> Coroutine[Any, Any, T]) | ((ContextT, ParamSpec(P)) -> Coroutine[Any, Any, T])) -> Command[CogT, P, T]` accepts [inconsistent-overload]
ERROR discord/ext/commands/core.py:1552:29-66: No matching overload found for function `command` called with arguments: (*tuple[Any, ...], name=str, cls=type[Command[Any, Ellipsis, Any]], **_CommandDecoratorKwargs) [no-matching-overload]
ERROR discord/ext/commands/core.py:1559:9-14: Implementation signature `(self: Self@GroupMixin, name: str = ..., cls: type[Group[Any, Ellipsis, Any]] = ..., *args: Any, **kwargs: Unpack[_GroupDecoratorKwargs]) -> Any` does not accept all arguments that overload signature `(self: GroupMixin[CogT], name: str = ..., *args: Any, **kwargs: Unpack[_GroupDecoratorKwargs]) -> [ContextT, P, T](((CogT, ContextT, ParamSpec(P)) -> Coroutine[Any, Any, T]) | ((ContextT, ParamSpec(P)) -> Coroutine[Any, Any, T])) -> Group[CogT, P, T]` accepts [inconsistent-overload]
ERROR discord/ext/commands/core.py:1609:27-64: No matching overload found for function `group` called with arguments: (*tuple[Any, ...], name=str, cls=type[Group[Any, Ellipsis, Any]], **_GroupDecoratorKwargs) [no-matching-overload]
ERROR discord/ext/commands/core.py:1735:13-21: Implementation signature `(self: Self@_CommandDecorator, func: (...) -> Coroutine[Any, Any, T], /) -> Any` does not accept all arguments that overload signature `(self: Self@_CommandDecorator, func: (CogT, ContextT, ParamSpec(P)) -> Coroutine[Any, Any, T], /) -> Command[CogT, P, T]` accepts [inconsistent-overload]
ERROR discord/ext/commands/core.py:1738:13-21: Implementation signature `(self: Self@_CommandDecorator, func: (...) -> Coroutine[Any, Any, T], /) -> Any` does not accept all arguments that overload signature `(self: Self@_CommandDecorator, func: (ContextT, ParamSpec(P)) -> Coroutine[Any, Any, T], /) -> Command[None, P, T]` accepts [inconsistent-overload]
ERROR discord/ext/commands/core.py:1744:13-21: Implementation signature `(self: Self@_GroupDecorator, func: (...) -> Coroutine[Any, Any, T], /) -> Any` does not accept all arguments that overload signature `(self: Self@_GroupDecorator, func: (CogT, ContextT, ParamSpec(P)) -> Coroutine[Any, Any, T], /) -> Group[CogT, P, T]` accepts [inconsistent-overload]
@ -250,15 +256,6 @@ ERROR discord/ext/commands/core.py:2655:31-35: Argument `((CogT, ContextT) -> Co
ERROR discord/ext/commands/core.py:2657:13-34: Object of class `FunctionType` has no attribute `__after_invoke__` [missing-attribute]
ERROR discord/ext/commands/flags.py:465:32-98: Expected a type form, got instance of `tuple[Unknown, ...]` [not-a-type]
ERROR discord/ext/commands/help.py:248:5-38: Object of class `FunctionType` has no attribute `__help_command_not_overridden__` [missing-attribute]
ERROR discord/ext/commands/help.py:262:14-22: Class member `_HelpCommandImpl.callback` overrides parent class `Command` in an inconsistent manner [bad-override]
ERROR discord/ext/commands/help.py:262:25-50: `BoundMethod[HelpCommand, [BotT](self: HelpCommand, ctx: Context[BotT], /, *, command: str | None = None) -> Coroutine[Unknown, Unknown, None]]` is not assignable to attribute `callback` with type `(self: Self@_HelpCommandImpl, function: ((Context[Any], ...) -> Coroutine[Any, Any, Unknown]) | ((Unknown, Context[Any], ...) -> Coroutine[Any, Any, Unknown])) -> None` [bad-assignment]
ERROR discord/ext/commands/help.py:270:33-41: `BoundMethod[HelpCommand, [BotT](self: HelpCommand, ctx: Context[BotT], error: CommandError, /) -> Coroutine[Unknown, Unknown, None]]` is not assignable to attribute `on_error` with type `Never` [bad-assignment]
ERROR discord/ext/commands/help.py:278:20-24: `None` is not assignable to attribute `cog` with type `(self: Self@_HelpCommandImpl, value: Unknown) -> None` [bad-assignment]
ERROR discord/ext/commands/help.py:311:20-23: `Cog` is not assignable to attribute `cog` with type `(self: Self@_HelpCommandImpl, value: Unknown) -> None` [bad-assignment]
ERROR discord/ext/commands/help.py:319:9-25: Object of class `FunctionType` has no attribute `get_commands` [missing-attribute]
ERROR discord/ext/commands/help.py:320:9-26: Object of class `FunctionType` has no attribute `walk_commands` [missing-attribute]
ERROR discord/ext/commands/help.py:321:20-24: `None` is not assignable to attribute `cog` with type `(self: Self@_HelpCommandImpl, value: Unknown) -> None` [bad-assignment]
ERROR discord/ext/commands/help.py:559:16-38: Returned type `(self: _HelpCommandImpl, value: Unknown) -> None` is not assignable to declared return type `Cog | None` [bad-return]
ERROR discord/ext/commands/help.py:1255:9-24: Class member `DefaultHelpCommand.get_destination` overrides parent class `HelpCommand` in an inconsistent manner [bad-override]
ERROR discord/ext/commands/help.py:1264:15-35: Class member `DefaultHelpCommand.prepare_help_command` overrides parent class `HelpCommand` in an inconsistent manner [bad-override]
ERROR discord/ext/commands/help.py:1520:9-24: Class member `MinimalHelpCommand.get_destination` overrides parent class `HelpCommand` in an inconsistent manner [bad-override]
@ -331,7 +328,7 @@ ERROR discord/guild.py:1908:32-37: Cannot set item in `dict[str, int]` [unsuppor
ERROR discord/guild.py:1932:53-113: Cannot set item in `dict[str, int]` [unsupported-operation]
ERROR discord/guild.py:1934:53-122: Cannot set item in `dict[str, int]` [unsupported-operation]
ERROR discord/guild.py:1947:41-78: Cannot set item in `dict[str, int]` [unsupported-operation]
ERROR discord/guild.py:1961:18-22: Argument `TypedDict[CategoryChannel] | TypedDict[ForumChannel] | TypedDict[MediaChannel] | TypedDict[NewsChannel] | TypedDict[StageChannel] | TypedDict[TextChannel] | TypedDict[ThreadChannel] | TypedDict[VoiceChannel]` is not assignable to parameter `data` with type `TypedDict[ForumChannel] | TypedDict[MediaChannel]` in function `discord.channel.ForumChannel.__init__` [bad-argument-type]
ERROR discord/guild.py:1961:18-22: Argument `CategoryChannel | ForumChannel | MediaChannel | NewsChannel | StageChannel | TextChannel | ThreadChannel | VoiceChannel` is not assignable to parameter `data` with type `ForumChannel | MediaChannel` in function `discord.channel.ForumChannel.__init__` [bad-argument-type]
ERROR discord/guild.py:3375:23-95: `EntityType | Any | None` is not assignable to variable `entity_type` with type `EntityType` [bad-assignment]
ERROR discord/guild.py:3389:38-55: Cannot set item in `dict[str, str]` [unsupported-operation]
ERROR discord/guild.py:3400:40-59: Cannot set item in `dict[str, str]` [unsupported-operation]
@ -345,24 +342,24 @@ ERROR discord/guild.py:4728:32-78: No matching overload found for function `disc
ERROR discord/guild.py:4963:18-61: Argument `int | None` is not assignable to parameter `mode` with type `Literal[0, 1] | None` in function `discord.http.HTTPClient.edit_guild_onboarding` [bad-argument-type]
ERROR discord/http.py:113:12-44: Cannot index into `reify` [bad-index]
ERROR discord/http.py:113:12-44: Cannot index into `reify[CIMultiDictProxy[str]]` [bad-index]
ERROR discord/http.py:190:34-46: Cannot set item in `dict[str, list[TypedDict[Embed] | Unknown]]` [unsupported-operation]
ERROR discord/http.py:192:34-38: Cannot set item in `dict[str, list[TypedDict[Embed] | Unknown]]` [unsupported-operation]
ERROR discord/http.py:196:37-57: Cannot set item in `dict[str, list[TypedDict[Embed] | Unknown]]` [unsupported-operation]
ERROR discord/http.py:207:28-38: Cannot set item in `dict[str, list[TypedDict[Embed] | Unknown]]` [unsupported-operation]
ERROR discord/http.py:208:36-40: Cannot set item in `dict[str, list[TypedDict[Embed] | Unknown]]` [unsupported-operation]
ERROR discord/http.py:211:40-57: Cannot set item in `dict[str, list[TypedDict[Embed] | Unknown]]` [unsupported-operation]
ERROR discord/http.py:215:38-46: Cannot set item in `dict[str, list[TypedDict[Embed] | Unknown]]` [unsupported-operation]
ERROR discord/http.py:219:22-25: Cannot set item in `dict[str, list[TypedDict[Embed] | Unknown]]` [unsupported-operation]
ERROR discord/http.py:221:33-48: Cannot set item in `dict[str, list[TypedDict[Embed] | Unknown]]` [unsupported-operation]
ERROR discord/http.py:223:31-39: Cannot set item in `dict[str, list[TypedDict[Embed] | Unknown]]` [unsupported-operation]
ERROR discord/http.py:226:28-39: Cannot set item in `dict[str, list[TypedDict[Embed] | Unknown]]` [unsupported-operation]
ERROR discord/http.py:229:34-45: Cannot set item in `dict[str, list[TypedDict[Embed] | Unknown]]` [unsupported-operation]
ERROR discord/http.py:233:43-102: Cannot set item in `dict[str, list[TypedDict[Embed] | Unknown]]` [unsupported-operation]
ERROR discord/http.py:235:43-69: Cannot set item in `dict[str, list[TypedDict[Embed] | Unknown]]` [unsupported-operation]
ERROR discord/http.py:237:39-74: Cannot set item in `dict[str, list[TypedDict[Embed] | Unknown]]` [unsupported-operation]
ERROR discord/http.py:241:43-70: Cannot set item in `dict[str, list[TypedDict[Embed] | Unknown]]` [unsupported-operation]
ERROR discord/http.py:242:9-52: Cannot set item in `list[TypedDict[Embed] | Unknown]` [unsupported-operation]
ERROR discord/http.py:263:39-51: Cannot set item in `dict[str, list[TypedDict[Embed] | Unknown]]` [unsupported-operation]
ERROR discord/http.py:190:34-46: Cannot set item in `dict[str, list[Embed | Unknown]]` [unsupported-operation]
ERROR discord/http.py:192:34-38: Cannot set item in `dict[str, list[Embed | Unknown]]` [unsupported-operation]
ERROR discord/http.py:196:37-57: Cannot set item in `dict[str, list[Embed | Unknown]]` [unsupported-operation]
ERROR discord/http.py:207:28-38: Cannot set item in `dict[str, list[Embed | Unknown]]` [unsupported-operation]
ERROR discord/http.py:208:36-40: Cannot set item in `dict[str, list[Embed | Unknown]]` [unsupported-operation]
ERROR discord/http.py:211:40-57: Cannot set item in `dict[str, list[Embed | Unknown]]` [unsupported-operation]
ERROR discord/http.py:215:38-46: Cannot set item in `dict[str, list[Embed | Unknown]]` [unsupported-operation]
ERROR discord/http.py:219:22-25: Cannot set item in `dict[str, list[Embed | Unknown]]` [unsupported-operation]
ERROR discord/http.py:221:33-48: Cannot set item in `dict[str, list[Embed | Unknown]]` [unsupported-operation]
ERROR discord/http.py:223:31-39: Cannot set item in `dict[str, list[Embed | Unknown]]` [unsupported-operation]
ERROR discord/http.py:226:28-39: Cannot set item in `dict[str, list[Embed | Unknown]]` [unsupported-operation]
ERROR discord/http.py:229:34-45: Cannot set item in `dict[str, list[Embed | Unknown]]` [unsupported-operation]
ERROR discord/http.py:233:43-102: Cannot set item in `dict[str, list[Embed | Unknown]]` [unsupported-operation]
ERROR discord/http.py:235:43-69: Cannot set item in `dict[str, list[Embed | Unknown]]` [unsupported-operation]
ERROR discord/http.py:237:39-74: Cannot set item in `dict[str, list[Embed | Unknown]]` [unsupported-operation]
ERROR discord/http.py:241:43-70: Cannot set item in `dict[str, list[Embed | Unknown]]` [unsupported-operation]
ERROR discord/http.py:242:9-52: Cannot set item in `list[Embed | Unknown]` [unsupported-operation]
ERROR discord/http.py:263:39-51: Cannot set item in `dict[str, list[Embed | Unknown]]` [unsupported-operation]
ERROR discord/http.py:282:17-287:18: Argument `dict[str, BufferedIOBase | str]` is not assignable to parameter `object` with type `dict[str, str]` in function `list.append` [bad-argument-type]
ERROR discord/http.py:399:26-37: Object of class `reify` has no attribute `get` [missing-attribute]
ERROR discord/http.py:402:38-49: Object of class `reify` has no attribute `get` [missing-attribute]
@ -378,7 +375,7 @@ ERROR discord/http.py:566:53-61: Unpacked keyword argument `BasicAuth | bool | d
ERROR discord/http.py:566:53-61: Unpacked keyword argument `BasicAuth | bool | dict[str, str] | float | int | str | None` is not assignable to parameter `autoping` with type `bool` in function `aiohttp.client.ClientSession.ws_connect` [bad-argument-type]
ERROR discord/http.py:566:53-61: Unpacked keyword argument `BasicAuth | bool | dict[str, str] | float | int | str | None` is not assignable to parameter `heartbeat` with type `float | None` in function `aiohttp.client.ClientSession.ws_connect` [bad-argument-type]
ERROR discord/http.py:566:53-61: Unpacked keyword argument `BasicAuth | bool | dict[str, str] | float | int | str | None` is not assignable to parameter `origin` with type `str | None` in function `aiohttp.client.ClientSession.ws_connect` [bad-argument-type]
ERROR discord/http.py:566:53-61: Unpacked keyword argument `BasicAuth | bool | dict[str, str] | float | int | str | None` is not assignable to parameter `params` with type `Mapping[str, Sequence[float | int | str] | float | int | str] | Sequence[tuple[str, Sequence[float | int | str] | float | int | str]] | str | None` in function `aiohttp.client.ClientSession.ws_connect` [bad-argument-type]
ERROR discord/http.py:566:53-61: Unpacked keyword argument `BasicAuth | bool | dict[str, str] | float | int | str | None` is not assignable to parameter `params` with type `Mapping[str, QueryVariable] | Sequence[tuple[str, QueryVariable]] | str | None` in function `aiohttp.client.ClientSession.ws_connect` [bad-argument-type]
ERROR discord/http.py:566:53-61: Unpacked keyword argument `BasicAuth | bool | dict[str, str] | float | int | str | None` is not assignable to parameter `headers` with type `CIMultiDict[str] | CIMultiDictProxy[str] | Iterable[tuple[istr | str, str]] | Mapping[istr, str] | Mapping[str, str] | None` in function `aiohttp.client.ClientSession.ws_connect` [bad-argument-type]
ERROR discord/http.py:566:53-61: Unpacked keyword argument `BasicAuth | bool | dict[str, str] | float | int | str | None` is not assignable to parameter `proxy` with type `URL | str | None` in function `aiohttp.client.ClientSession.ws_connect` [bad-argument-type]
ERROR discord/http.py:566:53-61: Unpacked keyword argument `BasicAuth | bool | dict[str, str] | float | int | str | None` is not assignable to parameter `ssl` with type `Fingerprint | SSLContext | bool` in function `aiohttp.client.ClientSession.ws_connect` [bad-argument-type]
@ -397,16 +394,16 @@ ERROR discord/http.py:801:44-52: Unpacked keyword argument `str` is not assignab
ERROR discord/http.py:1075:31-36: Cannot set item in `dict[str, str]` [unsupported-operation]
ERROR discord/http.py:1866:41-55: Cannot set item in `dict[str, bool | int]` [unsupported-operation]
ERROR discord/http.py:1869:48-74: Cannot set item in `dict[str, bool | int]` [unsupported-operation]
ERROR discord/http.py:2574:46-65: Cannot set item in `dict[str, list[TypedDict[Prompt]]]` [unsupported-operation]
ERROR discord/http.py:2577:34-41: Cannot set item in `dict[str, list[TypedDict[Prompt]]]` [unsupported-operation]
ERROR discord/http.py:2580:31-35: Cannot set item in `dict[str, list[TypedDict[Prompt]]]` [unsupported-operation]
ERROR discord/http.py:2574:46-65: Cannot set item in `dict[str, list[Prompt]]` [unsupported-operation]
ERROR discord/http.py:2577:34-41: Cannot set item in `dict[str, list[Prompt]]` [unsupported-operation]
ERROR discord/http.py:2580:31-35: Cannot set item in `dict[str, list[Prompt]]` [unsupported-operation]
ERROR discord/integrations.py:200:9-19: Class member `StreamIntegration._from_data` overrides parent class `Integration` in an inconsistent manner [bad-override]
ERROR discord/integrations.py:359:9-19: Class member `BotIntegration._from_data` overrides parent class `Integration` in an inconsistent manner [bad-override]
ERROR discord/interactions.py:214:48-64: `object | TypedDict[ButtonMessageComponentInteractionData] | TypedDict[ChatInputApplicationCommandInteractionData] | TypedDict[MessageApplicationCommandInteractionData] | TypedDict[ModalSubmitInteractionData] | TypedDict[SelectMessageComponentInteractionData] | TypedDict[UserApplicationCommandInteractionData] | None` is not assignable to attribute `data` with type `TypedDict[ButtonMessageComponentInteractionData] | TypedDict[ChatInputApplicationCommandInteractionData] | TypedDict[MessageApplicationCommandInteractionData] | TypedDict[ModalSubmitInteractionData] | TypedDict[SelectMessageComponentInteractionData] | TypedDict[UserApplicationCommandInteractionData] | None` [bad-assignment]
ERROR discord/interactions.py:214:48-64: `object | ButtonMessageComponentInteractionData | ChatInputApplicationCommandInteractionData | MessageApplicationCommandInteractionData | ModalSubmitInteractionData | SelectMessageComponentInteractionData | UserApplicationCommandInteractionData | None` is not assignable to attribute `data` with type `ButtonMessageComponentInteractionData | ChatInputApplicationCommandInteractionData | MessageApplicationCommandInteractionData | ModalSubmitInteractionData | SelectMessageComponentInteractionData | UserApplicationCommandInteractionData | None` [bad-assignment]
ERROR discord/interactions.py:220:64-102: Type `object` is not iterable [not-iterable]
ERROR discord/interactions.py:250:28-72: `CategoryChannel | ForumChannel | Guild | StageChannel | TextChannel | Thread | VoiceChannel | None` is not assignable to attribute `channel` with type `CategoryChannel | DMChannel | ForumChannel | GroupChannel | StageChannel | TextChannel | Thread | VoiceChannel | None` [bad-assignment]
ERROR discord/interactions.py:307:16-108: Returned type `ConnectionState[ClientT] | Guild | Any | None` is not assignable to declared return type `Guild | None` [bad-return]
ERROR discord/interactions.py:349:32-56: Argument `dict[@_, @_] | TypedDict[ResolvedData]` is not assignable to parameter `resolved` with type `TypedDict[ResolvedData]` in function `discord.app_commands.namespace.Namespace.__init__` [bad-argument-type]
ERROR discord/interactions.py:349:32-56: Argument `dict[@_, @_] | ResolvedData` is not assignable to parameter `resolved` with type `ResolvedData` in function `discord.app_commands.namespace.Namespace.__init__` [bad-argument-type]
ERROR discord/interactions.py:744:27-78: Argument `_InteractionMessageState` is not assignable to parameter `state` with type `ConnectionState[Client]` in function `discord.message.Message.__init__` [bad-argument-type]
ERROR discord/interactions.py:1427:5-11: Class member `InteractionMessage._state` overrides parent class `Message` in an inconsistent manner [bad-override]
ERROR discord/interactions.py:1430:15-19: Class member `InteractionMessage.edit` overrides parent class `Message` in an inconsistent manner [bad-override]
@ -424,7 +421,7 @@ ERROR discord/mentions.py:134:36-40: Cannot set item in `dict[str, list[int]]` [
ERROR discord/mentions.py:136:25-30: Cannot set item in `dict[str, list[int]]` [unsupported-operation]
ERROR discord/message.py:242:37-54: `object | None` is not assignable to attribute `title` with type `str | None` [bad-assignment]
ERROR discord/message.py:713:16-73: Returned type `ConnectionState[Client] | Message | None` is not assignable to declared return type `Message | None` [bad-return]
ERROR discord/message.py:2223:92-121: Argument `object | None` is not assignable to parameter `message_snapshots` with type `list[dict[Literal['message'], TypedDict[MessageSnapshot]]] | None` in function `MessageSnapshot._from_value` [bad-argument-type]
ERROR discord/message.py:2223:92-121: Argument `object | None` is not assignable to parameter `message_snapshots` with type `list[dict[Literal['message'], MessageSnapshot]] | None` in function `MessageSnapshot._from_value` [bad-argument-type]
ERROR discord/message.py:2404:30-33: Invalid key for TypedDict `Message`, got `str` [bad-typed-dict-key]
ERROR discord/message.py:2558:20-87: No matching overload found for function `filter.__new__` called with arguments: (type[filter[_T]], None, map[CategoryChannel | ForumChannel | StageChannel | TextChannel | Thread | VoiceChannel | None]) [no-matching-overload]
ERROR discord/onboarding.py:181:20-78: No matching overload found for function `filter.__new__` called with arguments: (type[filter[_T]], None, map[CategoryChannel | ForumChannel | StageChannel | TextChannel | Thread | VoiceChannel | None]) [no-matching-overload]
@ -468,7 +465,7 @@ ERROR discord/soundboard.py:208:9-16: Class member `SoundboardSound._update` ove
ERROR discord/stage_instance.py:168:40-59: Cannot set item in `dict[str, str]` [unsupported-operation]
ERROR discord/state.py:265:40-90: `Any | None` is not assignable to attribute `raw_presence_flag` with type `bool` [bad-assignment]
ERROR discord/state.py:551:16-98: Returned type `tuple[CategoryChannel | DMChannel | ForumChannel | Guild | PartialMessageable | StageChannel | TextChannel | Thread | VoiceChannel, Guild | None]` is not assignable to declared return type `tuple[CategoryChannel | ForumChannel | PartialMessageable | PrivateChannel | StageChannel | TextChannel | Thread | VoiceChannel, Guild | None]` [bad-return]
ERROR discord/state.py:832:81-89: Argument `dict[@_, @_] | TypedDict[ResolvedData]` is not assignable to parameter `resolved` with type `TypedDict[ResolvedData]` in function `discord.ui.view.ViewStore.dispatch_modal` [bad-argument-type]
ERROR discord/state.py:832:81-89: Argument `dict[@_, @_] | ResolvedData` is not assignable to parameter `resolved` with type `ResolvedData` in function `discord.ui.view.ViewStore.dispatch_modal` [bad-argument-type]
ERROR discord/sticker.py:200:14-20: Class member `StickerItem._state` overrides parent class `_StickerTag` in an inconsistent manner [bad-override]
ERROR discord/sticker.py:271:14-20: Class member `Sticker._state` overrides parent class `_StickerTag` in an inconsistent manner [bad-override]
ERROR discord/sticker.py:335:9-19: Class member `StandardSticker._from_data` overrides parent class `Sticker` in an inconsistent manner [bad-override]
@ -505,12 +502,9 @@ ERROR discord/types/interactions.py:221:5-9: Class member `ModalSubmitFileUpload
ERROR discord/types/interactions.py:237:5-9: Class member `ModalSubmitTextDisplayInteractionData.type` overrides parent class `ComponentBase` in an inconsistent manner [bad-override]
ERROR discord/types/interactions.py:242:5-9: Class member `ModalSubmitLabelInteractionData.type` overrides parent class `ComponentBase` in an inconsistent manner [bad-override]
ERROR discord/ui/action_row.py:122:45-78: `ClassVar` arguments may not contain any type variables [invalid-annotation]
ERROR discord/ui/action_row.py:140:14-16: Class member `ActionRow.id` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/action_row.py:140:19-21: `int | None` is not assignable to attribute `id` with type `(self: Self@ActionRow, value: int | None) -> None` [bad-assignment]
ERROR discord/ui/action_row.py:154:9-42: Generic attribute `__action_row_children_items__` of class `ActionRow` is not visible on the class [no-access]
ERROR discord/ui/action_row.py:163:26-56: Object of class `FunctionType` has no attribute `__discord_ui_model_type__` [missing-attribute]
ERROR discord/ui/action_row.py:163:59-91: Object of class `FunctionType` has no attribute `__discord_ui_model_kwargs__` [missing-attribute]
ERROR discord/ui/action_row.py:347:26-33: Cannot set item in `dict[str, int | list[Unknown]]` [unsupported-operation]
ERROR discord/ui/action_row.py:415:30-41: Default `type[Select[Any]]` is not assignable to parameter `cls` with type `type[SelectT]` [bad-function-definition]
ERROR discord/ui/action_row.py:430:34-49: Default `type[UserSelect[Any]]` is not assignable to parameter `cls` with type `type[UserSelectT]` [bad-function-definition]
ERROR discord/ui/action_row.py:446:34-49: Default `type[RoleSelect[Any]]` is not assignable to parameter `cls` with type `type[RoleSelectT]` [bad-function-definition]
@ -518,22 +512,17 @@ ERROR discord/ui/action_row.py:462:37-55: Default `type[ChannelSelect[Any]]` is
ERROR discord/ui/action_row.py:478:41-63: Default `type[MentionableSelect[Any]]` is not assignable to parameter `cls` with type `type[MentionableSelectT]` [bad-function-definition]
ERROR discord/ui/action_row.py:493:34-45: Default `type[Select[Any]]` is not assignable to parameter `cls` with type `type[BaseSelectT]` [bad-function-definition]
ERROR discord/ui/action_row.py:597:9-23: Class member `ActionRow.from_component` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/button.py:162:14-17: Class member `Button.row` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/button.py:162:20-23: `int | None` is not assignable to attribute `row` with type `(self: Self@Button, value: int | None) -> None` [bad-assignment]
ERROR discord/ui/button.py:259:9-23: Class member `Button.from_component` overrides parent class `Item` in an inconsistent manner [bad-param-name-override]
ERROR discord/ui/button.py:276:9-26: Class member `Button.to_component_dict` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/button.py:287:9-27: Class member `Button._refresh_component` overrides parent class `Item` in an inconsistent manner [bad-param-name-override]
ERROR discord/ui/button.py:376:9-39: Object of class `FunctionType` has no attribute `__discord_ui_model_type__` [missing-attribute]
ERROR discord/ui/button.py:377:9-41: Object of class `FunctionType` has no attribute `__discord_ui_model_kwargs__` [missing-attribute]
ERROR discord/ui/container.py:109:44-100: `ClassVar` arguments may not contain any type variables [invalid-annotation]
ERROR discord/ui/container.py:132:14-16: Class member `Container.id` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/container.py:132:19-21: `int | None` is not assignable to attribute `id` with type `(self: Self@Container, value: int | None) -> None` [bad-assignment]
ERROR discord/ui/container.py:151:30-59: Object of class `FunctionType` has no attribute `__discord_ui_model_type__` [missing-attribute]
ERROR discord/ui/container.py:151:62-93: Object of class `FunctionType` has no attribute `__discord_ui_model_kwargs__` [missing-attribute]
ERROR discord/ui/container.py:160:17-54: Object of class `NoneType` has no attribute `_children` [missing-attribute]
ERROR discord/ui/container.py:177:9-41: Generic attribute `__container_children_items__` of class `Container` is not visible on the class [no-access]
ERROR discord/ui/container.py:179:9-21: Class member `Container._update_view` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/container.py:256:26-33: Cannot set item in `dict[str, bool | int | list[dict[str, Any]] | None]` [unsupported-operation]
ERROR discord/ui/container.py:260:9-23: Class member `Container.from_component` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/file.py:162:9-23: Class member `File.from_component` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/file_upload.py:172:9-26: Class member `FileUpload.to_component_dict` overrides parent class `Item` in an inconsistent manner [bad-override]
@ -541,23 +530,14 @@ ERROR discord/ui/file_upload.py:175:9-27: Class member `FileUpload._refresh_comp
ERROR discord/ui/file_upload.py:178:9-23: Class member `FileUpload._handle_submit` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/file_upload.py:181:59-89: `in` is not supported between `str` and `object` [not-iterable]
ERROR discord/ui/file_upload.py:184:9-23: Class member `FileUpload.from_component` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/label.py:100:14-16: Class member `Label.id` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/label.py:100:19-21: `int | None` is not assignable to attribute `id` with type `(self: Self@Label, value: int | None) -> None` [bad-assignment]
ERROR discord/ui/label.py:112:9-26: Class member `Label.to_component_dict` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/label.py:114:21-46: `int` is not assignable to TypedDict key `type` with type `Literal[18]` [bad-typed-dict-key]
ERROR discord/ui/label.py:121:29-36: `(self: Self@Label, value: int | None) -> None` is not assignable to TypedDict key `id` with type `int` [bad-typed-dict-key]
ERROR discord/ui/label.py:125:9-23: Class member `Label.from_component` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/media_gallery.py:259:9-23: Class member `MediaGallery.from_component` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/modal.py:159:15-23: Class member `Modal.on_error` overrides parent class `BaseView` in an inconsistent manner [bad-override]
ERROR discord/ui/modal.py:176:9-17: Class member `Modal._refresh` overrides parent class `BaseView` in an inconsistent manner [bad-param-name-override]
ERROR discord/ui/modal.py:202:15-30: Class member `Modal._scheduled_task` overrides parent class `BaseView` in an inconsistent manner [bad-param-name-override]
ERROR discord/ui/section.py:87:14-16: Class member `Section.id` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/section.py:87:19-21: `int | None` is not assignable to attribute `id` with type `(self: Self@Section, value: int | None) -> None` [bad-assignment]
ERROR discord/ui/section.py:251:9-23: Class member `Section.from_component` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/section.py:256:19-31: `int | None` is not assignable to attribute `id` with type `(self: Section[Unknown], value: int | None) -> None` [bad-assignment]
ERROR discord/ui/section.py:275:26-33: Cannot set item in `dict[str, dict[str, Any] | int | list[dict[str, Any]]]` [unsupported-operation]
ERROR discord/ui/select.py:270:14-17: Class member `BaseSelect.row` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/select.py:270:20-23: `int | None` is not assignable to attribute `row` with type `(self: Self@BaseSelect, value: int | None) -> None` [bad-assignment]
ERROR discord/ui/select.py:363:9-26: Class member `BaseSelect.to_component_dict` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/select.py:366:9-27: Class member `BaseSelect._refresh_component` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/select.py:369:9-23: Class member `BaseSelect._handle_submit` overrides parent class `Item` in an inconsistent manner [bad-override]
@ -580,20 +560,13 @@ ERROR discord/ui/select.py:1232:13-45: Object of class `FunctionType` has no att
ERROR discord/ui/select.py:1234:13-45: Object of class `FunctionType` has no attribute `__discord_ui_model_kwargs__` [missing-attribute]
ERROR discord/ui/select.py:1250:13-45: Object of class `FunctionType` has no attribute `__discord_ui_model_kwargs__` [missing-attribute]
ERROR discord/ui/separator.py:129:9-23: Class member `Separator.from_component` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/text_display.py:64:14-16: Class member `TextDisplay.id` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/text_display.py:64:19-21: `int | None` is not assignable to attribute `id` with type `(self: Self@TextDisplay, value: int | None) -> None` [bad-assignment]
ERROR discord/ui/text_display.py:72:26-33: Cannot set item in `dict[str, int | str]` [unsupported-operation]
ERROR discord/ui/text_display.py:87:9-23: Class member `TextDisplay.from_component` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/text_input.py:148:14-17: Class member `TextInput.row` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/text_input.py:148:20-23: `int | None` is not assignable to attribute `row` with type `(self: Self@TextInput, value: int | None) -> None` [bad-assignment]
WARN discord/ui/text_input.py:190:6-11: `TextInput.label` is deprecated [deprecated]
WARN discord/ui/text_input.py:190:6-18: `TextInput.label` is deprecated [deprecated]
ERROR discord/ui/text_input.py:249:9-26: Class member `TextInput.to_component_dict` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/text_input.py:252:9-27: Class member `TextInput._refresh_component` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/text_input.py:255:9-23: Class member `TextInput._refresh_state` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/text_input.py:259:9-23: Class member `TextInput.from_component` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/thumbnail.py:97:14-16: Class member `Thumbnail.id` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/thumbnail.py:97:19-21: `int | None` is not assignable to attribute `id` with type `(self: Self@Thumbnail, value: int | None) -> None` [bad-assignment]
ERROR discord/ui/thumbnail.py:138:9-23: Class member `Thumbnail.from_component` overrides parent class `Item` in an inconsistent manner [bad-override]
ERROR discord/ui/view.py:246:30-59: Object of class `FunctionType` has no attribute `__discord_ui_model_type__` [missing-attribute]
ERROR discord/ui/view.py:246:62-93: Object of class `FunctionType` has no attribute `__discord_ui_model_kwargs__` [missing-attribute]
@ -627,9 +600,9 @@ ERROR discord/webhook/async_.py:634:9-21: Cannot set item in `None` [unsupported
ERROR discord/webhook/async_.py:643:17-648:18: Argument `dict[str, BufferedIOBase | str]` is not assignable to parameter `object` with type `dict[str, str]` in function `list.append` [bad-argument-type]
ERROR discord/webhook/async_.py:803:5-11: Class member `WebhookMessage._state` overrides parent class `Message` in an inconsistent manner [bad-override]
ERROR discord/webhook/async_.py:805:15-19: Class member `WebhookMessage.edit` overrides parent class `Message` in an inconsistent manner [bad-override]
ERROR discord/webhook/async_.py:1013:57-71: Argument `object` is not assignable to parameter `data` with type `TypedDict[PartialChannel]` in function `PartialWebhookChannel.__init__` [bad-argument-type]
ERROR discord/webhook/async_.py:1013:57-71: Argument `object` is not assignable to parameter `data` with type `PartialChannel` in function `PartialWebhookChannel.__init__` [bad-argument-type]
ERROR discord/webhook/async_.py:1015:64-78: `PartialWebhookChannel | object | None` is not assignable to attribute `source_channel` with type `PartialWebhookChannel | None` [bad-assignment]
ERROR discord/webhook/async_.py:1019:53-65: Argument `object` is not assignable to parameter `data` with type `TypedDict[SourceGuild]` in function `PartialWebhookGuild.__init__` [bad-argument-type]
ERROR discord/webhook/async_.py:1019:53-65: Argument `object` is not assignable to parameter `data` with type `SourceGuild` in function `PartialWebhookGuild.__init__` [bad-argument-type]
ERROR discord/webhook/async_.py:1021:60-72: `PartialWebhookGuild | object | None` is not assignable to attribute `source_guild` with type `PartialWebhookGuild | None` [bad-assignment]
ERROR discord/webhook/async_.py:1042:16-69: Returned type `ConnectionState[Client] | Guild | _WebhookState | None` is not assignable to declared return type `Guild | None` [bad-return]
ERROR discord/webhook/async_.py:1528:31-70: Cannot set item in `dict[str, str]` [unsupported-operation]
@ -647,4 +620,4 @@ ERROR discord/welcome_screen.py:104:33-48: Object of class `_EmojiTag` has no at
ERROR discord/welcome_screen.py:211:37-48: Cannot set item in `dict[str, list[Unknown]]` [unsupported-operation]
ERROR discord/welcome_screen.py:214:33-40: Cannot set item in `dict[str, list[Unknown]]` [unsupported-operation]
INFO Checking project configured at `<CWD>/pyrefly.toml`
INFO 644 errors (522 suppressed)
INFO 617 errors (519 suppressed)

View File

@ -698,9 +698,9 @@ discord/abc.py:687: error: Incompatible types in assignment (expression has type
discord/abc.py:694: error: Incompatible return value type (got "Dict[Optional[Role], PermissionOverwrite]", expected "Dict[Union[Role, Member, Object], PermissionOverwrite]") [return-value]
discord/abc.py:1031: error: Argument 5 to "edit_channel_permissions" of "HTTPClient" has incompatible type "int"; expected "Literal[0, 1]" [arg-type]
discord/abc.py:1269: error: Unexpected keyword argument "parent_id" for "update" of "TypedDict" [call-arg]
<TMPDIR>/venv/lib/python3.8/site-packages/mypy/typeshed/stdlib/typing.pyi:960: note: "update" of "TypedDict" defined here
<TMPDIR>_/venv/lib/python3.8/site-packages/mypy/typeshed/stdlib/typing.pyi:960: note: "update" of "TypedDict" defined here
discord/abc.py:1269: error: Unexpected keyword argument "lock_permissions" for "update" of "TypedDict" [call-arg]
<TMPDIR>/venv/lib/python3.8/site-packages/mypy/typeshed/stdlib/typing.pyi:960: note: "update" of "TypedDict" defined here
<TMPDIR>_/venv/lib/python3.8/site-packages/mypy/typeshed/stdlib/typing.pyi:960: note: "update" of "TypedDict" defined here
discord/abc.py:1815: error: Incompatible types in assignment (expression has type "reversed[MessagePin]", variable has type "List[MessagePin]") [assignment]
discord/abc.py:1821: error: Incompatible types in "yield" (actual type "Message", expected type "PinnedMessage") [misc]
discord/abc.py:2035: error: Incompatible types in assignment (expression has type "Callable[[Arg(int, 'retrieve'), Arg(Optional[Snowflake], 'after'), Arg(Optional[int], 'limit')], Coroutine[Any, Any, Any]]", variable has type "Callable[[Arg(int, 'retrieve'), Arg(Optional[Snowflake], 'around'), Arg(Optional[int], 'limit')], Coroutine[Any, Any, Any]]") [assignment]

View File

@ -1,38 +1,54 @@
discord/abc.py:1815:25: error[no-matching-overload] No overload of function `__new__` matches arguments
discord/abc.py:2091:9: error[invalid-parameter-default] Default value of type `<class 'VoiceClient'>` is not assignable to annotated parameter type `(Client, Connectable, /) -> T@connect`
discord/activity.py:286:9: error[invalid-method-override] Invalid override of method `to_dict`: Definition is incompatible with `BaseActivity.to_dict`
discord/activity.py:455:9: error[invalid-method-override] Invalid override of method `to_dict`: Definition is incompatible with `BaseActivity.to_dict`
discord/activity.py:566:9: error[invalid-method-override] Invalid override of method `to_dict`: Definition is incompatible with `BaseActivity.to_dict`
discord/activity.py:822:9: error[invalid-method-override] Invalid override of method `to_dict`: Definition is incompatible with `BaseActivity.to_dict`
discord/app_commands/commands.py:140:70: error[invalid-type-arguments] Type `typing.TypeVar` does not satisfy constraints `str`, `int`, `int | float`, `str | int | float` of type variable `ChoiceT@Choice`
discord/app_commands/commands.py:141:62: error[invalid-type-arguments] Type `typing.TypeVar` does not satisfy constraints `str`, `int`, `int | float`, `str | int | float` of type variable `ChoiceT@Choice`
discord/app_commands/commands.py:149:92: error[invalid-type-arguments] Too many type arguments: expected 1, got 3
discord/app_commands/commands.py:235:9: error[invalid-assignment] Object of type `bool` is not assignable to attribute `pass_command_binding` on type `((GroupT@validate_auto_complete_callback, Interaction[Any], str, /) -> Coroutine[Any, Any, list[Choice[ChoiceT@validate_auto_complete_callback]]]) | ((Interaction[Any], str, /) -> Coroutine[Any, Any, list[Choice[ChoiceT@validate_auto_complete_callback]]])`
discord/app_commands/commands.py:240:50: error[unresolved-attribute] Object of type `((GroupT@validate_auto_complete_callback, Interaction[Any], str, /) -> Coroutine[Any, Any, list[Choice[ChoiceT@validate_auto_complete_callback]]]) | ((Interaction[Any], str, /) -> Coroutine[Any, Any, list[Choice[ChoiceT@validate_auto_complete_callback]]])` has no attribute `__qualname__`
discord/app_commands/commands.py:372:37: error[unresolved-attribute] Object of type `(...) -> Any` has no attribute `__qualname__`
discord/app_commands/commands.py:381:102: error[unresolved-attribute] Object of type `(...) -> Any` has no attribute `__qualname__`
discord/app_commands/commands.py:393:29: error[unresolved-attribute] Object of type `(...) -> Any` has no attribute `__discord_app_commands_param_description__`
discord/app_commands/commands.py:402:19: error[unresolved-attribute] Object of type `(...) -> Any` has no attribute `__discord_app_commands_param_rename__`
discord/app_commands/commands.py:409:19: error[unresolved-attribute] Object of type `(...) -> Any` has no attribute `__discord_app_commands_param_choices__`
discord/app_commands/commands.py:416:24: error[unresolved-attribute] Object of type `(...) -> Any` has no attribute `__discord_app_commands_param_autocomplete__`
discord/app_commands/commands.py:432:38: error[unresolved-attribute] Object of type `((Interaction[Any], Member, /) -> @Todo) | ((Interaction[Any], User, /) -> @Todo) | ((Interaction[Any], Message, /) -> @Todo)` has no attribute `__qualname__`
discord/app_commands/commands.py:444:58: error[unresolved-attribute] Object of type `((Interaction[Any], Member, /) -> @Todo) | ((Interaction[Any], User, /) -> @Todo) | ((Interaction[Any], Message, /) -> @Todo)` has no attribute `__qualname__`
discord/app_commands/commands.py:450:57: error[unresolved-attribute] Object of type `((Interaction[Any], Member, /) -> @Todo) | ((Interaction[Any], User, /) -> @Todo) | ((Interaction[Any], Message, /) -> @Todo)` has no attribute `__globals__`
discord/app_commands/commands.py:450:75: error[unresolved-attribute] Object of type `((Interaction[Any], Member, /) -> @Todo) | ((Interaction[Any], User, /) -> @Todo) | ((Interaction[Any], Message, /) -> @Todo)` has no attribute `__globals__`
discord/app_commands/commands.py:432:38: error[unresolved-attribute] Object of type `((Interaction[Any], Member, /) -> Coroutine[Any, Any, Any]) | ((Interaction[Any], User, /) -> Coroutine[Any, Any, Any]) | ((Interaction[Any], Message, /) -> Coroutine[Any, Any, Any])` has no attribute `__qualname__`
discord/app_commands/commands.py:444:58: error[unresolved-attribute] Object of type `((Interaction[Any], Member, /) -> Coroutine[Any, Any, Any]) | ((Interaction[Any], User, /) -> Coroutine[Any, Any, Any]) | ((Interaction[Any], Message, /) -> Coroutine[Any, Any, Any])` has no attribute `__qualname__`
discord/app_commands/commands.py:450:57: error[unresolved-attribute] Object of type `((Interaction[Any], Member, /) -> Coroutine[Any, Any, Any]) | ((Interaction[Any], User, /) -> Coroutine[Any, Any, Any]) | ((Interaction[Any], Message, /) -> Coroutine[Any, Any, Any])` has no attribute `__globals__`
discord/app_commands/commands.py:450:75: error[unresolved-attribute] Object of type `((Interaction[Any], Member, /) -> Coroutine[Any, Any, Any]) | ((Interaction[Any], User, /) -> Coroutine[Any, Any, Any]) | ((Interaction[Any], Message, /) -> Coroutine[Any, Any, Any])` has no attribute `__globals__`
discord/app_commands/commands.py:657:43: error[invalid-type-arguments] Too many type arguments: expected 1, got 3
discord/app_commands/commands.py:675:49: error[invalid-type-arguments] Too many type arguments: expected 1, got 3
discord/app_commands/commands.py:683:28: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, Unknown]` has no attribute `__self__`
discord/app_commands/commands.py:684:41: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, Unknown]` has no attribute `__func__`
discord/app_commands/commands.py:684:41: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, Unknown]` has no attribute `__func__`
discord/app_commands/commands.py:688:97: warning[possibly-missing-attribute] Attribute `__globals__` may be missing on object of type `((...) -> Coroutine[Any, Any, Unknown]) | Unknown`
discord/app_commands/commands.py:726:51: error[invalid-type-arguments] Too many type arguments: expected 1, got 3
discord/app_commands/commands.py:807:19: error[missing-argument] No argument provided for required parameter `error` of function `on_error`
discord/app_commands/commands.py:807:35: error[invalid-argument-type] Argument to function `on_error` is incorrect: Expected `Group`, found `Interaction[Client]`
discord/app_commands/commands.py:807:48: error[invalid-argument-type] Argument to function `on_error` is incorrect: Expected `Interaction[Client]`, found `AppCommandError`
discord/app_commands/commands.py:810:23: error[missing-argument] No argument provided for required parameter `error` of function `on_error`
discord/app_commands/commands.py:810:46: error[invalid-argument-type] Argument to function `on_error` is incorrect: Expected `Group`, found `Interaction[Client]`
discord/app_commands/commands.py:810:59: error[invalid-argument-type] Argument to function `on_error` is incorrect: Expected `Interaction[Client]`, found `AppCommandError`
discord/app_commands/commands.py:2129:23: error[unresolved-attribute] Object of type `((Interaction[Any], Member, /) -> @Todo) | ((Interaction[Any], User, /) -> @Todo) | ((Interaction[Any], Message, /) -> @Todo)` has no attribute `__name__`
discord/app_commands/commands.py:2477:17: error[invalid-assignment] Object of type `list[Unknown]` is not assignable to attribute `__discord_app_commands_checks__` on type `(@Todo & ~Top[Command[Unknown, object, Unknown]] & ~ContextMenu & ~<Protocol with members '__discord_app_commands_checks__'>) | (((Interaction[Any], Member, /) -> @Todo) & ~Top[Command[Unknown, object, Unknown]] & ~ContextMenu & ~<Protocol with members '__discord_app_commands_checks__'>) | (((Interaction[Any], User, /) -> @Todo) & ~Top[Command[Unknown, object, Unknown]] & ~ContextMenu & ~<Protocol with members '__discord_app_commands_checks__'>) | (((Interaction[Any], Message, /) -> @Todo) & ~Top[Command[Unknown, object, Unknown]] & ~ContextMenu & ~<Protocol with members '__discord_app_commands_checks__'>)`
discord/app_commands/commands.py:2479:13: warning[possibly-missing-attribute] Attribute `__discord_app_commands_checks__` may be missing on object of type `(@Todo & ~Top[Command[Unknown, object, Unknown]] & ~ContextMenu) | (((Interaction[Any], Member, /) -> @Todo) & ~Top[Command[Unknown, object, Unknown]] & ~ContextMenu) | (((Interaction[Any], User, /) -> @Todo) & ~Top[Command[Unknown, object, Unknown]] & ~ContextMenu) | (((Interaction[Any], Message, /) -> @Todo) & ~Top[Command[Unknown, object, Unknown]] & ~ContextMenu)`
discord/app_commands/errors.py:453:95: error[unresolved-attribute] Object of type `object` has no attribute `__qualname__`
discord/app_commands/errors.py:460:88: error[unresolved-attribute] Object of type `((Interaction[Any], Member, /) -> @Todo) | ((Interaction[Any], User, /) -> @Todo) | ((Interaction[Any], Message, /) -> @Todo)` has no attribute `__qualname__`
discord/app_commands/commands.py:1967:44: error[invalid-type-arguments] Too many type arguments: expected 1, got 3
discord/app_commands/commands.py:1992:53: error[invalid-type-arguments] Too many type arguments: expected 1, got 3
discord/app_commands/commands.py:2005:55: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, Unknown]` has no attribute `__name__`
discord/app_commands/commands.py:2026:40: error[invalid-type-arguments] Too many type arguments: expected 1, got 3
discord/app_commands/commands.py:2053:49: error[invalid-type-arguments] Too many type arguments: expected 1, got 3
discord/app_commands/commands.py:2066:51: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, Unknown]` has no attribute `__name__`
discord/app_commands/commands.py:2129:23: error[unresolved-attribute] Object of type `((Interaction[Any], Member, /) -> Coroutine[Any, Any, Any]) | ((Interaction[Any], User, /) -> Coroutine[Any, Any, Any]) | ((Interaction[Any], Message, /) -> Coroutine[Any, Any, Any])` has no attribute `__name__`
discord/app_commands/commands.py:2477:17: error[invalid-assignment] Object of type `list[Unknown]` is not assignable to attribute `__discord_app_commands_checks__` on type `(((...) -> Coroutine[Any, Any, Unknown]) & ~Top[Command[Unknown, object, Unknown]] & ~ContextMenu & ~<Protocol with members '__discord_app_commands_checks__'>) | (((Interaction[Any], Member, /) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, object, Unknown]] & ~ContextMenu & ~<Protocol with members '__discord_app_commands_checks__'>) | (((Interaction[Any], User, /) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, object, Unknown]] & ~ContextMenu & ~<Protocol with members '__discord_app_commands_checks__'>) | (((Interaction[Any], Message, /) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, object, Unknown]] & ~ContextMenu & ~<Protocol with members '__discord_app_commands_checks__'>)`
discord/app_commands/commands.py:2479:13: error[unresolved-attribute] Object of type `(((...) -> Coroutine[Any, Any, Unknown]) & ~Top[Command[Unknown, object, Unknown]] & ~ContextMenu) | (((Interaction[Any], Member, /) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, object, Unknown]] & ~ContextMenu) | (((Interaction[Any], User, /) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, object, Unknown]] & ~ContextMenu) | (((Interaction[Any], Message, /) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, object, Unknown]] & ~ContextMenu)` has no attribute `__discord_app_commands_checks__`
discord/app_commands/errors.py:453:95: error[unresolved-attribute] Object of type `(() -> Coroutine[object, Never, object]) | ((...) -> Coroutine[Any, Any, Unknown])` has no attribute `__qualname__`
discord/app_commands/errors.py:460:88: error[unresolved-attribute] Object of type `((Interaction[Any], Member, /) -> Coroutine[Any, Any, Any]) | ((Interaction[Any], User, /) -> Coroutine[Any, Any, Any]) | ((Interaction[Any], Message, /) -> Coroutine[Any, Any, Any])` has no attribute `__qualname__`
discord/app_commands/models.py:926:16: error[invalid-return-type] Return type does not match returned value: expected `Member | None`, found `(Guild & ~AlwaysTruthy) | None | Member`
discord/app_commands/transformers.py:110:67: error[invalid-argument-type] Argument to bound method `_checked_translate` is incorrect: Expected `locale_str`, found `str | locale_str`
discord/app_commands/transformers.py:115:67: error[invalid-argument-type] Argument to bound method `_checked_translate` is incorrect: Expected `locale_str`, found `str | locale_str`
discord/app_commands/transformers.py:238:22: error[invalid-type-form] Variable of type `Self@__or__` is not allowed in a type expression
discord/app_commands/transformers.py:584:13: error[invalid-assignment] Not enough values to unpack: Expected 3
discord/app_commands/tree.py:76:22: error[invalid-type-arguments] Type `typing.TypeVar` is not assignable to upper bound `Client` of type variable `ClientT@Interaction`
discord/app_commands/tree.py:1011:27: error[unresolved-attribute] Object of type `((Interaction[Any], Member, /) -> @Todo) | ((Interaction[Any], User, /) -> @Todo) | ((Interaction[Any], Message, /) -> @Todo)` has no attribute `__name__`
discord/app_commands/tree.py:862:43: error[invalid-type-arguments] Too many type arguments: expected 1, got 3
discord/app_commands/tree.py:910:52: error[invalid-type-arguments] Too many type arguments: expected 1, got 3
discord/app_commands/tree.py:923:55: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, Unknown]` has no attribute `__name__`
discord/app_commands/tree.py:1011:27: error[unresolved-attribute] Object of type `((Interaction[Any], Member, /) -> Coroutine[Any, Any, Any]) | ((Interaction[Any], User, /) -> Coroutine[Any, Any, Any]) | ((Interaction[Any], Message, /) -> Coroutine[Any, Any, Any])` has no attribute `__name__`
discord/app_commands/tree.py:1133:19: error[missing-argument] No argument provided for required parameter `error` of function `on_error`
discord/app_commands/tree.py:1133:33: error[invalid-argument-type] Argument to function `on_error` is incorrect: Argument type `Interaction[ClientT@CommandTree]` does not satisfy upper bound `CommandTree[ClientT@CommandTree]` of type variable `Self`
discord/app_commands/tree.py:1133:46: error[invalid-argument-type] Argument to function `on_error` is incorrect: Expected `Interaction[ClientT@CommandTree]`, found `AppCommandError`
@ -72,6 +88,7 @@ discord/client.py:723:59: error[invalid-argument-type] Argument to bound method
discord/client.py:723:59: error[invalid-argument-type] Argument to bound method `from_client` is incorrect: Expected `bool`, found `Unknown | int | None`
discord/client.py:723:59: error[invalid-argument-type] Argument to bound method `from_client` is incorrect: Expected `str`, found `Unknown | int | None`
discord/client.py:723:59: error[invalid-argument-type] Argument to bound method `from_client` is incorrect: Expected `bool`, found `Unknown | int | None`
discord/client.py:2671:93: error[invalid-argument-type] Argument to bound method `format_map` is incorrect: Expected `_FormatMapMapping`, found `TextChannel | NewsChannel | VoiceChannel | ... omitted 7 union elements`
discord/components.py:86:9: error[invalid-type-form] Variable of type `Literal["TextDisplay"]` is not allowed in a type expression
discord/components.py:787:29: error[invalid-type-form] Variable of type `Literal["TextDisplay"]` is not allowed in a type expression
discord/components.py:1326:27: error[invalid-argument-type] Invalid argument to key "components" with declared type `list[ActionRow | TextComponent | MediaGalleryComponent | ... omitted 5 union elements]` on TypedDict `ContainerComponent`: value of type `list[ButtonComponent | SelectMenu | TextInput | ... omitted 11 union elements]`
@ -98,13 +115,18 @@ discord/emoji.py:287:26: warning[possibly-missing-attribute] Attribute `http` ma
discord/emoji.py:292:54: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `ConnectionState[Client]`, found `Any | None | ConnectionState[Client]`
discord/emoji.py:294:22: warning[possibly-missing-attribute] Attribute `http` may be missing on object of type `Any | None | ConnectionState[Client]`
discord/errors.py:30:10: error[unresolved-import] Cannot resolve imported module `requests`
discord/ext/commands/bot.py:89:33: error[invalid-type-form] Invalid subscript of object of type `GenericAlias` in type expression
discord/ext/commands/bot.py:175:36: error[invalid-type-arguments] Too many type arguments: expected 0, got 1
discord/ext/commands/bot.py:177:9: error[invalid-parameter-default] Default value of type `_DefaultRepr` is not assignable to annotated parameter type `HelpCommand | None`
discord/ext/commands/bot.py:655:16: error[unresolved-attribute] Object of type `(...) -> @Todo` has no attribute `__name__`
discord/ext/commands/bot.py:681:16: error[unresolved-attribute] Object of type `(...) -> @Todo` has no attribute `__name__`
discord/ext/commands/bot.py:296:41: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
discord/ext/commands/bot.py:306:50: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
discord/ext/commands/bot.py:320:41: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
discord/ext/commands/bot.py:330:50: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
discord/ext/commands/bot.py:655:16: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, Any]` has no attribute `__name__`
discord/ext/commands/bot.py:681:16: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, Any]` has no attribute `__name__`
discord/ext/commands/bot.py:1544:40: error[invalid-type-arguments] Too many type arguments: expected 0, got 1
discord/ext/commands/bot.py:1546:13: error[invalid-parameter-default] Default value of type `_DefaultRepr` is not assignable to annotated parameter type `HelpCommand | None`
discord/ext/commands/cog.py:288:36: error[invalid-type-arguments] Type `typing.Self` is not assignable to upper bound `Cog | None` of type variable `CogT@Command`
discord/ext/commands/cog.py:289:79: error[invalid-type-arguments] Type `typing.Self` is not assignable to upper bound `Group | Cog` of type variable `GroupT@Command`
discord/ext/commands/cog.py:288:36: error[invalid-type-arguments] Type `<special form 'typing.Self'>` is not assignable to upper bound `Cog | None` of type variable `CogT@Command`
discord/ext/commands/cog.py:289:79: error[invalid-type-arguments] Type `<special form 'typing.Self'>` is not assignable to upper bound `Group | Cog` of type variable `GroupT@Command`
discord/ext/commands/context.py:411:15: error[invalid-method-override] Invalid override of method `_get_channel`: Definition is incompatible with `Messageable._get_channel`
discord/ext/commands/context.py:783:9: error[invalid-method-override] Invalid override of method `typing`: Definition is incompatible with `Messageable.typing`
discord/ext/commands/converter.py:402:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `TextChannel | VoiceChannel | StageChannel | ... omitted 4 union elements`, found `(VoiceChannel & ~AlwaysFalsy) | (StageChannel & ~AlwaysFalsy) | (ForumChannel & Messageable & ~AlwaysFalsy) | ... omitted 5 union elements`
@ -113,36 +135,38 @@ discord/ext/commands/converter.py:1211:89: warning[possibly-missing-attribute] A
discord/ext/commands/converter.py:1241:13: error[invalid-assignment] Not enough values to unpack: Expected 3
discord/ext/commands/cooldowns.py:171:9: error[invalid-method-override] Invalid override of method `create_bucket`: Definition is incompatible with `CooldownMapping.create_bucket`
discord/ext/commands/core.py:141:24: error[invalid-assignment] Object of type `object` is not assignable to `(...) -> Any`
discord/ext/commands/core.py:433:38: error[unresolved-attribute] Object of type `(...) -> @Todo` has no attribute `__name__`
discord/ext/commands/core.py:462:22: error[unresolved-attribute] Object of type `(...) -> @Todo` has no attribute `__commands_checks__`
discord/ext/commands/core.py:470:24: error[unresolved-attribute] Object of type `(...) -> @Todo` has no attribute `__commands_cooldown__`
discord/ext/commands/core.py:483:31: error[unresolved-attribute] Object of type `(...) -> @Todo` has no attribute `__commands_max_concurrency__`
discord/ext/commands/core.py:500:29: error[unresolved-attribute] Object of type `(...) -> @Todo` has no attribute `__before_invoke__`
discord/ext/commands/core.py:508:28: error[unresolved-attribute] Object of type `(...) -> @Todo` has no attribute `__after_invoke__`
discord/ext/commands/core.py:433:38: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, T@Command]` has no attribute `__name__`
discord/ext/commands/core.py:462:22: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, T@Command]` has no attribute `__commands_checks__`
discord/ext/commands/core.py:470:24: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, T@Command]` has no attribute `__commands_cooldown__`
discord/ext/commands/core.py:483:31: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, T@Command]` has no attribute `__commands_max_concurrency__`
discord/ext/commands/core.py:500:29: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, T@Command]` has no attribute `__before_invoke__`
discord/ext/commands/core.py:508:28: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, T@Command]` has no attribute `__after_invoke__`
discord/ext/commands/core.py:544:24: error[unresolved-attribute] Object of type `(...) -> Any` has no attribute `__globals__`
discord/ext/commands/core.py:1552:22: error[no-matching-overload] No overload of function `command` matches arguments
discord/ext/commands/core.py:1609:22: error[no-matching-overload] No overload of function `group` matches arguments
discord/ext/commands/core.py:1942:17: error[invalid-assignment] Object of type `list[Unknown]` is not assignable to attribute `__commands_checks__` on type `((...) -> @Todo) & ~Top[Command[Unknown, object, Unknown]] & ~<Protocol with members '__commands_checks__'>`
discord/ext/commands/core.py:1944:13: error[unresolved-attribute] Object of type `((...) -> @Todo) & ~Top[Command[Unknown, object, Unknown]]` has no attribute `__commands_checks__`
discord/ext/commands/core.py:1949:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: Command[Any, @Todo, Any] | ((...) -> @Todo)) -> Command[Any, @Todo, Any] | ((...) -> @Todo)`.
discord/ext/commands/core.py:1956:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: Command[Any, @Todo, Any] | ((...) -> @Todo)) -> Command[Any, @Todo, Any] | ((...) -> @Todo)`.
discord/ext/commands/core.py:2358:32: error[invalid-argument-type] Argument to bound method `append` is incorrect: Expected `Never`, found `def predicate[BotT](ctx: Context[BotT@predicate]) -> bool`
discord/ext/commands/core.py:2365:17: error[invalid-assignment] Object of type `list[Unknown]` is not assignable to attribute `__commands_checks__` on type `((...) -> @Todo) & ~Top[Command[Unknown, object, Unknown]] & ~<Protocol with members '__commands_checks__'>`
discord/ext/commands/core.py:2367:13: error[unresolved-attribute] Object of type `((...) -> @Todo) & ~Top[Command[Unknown, object, Unknown]]` has no attribute `__commands_checks__`
discord/ext/commands/core.py:2368:13: error[invalid-assignment] Object of type `Literal[True]` is not assignable to attribute `__discord_app_commands_guild_only__` on type `((...) -> @Todo) & ~Top[Command[Unknown, object, Unknown]]`
discord/ext/commands/core.py:2373:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: Command[Unknown, Unknown, Unknown] | ((...) -> @Todo)) -> Command[Unknown, Unknown, Unknown] | ((...) -> @Todo)`.
discord/ext/commands/core.py:2380:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: Command[Unknown, Unknown, Unknown] | ((...) -> @Todo)) -> Command[Unknown, Unknown, Unknown] | ((...) -> @Todo)`.
discord/ext/commands/core.py:2433:32: error[invalid-argument-type] Argument to bound method `append` is incorrect: Expected `Never`, found `def predicate[BotT](ctx: Context[BotT@predicate]) -> bool`
discord/ext/commands/core.py:2440:17: error[invalid-assignment] Object of type `list[Unknown]` is not assignable to attribute `__commands_checks__` on type `((...) -> @Todo) & ~Top[Command[Unknown, object, Unknown]] & ~<Protocol with members '__commands_checks__'>`
discord/ext/commands/core.py:2442:13: error[unresolved-attribute] Object of type `((...) -> @Todo) & ~Top[Command[Unknown, object, Unknown]]` has no attribute `__commands_checks__`
discord/ext/commands/core.py:2443:13: error[invalid-assignment] Object of type `Literal[True]` is not assignable to attribute `__discord_app_commands_is_nsfw__` on type `((...) -> @Todo) & ~Top[Command[Unknown, object, Unknown]]`
discord/ext/commands/core.py:2448:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: Command[Unknown, Unknown, Unknown] | ((...) -> @Todo)) -> Command[Unknown, Unknown, Unknown] | ((...) -> @Todo)`.
discord/ext/commands/core.py:2455:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: Command[Unknown, Unknown, Unknown] | ((...) -> @Todo)) -> Command[Unknown, Unknown, Unknown] | ((...) -> @Todo)`.
discord/ext/commands/core.py:2499:13: error[invalid-assignment] Object of type `CooldownMapping[Unknown]` is not assignable to attribute `__commands_cooldown__` on type `((...) -> @Todo) & ~Top[Command[Unknown, object, Unknown]]`
discord/ext/commands/core.py:2547:13: error[invalid-assignment] Object of type `DynamicCooldownMapping[Unknown]` is not assignable to attribute `__commands_cooldown__` on type `((...) -> @Todo) & ~Top[Command[Unknown, object, Unknown]]`
discord/ext/commands/core.py:2582:13: error[invalid-assignment] Object of type `MaxConcurrency` is not assignable to attribute `__commands_max_concurrency__` on type `((...) -> @Todo) & ~Top[Command[Unknown, object, Unknown]]`
discord/ext/commands/core.py:2634:13: error[invalid-assignment] Object of type `@Todo` is not assignable to attribute `__before_invoke__` on type `((...) -> @Todo) & ~Top[Command[Unknown, object, Unknown]]`
discord/ext/commands/core.py:2657:13: error[invalid-assignment] Object of type `@Todo` is not assignable to attribute `__after_invoke__` on type `((...) -> @Todo) & ~Top[Command[Unknown, object, Unknown]]`
discord/ext/commands/core.py:1942:17: error[invalid-assignment] Object of type `list[Unknown]` is not assignable to attribute `__commands_checks__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, object, Unknown]] & ~<Protocol with members '__commands_checks__'>`
discord/ext/commands/core.py:1944:13: error[unresolved-attribute] Object of type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, object, Unknown]]` has no attribute `__commands_checks__`
discord/ext/commands/core.py:1949:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: Command[Any, @Todo, Any] | ((...) -> Coroutine[Any, Any, Any])) -> Command[Any, @Todo, Any] | ((...) -> Coroutine[Any, Any, Any])`.
discord/ext/commands/core.py:1956:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: Command[Any, @Todo, Any] | ((...) -> Coroutine[Any, Any, Any])) -> Command[Any, @Todo, Any] | ((...) -> Coroutine[Any, Any, Any])`.
discord/ext/commands/core.py:2358:32: error[invalid-argument-type] Argument to bound method `append` is incorrect: Expected `(Context[object], /) -> bool | Coroutine[Never, object, bool]`, found `def predicate[BotT](ctx: Context[BotT@predicate]) -> bool`
discord/ext/commands/core.py:2365:17: error[invalid-assignment] Object of type `list[Unknown]` is not assignable to attribute `__commands_checks__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, object, Unknown]] & ~<Protocol with members '__commands_checks__'>`
discord/ext/commands/core.py:2367:13: error[unresolved-attribute] Object of type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, object, Unknown]]` has no attribute `__commands_checks__`
discord/ext/commands/core.py:2368:13: error[invalid-assignment] Object of type `Literal[True]` is not assignable to attribute `__discord_app_commands_guild_only__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, object, Unknown]]`
discord/ext/commands/core.py:2373:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: Command[Unknown, Unknown, Unknown] | ((...) -> Coroutine[Any, Any, Any])) -> Command[Unknown, Unknown, Unknown] | ((...) -> Coroutine[Any, Any, Any])`.
discord/ext/commands/core.py:2380:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: Command[Unknown, Unknown, Unknown] | ((...) -> Coroutine[Any, Any, Any])) -> Command[Unknown, Unknown, Unknown] | ((...) -> Coroutine[Any, Any, Any])`.
discord/ext/commands/core.py:2433:32: error[invalid-argument-type] Argument to bound method `append` is incorrect: Expected `(Context[object], /) -> bool | Coroutine[Never, object, bool]`, found `def predicate[BotT](ctx: Context[BotT@predicate]) -> bool`
discord/ext/commands/core.py:2440:17: error[invalid-assignment] Object of type `list[Unknown]` is not assignable to attribute `__commands_checks__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, object, Unknown]] & ~<Protocol with members '__commands_checks__'>`
discord/ext/commands/core.py:2442:13: error[unresolved-attribute] Object of type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, object, Unknown]]` has no attribute `__commands_checks__`
discord/ext/commands/core.py:2443:13: error[invalid-assignment] Object of type `Literal[True]` is not assignable to attribute `__discord_app_commands_is_nsfw__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, object, Unknown]]`
discord/ext/commands/core.py:2448:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: Command[Unknown, Unknown, Unknown] | ((...) -> Coroutine[Any, Any, Any])) -> Command[Unknown, Unknown, Unknown] | ((...) -> Coroutine[Any, Any, Any])`.
discord/ext/commands/core.py:2455:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: Command[Unknown, Unknown, Unknown] | ((...) -> Coroutine[Any, Any, Any])) -> Command[Unknown, Unknown, Unknown] | ((...) -> Coroutine[Any, Any, Any])`.
discord/ext/commands/core.py:2499:13: error[invalid-assignment] Object of type `CooldownMapping[Unknown]` is not assignable to attribute `__commands_cooldown__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, object, Unknown]]`
discord/ext/commands/core.py:2547:13: error[invalid-assignment] Object of type `DynamicCooldownMapping[Unknown]` is not assignable to attribute `__commands_cooldown__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, object, Unknown]]`
discord/ext/commands/core.py:2582:13: error[invalid-assignment] Object of type `MaxConcurrency` is not assignable to attribute `__commands_max_concurrency__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, object, Unknown]]`
discord/ext/commands/core.py:2632:32: error[invalid-argument-type] Argument to bound method `before_invoke` is incorrect: Expected `((object, Unknown, /) -> Coroutine[Never, object, Never]) | ((Unknown, /) -> Coroutine[Never, object, Never])`, found `((CogT@before_invoke, ContextT@before_invoke, /) -> Coroutine[Any, Any, Any]) | ((ContextT@before_invoke, /) -> Coroutine[Any, Any, Any])`
discord/ext/commands/core.py:2634:13: error[invalid-assignment] Object of type `((CogT@before_invoke, ContextT@before_invoke, /) -> Coroutine[Any, Any, Any]) | ((ContextT@before_invoke, /) -> Coroutine[Any, Any, Any])` is not assignable to attribute `__before_invoke__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, object, Unknown]]`
discord/ext/commands/core.py:2655:31: error[invalid-argument-type] Argument to bound method `after_invoke` is incorrect: Expected `((object, Unknown, /) -> Coroutine[Never, object, Never]) | ((Unknown, /) -> Coroutine[Never, object, Never])`, found `((CogT@after_invoke, ContextT@after_invoke, /) -> Coroutine[Any, Any, Any]) | ((ContextT@after_invoke, /) -> Coroutine[Any, Any, Any])`
discord/ext/commands/core.py:2657:13: error[invalid-assignment] Object of type `((CogT@after_invoke, ContextT@after_invoke, /) -> Coroutine[Any, Any, Any]) | ((ContextT@after_invoke, /) -> Coroutine[Any, Any, Any])` is not assignable to attribute `__after_invoke__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, object, Unknown]]`
discord/ext/commands/help.py:309:9: error[invalid-assignment] Implicit shadowing of function `get_commands`
discord/ext/commands/help.py:310:9: error[invalid-assignment] Implicit shadowing of function `walk_commands`
discord/ext/commands/help.py:1255:9: error[invalid-method-override] Invalid override of method `get_destination`: Definition is incompatible with `HelpCommand.get_destination`
@ -151,11 +175,20 @@ discord/ext/commands/help.py:1520:9: error[invalid-method-override] Invalid over
discord/ext/commands/help.py:1529:15: error[invalid-method-override] Invalid override of method `prepare_help_command`: Definition is incompatible with `HelpCommand.prepare_help_command`
discord/ext/commands/hybrid.py:176:49: error[unresolved-attribute] Object of type `(str, /) -> Any` has no attribute `__name__`
discord/ext/commands/hybrid.py:232:13: error[unresolved-attribute] Unresolved attribute `__hybrid_command_flag__` on type `(...) -> Any`.
discord/ext/commands/hybrid.py:328:9: error[unresolved-attribute] Unresolved attribute `__signature__` on type `(...) -> @Todo`.
discord/ext/commands/hybrid.py:338:17: error[unresolved-attribute] Object of type `(...) -> @Todo` has no attribute `__signature__`
discord/ext/commands/hybrid.py:328:9: error[unresolved-attribute] Unresolved attribute `__signature__` on type `(...) -> Coroutine[Any, Any, T@HybridAppCommand]`.
discord/ext/commands/hybrid.py:338:17: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, T@HybridAppCommand]` has no attribute `__signature__`
discord/ext/commands/hybrid.py:512:37: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
discord/ext/commands/hybrid.py:563:9: error[invalid-method-override] Invalid override of method `_ensure_assignment_on_copy`: Definition is incompatible with `Command._ensure_assignment_on_copy`
discord/ext/commands/hybrid.py:731:9: error[invalid-method-override] Invalid override of method `_ensure_assignment_on_copy`: Definition is incompatible with `Command._ensure_assignment_on_copy`
discord/ext/commands/hybrid.py:790:9: error[invalid-method-override] Invalid override of method `add_command`: Definition is incompatible with `GroupMixin.add_command`
discord/ext/commands/hybrid.py:842:42: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
discord/ext/commands/hybrid.py:852:51: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
discord/ext/commands/hybrid.py:866:42: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
discord/ext/commands/hybrid.py:876:51: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
discord/ext/commands/hybrid.py:890:38: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
discord/ext/commands/hybrid.py:928:47: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
discord/ext/commands/hybrid.py:942:38: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
discord/ext/commands/hybrid.py:962:47: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
discord/ext/commands/parameters.py:98:9: error[invalid-parameter-default] Default value of type `<class '_empty'>` is not assignable to annotated parameter type `str`
discord/ext/commands/parameters.py:99:9: error[invalid-parameter-default] Default value of type `<class '_empty'>` is not assignable to annotated parameter type `str`
discord/ext/commands/parameters.py:100:9: error[invalid-parameter-default] Default value of type `<class '_empty'>` is not assignable to annotated parameter type `str`
@ -182,6 +215,7 @@ discord/gateway.py:735:13: error[invalid-assignment] Cannot assign to a subscrip
discord/gateway.py:738:13: error[invalid-assignment] Cannot assign to a subscript on an object of type `int`
discord/gateway.py:741:13: error[invalid-assignment] Cannot assign to a subscript on an object of type `int`
discord/guild.py:1961:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `ForumChannel | MediaChannel`, found `TextChannel | NewsChannel | VoiceChannel | ... omitted 5 union elements`
discord/guild.py:2626:93: error[invalid-argument-type] Argument to bound method `format_map` is incorrect: Expected `_FormatMapMapping`, found `TextChannel | NewsChannel | VoiceChannel | ... omitted 7 union elements`
discord/http.py:566:53: error[invalid-argument-type] Argument to bound method `ws_connect` is incorrect: Expected `str`, found `Unknown | BasicAuth | None | ... omitted 4 union elements`
discord/http.py:566:53: error[invalid-argument-type] Argument to bound method `ws_connect` is incorrect: Expected `Iterable[str]`, found `Unknown | BasicAuth | None | ... omitted 4 union elements`
discord/http.py:566:53: error[invalid-argument-type] Argument to bound method `ws_connect` is incorrect: Expected `int | float`, found `Unknown | BasicAuth | None | ... omitted 4 union elements`
@ -277,6 +311,10 @@ discord/sticker.py:434:16: warning[possibly-missing-attribute] Attribute `_get_g
discord/sticker.py:489:43: warning[possibly-missing-attribute] Attribute `http` may be missing on object of type `Any | None | ConnectionState[Client]`
discord/sticker.py:490:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `ConnectionState[Client]`, found `Any | None | ConnectionState[Client]`
discord/sticker.py:511:15: warning[possibly-missing-attribute] Attribute `http` may be missing on object of type `Any | None | ConnectionState[Client]`
discord/ui/action_row.py:122:67: error[invalid-type-arguments] Type `<special form 'typing.Self'>` is not assignable to upper bound `BaseView | ActionRow[Unknown] | Container[Unknown]` of type variable `C@ContainedItemCallbackType`
discord/ui/action_row.py:163:26: error[unresolved-attribute] Object of type `(Unknown, Interaction[Any], Unknown, /) -> Coroutine[Any, Any, Any]` has no attribute `__discord_ui_model_type__`
discord/ui/action_row.py:163:59: error[unresolved-attribute] Object of type `(Unknown, Interaction[Any], Unknown, /) -> Coroutine[Any, Any, Any]` has no attribute `__discord_ui_model_kwargs__`
discord/ui/action_row.py:166:27: error[unresolved-attribute] Object of type `(Unknown, Interaction[Any], Unknown, /) -> Coroutine[Any, Any, Any]` has no attribute `__name__`
discord/ui/action_row.py:415:9: error[invalid-parameter-default] Default value of type `<class 'Select[Any]'>` is not assignable to annotated parameter type `type[SelectT@select]`
discord/ui/action_row.py:430:9: error[invalid-parameter-default] Default value of type `<class 'UserSelect[Any]'>` is not assignable to annotated parameter type `type[UserSelectT@select]`
discord/ui/action_row.py:446:9: error[invalid-parameter-default] Default value of type `<class 'RoleSelect[Any]'>` is not assignable to annotated parameter type `type[RoleSelectT@select]`
@ -287,6 +325,13 @@ discord/ui/action_row.py:597:9: error[invalid-method-override] Invalid override
discord/ui/button.py:259:9: error[invalid-method-override] Invalid override of method `from_component`: Definition is incompatible with `Item.from_component`
discord/ui/button.py:276:9: error[invalid-method-override] Invalid override of method `to_component_dict`: Definition is incompatible with `Item.to_component_dict`
discord/ui/button.py:287:9: error[invalid-method-override] Invalid override of method `_refresh_component`: Definition is incompatible with `Item._refresh_component`
discord/ui/button.py:376:9: error[unresolved-attribute] Unresolved attribute `__discord_ui_model_type__` on type `(S@button, Interaction[Any], Button[V@button], /) -> Coroutine[Any, Any, Any]`.
discord/ui/button.py:377:9: error[unresolved-attribute] Unresolved attribute `__discord_ui_model_kwargs__` on type `(S@button, Interaction[Any], Button[V@button], /) -> Coroutine[Any, Any, Any]`.
discord/ui/container.py:109:77: error[invalid-type-arguments] Type `<special form 'typing.Self'>` is not assignable to upper bound `BaseView | ActionRow[Unknown] | Container[Unknown]` of type variable `C@ContainedItemCallbackType`
discord/ui/container.py:151:30: error[unresolved-attribute] Object of type `((Unknown, Interaction[Any], Unknown, /) -> Coroutine[Any, Any, Any]) & ~Item[object]` has no attribute `__discord_ui_model_type__`
discord/ui/container.py:151:62: error[unresolved-attribute] Object of type `((Unknown, Interaction[Any], Unknown, /) -> Coroutine[Any, Any, Any]) & ~Item[object]` has no attribute `__discord_ui_model_kwargs__`
discord/ui/container.py:153:31: error[unresolved-attribute] Object of type `((Unknown, Interaction[Any], Unknown, /) -> Coroutine[Any, Any, Any]) & ~Item[object]` has no attribute `__name__`
discord/ui/container.py:159:41: error[unresolved-attribute] Object of type `((Unknown, Interaction[Any], Unknown, /) -> Coroutine[Any, Any, Any]) & ~Item[object]` has no attribute `__name__`
discord/ui/container.py:179:9: error[invalid-method-override] Invalid override of method `_update_view`: Definition is incompatible with `Item._update_view`
discord/ui/container.py:260:9: error[invalid-method-override] Invalid override of method `from_component`: Definition is incompatible with `Item.from_component`
discord/ui/file.py:162:9: error[invalid-method-override] Invalid override of method `from_component`: Definition is incompatible with `Item.from_component`
@ -297,7 +342,7 @@ discord/ui/file_upload.py:184:9: error[invalid-method-override] Invalid override
discord/ui/label.py:112:9: error[invalid-method-override] Invalid override of method `to_component_dict`: Definition is incompatible with `Item.to_component_dict`
discord/ui/label.py:125:9: error[invalid-method-override] Invalid override of method `from_component`: Definition is incompatible with `Item.from_component`
discord/ui/media_gallery.py:259:9: error[invalid-method-override] Invalid override of method `from_component`: Definition is incompatible with `Item.from_component`
discord/ui/modal.py:109:55: error[invalid-type-arguments] Type `typing.Self` is not assignable to upper bound `BaseView` of type variable `V@Item`
discord/ui/modal.py:109:55: error[invalid-type-arguments] Type `<special form 'typing.Self'>` is not assignable to upper bound `BaseView` of type variable `V@Item`
discord/ui/modal.py:159:15: error[invalid-method-override] Invalid override of method `on_error`: Definition is incompatible with `BaseView.on_error`
discord/ui/modal.py:176:9: error[invalid-method-override] Invalid override of method `_refresh`: Definition is incompatible with `BaseView._refresh`
discord/ui/modal.py:202:15: error[invalid-method-override] Invalid override of method `_scheduled_task`: Definition is incompatible with `BaseView._scheduled_task`
@ -315,6 +360,11 @@ discord/ui/select.py:1063:5: error[invalid-parameter-default] Default value of t
discord/ui/select.py:1080:5: error[invalid-parameter-default] Default value of type `<class 'ChannelSelect[Any]'>` is not assignable to annotated parameter type `type[ChannelSelectT@select]`
discord/ui/select.py:1097:5: error[invalid-parameter-default] Default value of type `<class 'MentionableSelect[Any]'>` is not assignable to annotated parameter type `type[MentionableSelectT@select]`
discord/ui/select.py:1113:5: error[invalid-parameter-default] Default value of type `<class 'Select[Any]'>` is not assignable to annotated parameter type `type[BaseSelectT@select]`
discord/ui/select.py:1221:9: error[unresolved-attribute] Unresolved attribute `__discord_ui_model_type__` on type `(S@select, Interaction[Any], BaseSelectT@select, /) -> Coroutine[Any, Any, Any]`.
discord/ui/select.py:1222:9: error[unresolved-attribute] Unresolved attribute `__discord_ui_model_kwargs__` on type `(S@select, Interaction[Any], BaseSelectT@select, /) -> Coroutine[Any, Any, Any]`.
discord/ui/select.py:1232:13: error[unresolved-attribute] Object of type `(S@select, Interaction[Any], BaseSelectT@select, /) -> Coroutine[Any, Any, Any]` has no attribute `__discord_ui_model_kwargs__`
discord/ui/select.py:1234:13: error[unresolved-attribute] Object of type `(S@select, Interaction[Any], BaseSelectT@select, /) -> Coroutine[Any, Any, Any]` has no attribute `__discord_ui_model_kwargs__`
discord/ui/select.py:1250:13: error[unresolved-attribute] Object of type `(S@select, Interaction[Any], BaseSelectT@select, /) -> Coroutine[Any, Any, Any]` has no attribute `__discord_ui_model_kwargs__`
discord/ui/separator.py:129:9: error[invalid-method-override] Invalid override of method `from_component`: Definition is incompatible with `Item.from_component`
discord/ui/text_display.py:87:9: error[invalid-method-override] Invalid override of method `from_component`: Definition is incompatible with `Item.from_component`
discord/ui/text_input.py:249:9: error[invalid-method-override] Invalid override of method `to_component_dict`: Definition is incompatible with `Item.to_component_dict`
@ -322,6 +372,9 @@ discord/ui/text_input.py:252:9: error[invalid-method-override] Invalid override
discord/ui/text_input.py:255:9: error[invalid-method-override] Invalid override of method `_refresh_state`: Definition is incompatible with `Item._refresh_state`
discord/ui/text_input.py:259:9: error[invalid-method-override] Invalid override of method `from_component`: Definition is incompatible with `Item.from_component`
discord/ui/thumbnail.py:138:9: error[invalid-method-override] Invalid override of method `from_component`: Definition is incompatible with `Item.from_component`
discord/ui/view.py:246:30: error[unresolved-attribute] Object of type `((Any, Interaction[Any], Any, /) -> Coroutine[Any, Any, Any]) & ~Item[object]` has no attribute `__discord_ui_model_type__`
discord/ui/view.py:246:62: error[unresolved-attribute] Object of type `((Any, Interaction[Any], Any, /) -> Coroutine[Any, Any, Any]) & ~Item[object]` has no attribute `__discord_ui_model_kwargs__`
discord/ui/view.py:251:31: error[unresolved-attribute] Object of type `((Any, Interaction[Any], Any, /) -> Coroutine[Any, Any, Any]) & ~Item[object]` has no attribute `__name__`
discord/ui/view.py:324:16: error[invalid-return-type] Return type does not match returned value: expected `list[Item[Self@children]]`, found `list[Item[Self@__init__]]`
discord/user.py:428:9: error[invalid-method-override] Invalid override of method `_update`: Definition is incompatible with `BaseUser._update`
discord/utils.py:257:9: error[invalid-method-override] Invalid override of method `__getitem__`: Definition is incompatible with `Sequence.__getitem__`
@ -350,4 +403,4 @@ discord/webhook/sync.py:522:9: error[invalid-method-override] Invalid override o
discord/webhook/sync.py:652:16: error[unresolved-import] Cannot resolve imported module `requests`
discord/webhook/sync.py:695:16: error[unresolved-import] Cannot resolve imported module `requests`
discord/welcome_screen.py:104:33: warning[possibly-missing-attribute] Attribute `name` may be missing on object of type `(Unknown & _EmojiTag) | PartialEmoji | Emoji | (str & _EmojiTag)`
Found 352 diagnostics
Found 405 diagnostics

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,24 @@
homeassistant/components/vivotek/camera.py:101: error: Returning Any from function declared to return "bytes | None" [no-any-return]
homeassistant/scripts/benchmark/__init__.py:39: error: function asyncio.events.get_event_loop_policy is deprecated: Deprecated since Python 3.14; will be removed in Python 3.16. [deprecated]
homeassistant/components/ssdp/common.py:18: error: Item "IPv4Address" of "IPv4Address | IPv6Address" has no attribute "scope_id" [union-attr]
homeassistant/components/apple_tv/config_flow.py:144: error: Returning Any from function declared to return "str | None" [no-any-return]
homeassistant/components/apple_tv/__init__.py:102: error: Statement is unreachable [unreachable]
homeassistant/components/apple_tv/__init__.py:151: error: Name "AppleTVInterface" is not defined [name-defined]
homeassistant/components/apple_tv/__init__.py:245: error: Name "exceptions" is not defined [name-defined]
homeassistant/components/apple_tv/__init__.py:284: error: Name "AppleTV" is not defined [name-defined]
homeassistant/components/apple_tv/__init__.py:295: error: Name "Protocol" is not defined [name-defined]
homeassistant/components/apple_tv/__init__.py:300: error: Name "scan" is not defined [name-defined]
homeassistant/components/apple_tv/__init__.py:308: error: Name "AppleTV" is not defined [name-defined]
homeassistant/components/apple_tv/__init__.py:319: error: Name "AppleTV" is not defined [name-defined]
homeassistant/components/apple_tv/__init__.py:326: error: Name "Protocol" is not defined [name-defined]
homeassistant/components/apple_tv/__init__.py:328: error: Unused "type: ignore" comment [unused-ignore]
homeassistant/components/apple_tv/__init__.py:348: error: Name "connect" is not defined [name-defined]
homeassistant/components/apple_tv/__init__.py:382: error: Name "DeviceModel" is not defined [name-defined]
homeassistant/components/apple_tv/__init__.py:383: error: Name "model_str" is not defined [name-defined]
homeassistant/components/ssdp/server.py:174: error: Item "IPv4Address" of "IPv4Address | IPv6Address" has no attribute "scope_id" [union-attr]
homeassistant/components/ssdp/server.py:179: error: Item "IPv4Address" of "IPv4Address | IPv6Address" has no attribute "scope_id" [union-attr]
homeassistant/components/ssdp/scanner.py:263: error: Item "IPv4Address" of "IPv4Address | IPv6Address" has no attribute "scope_id" [union-attr]
homeassistant/components/ssdp/scanner.py:268: error: Item "IPv4Address" of "IPv4Address | IPv6Address" has no attribute "scope_id" [union-attr]
homeassistant/components/shelly/utils.py:256: error: Generator has incompatible item type "IPv4Address | IPv6Address"; expected "IPv4Address" [misc]
homeassistant/components/amcrest/camera.py:194: error: Returning Any from function declared to return "bytes | None" [no-any-return]
homeassistant/components/amcrest/camera.py:480: error: Unused "type: ignore" comment [unused-ignore]
homeassistant/components/amcrest/camera.py:482: error: Unused "type: ignore" comment [unused-ignore]
@ -10,5 +30,29 @@ homeassistant/components/amcrest/camera.py:607: error: Returning Any from functi
homeassistant/components/amcrest/camera.py:628: error: Returning Any from function declared to return "str" [no-any-return]
homeassistant/components/amcrest/__init__.py:125: error: Class cannot subclass "ApiWrapper" (has type "Any") [misc]
homeassistant/components/amcrest/__init__.py:200: error: Returning Any from function declared to return "Response" [no-any-return]
Found 12 errors in 3 files (checked 8525 source files)
homeassistant/components/apple_tv/media_player.py:113: error: Class cannot subclass "PowerListener" (has type "Any") [misc]
homeassistant/components/apple_tv/media_player.py:113: error: Class cannot subclass "AudioListener" (has type "Any") [misc]
homeassistant/components/apple_tv/media_player.py:113: error: Class cannot subclass "PushListener" (has type "Any") [misc]
homeassistant/components/apple_tv/media_player.py:259: error: Returning Any from function declared to return "str | None" [no-any-return]
homeassistant/components/apple_tv/media_player.py:270: error: Returning Any from function declared to return "str | None" [no-any-return]
homeassistant/components/apple_tv/media_player.py:293: error: Returning Any from function declared to return "str | None" [no-any-return]
homeassistant/components/apple_tv/media_player.py:300: error: Returning Any from function declared to return "float | None" [no-any-return]
homeassistant/components/apple_tv/media_player.py:307: error: Returning Any from function declared to return "int | None" [no-any-return]
homeassistant/components/apple_tv/media_player.py:314: error: Returning Any from function declared to return "int | None" [no-any-return]
homeassistant/components/apple_tv/media_player.py:364: error: Returning Any from function declared to return "str | None" [no-any-return]
homeassistant/components/apple_tv/media_player.py:385: error: Returning Any from function declared to return "str | None" [no-any-return]
homeassistant/components/apple_tv/media_player.py:392: error: Returning Any from function declared to return "str | None" [no-any-return]
homeassistant/components/apple_tv/media_player.py:399: error: Returning Any from function declared to return "str | None" [no-any-return]
homeassistant/components/apple_tv/media_player.py:406: error: Returning Any from function declared to return "str | None" [no-any-return]
homeassistant/components/apple_tv/media_player.py:441: error: Returning Any from function declared to return "bool | None" [no-any-return]
homeassistant/components/apple_tv/media_player.py:447: error: Returning Any from function declared to return "bool" [no-any-return]
homeassistant/runner.py:176: error: Name "asyncio.DefaultEventLoopPolicy" is not defined [name-defined]
homeassistant/runner.py:176: error: Class cannot subclass "DefaultEventLoopPolicy" (has type "Any") [misc]
homeassistant/runner.py:187: error: Unused "type: ignore[attr-defined]" comment [unused-ignore]
homeassistant/runner.py:284: error: function asyncio.events.set_event_loop_policy is deprecated: Deprecated since Python 3.14; will be removed in Python 3.16. [deprecated]
homeassistant/scripts/auth.py:51: error: function asyncio.events.set_event_loop_policy is deprecated: Deprecated since Python 3.14; will be removed in Python 3.16. [deprecated]
homeassistant/scripts/__init__.py:64: error: function asyncio.events.set_event_loop_policy is deprecated: Deprecated since Python 3.14; will be removed in Python 3.16. [deprecated]
Found 54 errors in 13 files (checked 8626 source files)
/Users/micha/.local/share/uv/python/cpython-3.14.0-macos-aarch64-none/lib/python3.14/importlib/__init__.py:88: UserWarning: Core Pydantic V1 functionality isn't compatible with Python 3.14 or greater.
return _bootstrap._gcd_import(name[level:], package, level)
Warning: unused section(s) in mypy.ini: [mypy-tests.*]

File diff suppressed because it is too large Load Diff

View File

@ -8,13 +8,16 @@ ERROR isort/api.py:575:22-25: `key` may be uninitialized [unbound-name]
ERROR isort/core.py:86:41-48: Argument `tuple[None]` is not assignable to parameter `*iterables` with type `Iterable[str]` in function `itertools.chain.__new__` [bad-argument-type]
ERROR isort/core.py:126:54-61: Argument `tuple[None]` is not assignable to parameter `*iterables` with type `Iterable[str]` in function `itertools.chain.__new__` [bad-argument-type]
ERROR isort/output.py:45:20-51: Expected an iterable, got `tuple[Literal['FUTURE']] | tuple[str, ...]` [not-iterable]
ERROR isort/output.py:494:48-67: Argument `str` is not assignable to parameter `object` with type `LiteralString` in function `list.append` [bad-argument-type]
ERROR isort/output.py:533:38-57: Argument `list[LiteralString]` is not assignable to parameter `from_imports` with type `list[str]` in function `isort.wrap.import_statement` [bad-argument-type]
ERROR isort/output.py:534:34-42: Argument `list[Unknown] | Unknown | None` is not assignable to parameter `comments` with type `Sequence[str]` in function `isort.wrap.import_statement` [bad-argument-type]
ERROR isort/output.py:543:38-57: Argument `list[LiteralString]` is not assignable to parameter `from_imports` with type `list[str]` in function `isort.wrap.import_statement` [bad-argument-type]
ERROR isort/output.py:544:34-42: Argument `list[Unknown] | Unknown | None` is not assignable to parameter `comments` with type `Sequence[str]` in function `isort.wrap.import_statement` [bad-argument-type]
ERROR isort/output.py:551:42-61: Argument `list[LiteralString]` is not assignable to parameter `from_imports` with type `list[str]` in function `isort.wrap.import_statement` [bad-argument-type]
ERROR isort/output.py:552:38-46: Argument `list[Unknown] | Unknown | None` is not assignable to parameter `comments` with type `Sequence[str]` in function `isort.wrap.import_statement` [bad-argument-type]
ERROR isort/place.py:104:31-50: Module `importlib.machinery` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR isort/settings.py:495:40-61: `IMPORT_HEADING_PREFIX` may be uninitialized [unbound-name]
ERROR isort/settings.py:499:40-60: `IMPORT_FOOTER_PREFIX` may be uninitialized [unbound-name]
ERROR isort/settings.py:835:23-27: String literal used as condition. It's equivalent to `True` [redundant-condition]
ERROR isort/sorting.py:121:34-37: Expected a callable, got `None` [not-callable]
INFO Checking project configured at `<CWD>/pyrefly.toml`
INFO 18 errors (18 suppressed)
INFO 21 errors (18 suppressed)

View File

@ -4,7 +4,9 @@ ERROR src/jinja2/compiler.py:222:16-18: Returned type `object` is not assignable
ERROR src/jinja2/compiler.py:1257:27-43: `loop_filter_func` may be uninitialized [unbound-name]
ERROR src/jinja2/compiler.py:1280:31-50: `iteration_indicator` may be uninitialized [unbound-name]
ERROR src/jinja2/compiler.py:1287:34-53: `iteration_indicator` may be uninitialized [unbound-name]
ERROR src/jinja2/compiler.py:1421:18-1423:14: No matching overload found for function `dict.get` called with arguments: (_PassArg | None) [no-matching-overload]
ERROR src/jinja2/compiler.py:1534:17-32: Object of class `Expr` has no attribute `append` [missing-attribute]
ERROR src/jinja2/compiler.py:1813:14-1815:10: No matching overload found for function `dict.get` called with arguments: (_PassArg | None) [no-matching-overload]
ERROR src/jinja2/debug.py:78:6-19: Function declared to return `TracebackType`, but one or more paths are missing an explicit `return` [bad-return]
ERROR src/jinja2/environment.py:352:14-21: Attribute `filters` cannot depend on type variable `V`, which is not in the scope of class `Environment` [invalid-type-var]
ERROR src/jinja2/environment.py:352:14-21: Attribute `filters` cannot depend on type variable `K`, which is not in the scope of class `Environment` [invalid-type-var]
@ -25,6 +27,7 @@ ERROR src/jinja2/environment.py:894:17-25: `zip_file` may be uninitialized [unbo
ERROR src/jinja2/environment.py:928:37-70: `in` is not supported between `str` and `None` [not-iterable]
ERROR src/jinja2/environment.py:1084:38-59: Argument `(Template & Undefined) | (Undefined & list[Template | str]) | str` is not assignable to parameter `name` with type `Template | str` in function `Environment.get_template` [bad-argument-type]
ERROR src/jinja2/environment.py:1251:23-42: `object` is not assignable to `Template` [bad-assignment]
ERROR src/jinja2/environment.py:1496:20-1499:14: Returned type `list[tuple[int, ...]]` is not assignable to declared return type `list[tuple[int, int]]` [bad-return]
ERROR src/jinja2/environment.py:1548:20-39: Instance-only attribute `__name__` of class `TemplateModule` is not visible on the class [missing-attribute]
ERROR src/jinja2/environment.py:1617:35-45: No matching overload found for function `typing.IO.writelines` called with arguments: (Generator[bytes, None, None] | Self@TemplateStream) [no-matching-overload]
ERROR src/jinja2/environment.py:1620:34-40: No matching overload found for function `typing.IO.write` called with arguments: (bytes | str) [no-matching-overload]
@ -36,6 +39,7 @@ ERROR src/jinja2/ext.py:258:36-50: Cannot set item in `dict[str, ((n: int = 5, h
ERROR src/jinja2/ext.py:318:40-320:10: No matching overload found for function `typing.MutableMapping.update` called with arguments: (gettext=((str) -> str) | ((...) -> str), ngettext=((str, str, int) -> str) | ((...) -> str), pgettext=((str, str) -> str) | ((...) -> str) | None, npgettext=((str, str, str, int) -> str) | ((...) -> str) | None) [no-matching-overload]
ERROR src/jinja2/filters.py:40:31-34: Function declared to return `str` but is missing an explicit `return` [bad-return]
ERROR src/jinja2/filters.py:120:13-21: Cannot set item in `list[None]` [unsupported-operation]
ERROR src/jinja2/filters.py:165:56-68: Runtime checkable protocol `Iterable` has an unsafe overlap with type `Iterable[tuple[str, Any]] | Mapping[str, Any]` [invalid-argument]
ERROR src/jinja2/filters.py:169:48-61: `dict_items[tuple[str, Any], Unknown]` is not assignable to `Iterable[tuple[str, Any]]` [bad-assignment]
ERROR src/jinja2/filters.py:308:22-56: Argument `str` is not assignable to parameter `object` with type `LiteralString` in function `list.append` [bad-argument-type]
ERROR src/jinja2/filters.py:730:34-38: `unit` may be uninitialized [unbound-name]
@ -64,4 +68,4 @@ ERROR src/jinja2/sandbox.py:244:33-43: Cannot set item in `dict[str, ((n: int =
ERROR src/jinja2/utils.py:271:16-39: `>` is not supported between `int` and `None` [unsupported-operation]
ERROR src/jinja2/utils.py:431:2-29: Class `MutableMapping` has no class attribute `register` [missing-attribute]
INFO Checking project configured at `<CWD>/pyrefly.toml`
INFO 65 errors (80 suppressed)
INFO 69 errors (77 suppressed)

View File

@ -1,9 +1,11 @@
pandas-stubs/_libs/missing.pyi:120:9: error[invalid-method-override] Invalid override of method `__eq__`: Definition is incompatible with `object.__eq__`
pandas-stubs/_libs/missing.pyi:130:9: error[invalid-method-override] Invalid override of method `__ne__`: Definition is incompatible with `object.__ne__`
pandas-stubs/_typing.pyi:861:36: error[invalid-type-arguments] Type `typing.TypeVar` is not assignable to upper bound `tuple[int, ...]` of type variable `_ShapeT_co@ndarray`
pandas-stubs/_typing.pyi:861:53: error[invalid-type-arguments] Type `typing.TypeVar` is not assignable to upper bound `generic[Any]` of type variable `_SCT_co@dtype`
pandas-stubs/_typing.pyi:865:57: error[invalid-type-arguments] Type `typing.TypeVar` is not assignable to upper bound `generic[Any]` of type variable `_SCT_co@dtype`
pandas-stubs/_typing.pyi:877:62: error[invalid-type-arguments] Type `typing.TypeVar` is not assignable to upper bound `generic[Any]` of type variable `_SCT_co@dtype`
pandas-stubs/_libs/tslibs/timedeltas.pyi:262:9: error[invalid-method-override] Invalid override of method `__truediv__`: Definition is incompatible with `timedelta.__truediv__`
pandas-stubs/_libs/tslibs/timestamps.pyi:183:9: error[invalid-method-override] Invalid override of method `__le__`: Definition is incompatible with `date.__le__`
pandas-stubs/_libs/tslibs/timestamps.pyi:193:9: error[invalid-method-override] Invalid override of method `__lt__`: Definition is incompatible with `date.__lt__`
pandas-stubs/_libs/tslibs/timestamps.pyi:203:9: error[invalid-method-override] Invalid override of method `__ge__`: Definition is incompatible with `date.__ge__`
pandas-stubs/_libs/tslibs/timestamps.pyi:213:9: error[invalid-method-override] Invalid override of method `__gt__`: Definition is incompatible with `date.__gt__`
pandas-stubs/_libs/tslibs/timestamps.pyi:239:9: error[invalid-method-override] Invalid override of method `__sub__`: Definition is incompatible with `date.__sub__`
pandas-stubs/core/arrays/categorical.pyi:114:9: error[invalid-method-override] Invalid override of method `__contains__`: Definition is incompatible with `ExtensionArray.__contains__`
pandas-stubs/core/arrays/categorical.pyi:118:9: error[invalid-method-override] Invalid override of method `__getitem__`: Definition is incompatible with `ExtensionArray.__getitem__`
pandas-stubs/core/arrays/datetimelike.pyi:76:9: error[invalid-method-override] Invalid override of method `__getitem__`: Definition is incompatible with `ExtensionArray.__getitem__`
@ -17,33 +19,38 @@ pandas-stubs/core/frame.pyi:320:9: error[invalid-method-override] Invalid overri
pandas-stubs/core/frame.pyi:321:9: error[invalid-method-override] Invalid override of method `__setitem__`: Definition is incompatible with `_ScalarAccessIndexer.__setitem__`
pandas-stubs/core/frame.pyi:328:9: error[invalid-method-override] Invalid override of method `__getitem__`: Definition is incompatible with `_ScalarAccessIndexer.__getitem__`
pandas-stubs/core/frame.pyi:339:9: error[invalid-method-override] Invalid override of method `__setitem__`: Definition is incompatible with `_ScalarAccessIndexer.__setitem__`
pandas-stubs/core/groupby/generic.pyi:208:9: error[override-of-final-method] Cannot override final member `__iter__` from superclass `BaseGroupBy`
pandas-stubs/core/groupby/generic.pyi:247:9: error[invalid-method-override] Invalid override of method `apply`: Definition is incompatible with `GroupBy.apply`
pandas-stubs/core/groupby/generic.pyi:300:9: error[invalid-method-override] Invalid override of method `__getitem__`: Definition is incompatible with `BaseGroupBy.__getitem__`
pandas-stubs/core/groupby/generic.pyi:452:9: error[invalid-method-override] Invalid override of method `__getattr__`: Definition is incompatible with `GroupBy.__getattr__`
pandas-stubs/core/groupby/groupby.pyi:74:35: error[invalid-type-arguments] Type `typing.TypeVar` is not assignable to upper bound `NDFrame` of type variable `NDFrameT@DatetimeIndexResamplerGroupby`
pandas-stubs/core/groupby/groupby.pyi:75:35: error[invalid-type-arguments] Type `typing.TypeVar` is not assignable to upper bound `NDFrame` of type variable `NDFrameT@PeriodIndexResamplerGroupby`
pandas-stubs/core/groupby/groupby.pyi:76:38: error[invalid-type-arguments] Type `typing.TypeVar` is not assignable to upper bound `NDFrame` of type variable `NDFrameT@TimedeltaIndexResamplerGroupby`
pandas-stubs/core/groupby/generic.pyi:456:9: error[override-of-final-method] Cannot override final member `__iter__` from superclass `BaseGroupBy`
pandas-stubs/core/indexes/datetimes.pyi:76:9: error[invalid-method-override] Invalid override of method `__sub__`: Definition is incompatible with `Index.__sub__`
pandas-stubs/core/indexes/interval.pyi:242:9: error[invalid-method-override] Invalid override of method `__getitem__`: Definition is incompatible with `Index.__getitem__`
pandas-stubs/core/indexes/interval.pyi:250:9: error[invalid-method-override] Invalid override of method `__gt__`: Definition is incompatible with `Index.__gt__`
pandas-stubs/core/indexes/interval.pyi:258:9: error[invalid-method-override] Invalid override of method `__ge__`: Definition is incompatible with `Index.__ge__`
pandas-stubs/core/indexes/interval.pyi:266:9: error[invalid-method-override] Invalid override of method `__le__`: Definition is incompatible with `Index.__le__`
pandas-stubs/core/indexes/interval.pyi:274:9: error[invalid-method-override] Invalid override of method `__lt__`: Definition is incompatible with `Index.__lt__`
pandas-stubs/core/indexes/interval.pyi:282:9: error[invalid-method-override] Invalid override of method `__eq__`: Definition is incompatible with `OpsMixin.__eq__`
pandas-stubs/core/indexes/interval.pyi:290:9: error[invalid-method-override] Invalid override of method `__ne__`: Definition is incompatible with `OpsMixin.__ne__`
pandas-stubs/core/indexes/interval.pyi:282:9: error[invalid-method-override] Invalid override of method `__eq__`: Definition is incompatible with `Index.__eq__`
pandas-stubs/core/indexes/interval.pyi:290:9: error[invalid-method-override] Invalid override of method `__ne__`: Definition is incompatible with `Index.__ne__`
pandas-stubs/core/indexes/multi.pyi:132:9: error[invalid-method-override] Invalid override of method `__getitem__`: Definition is incompatible with `Index.__getitem__`
pandas-stubs/core/indexes/period.pyi:57:9: error[invalid-method-override] Invalid override of method `__sub__`: Definition is incompatible with `Index.__sub__`
pandas-stubs/core/indexes/period.pyi:66:9: error[invalid-method-override] Invalid override of method `__rsub__`: Definition is incompatible with `Index.__rsub__`
pandas-stubs/core/indexes/range.pyi:84:9: error[invalid-method-override] Invalid override of method `__getitem__`: Definition is incompatible with `Index.__getitem__`
pandas-stubs/core/indexes/timedeltas.pyi:77:9: error[invalid-method-override] Invalid override of method `__add__`: Definition is incompatible with `Index.__add__`
pandas-stubs/core/indexes/timedeltas.pyi:86:9: error[invalid-method-override] Invalid override of method `__radd__`: Definition is incompatible with `Index.__radd__`
pandas-stubs/core/indexes/timedeltas.pyi:98:9: error[invalid-method-override] Invalid override of method `__rsub__`: Definition is incompatible with `Index.__rsub__`
pandas-stubs/core/indexes/timedeltas.pyi:104:9: error[invalid-method-override] Invalid override of method `__mul__`: Definition is incompatible with `Index.__mul__`
pandas-stubs/core/indexes/timedeltas.pyi:108:9: error[invalid-method-override] Invalid override of method `__rmul__`: Definition is incompatible with `Index.__rmul__`
pandas-stubs/core/indexes/timedeltas.pyi:120:9: error[invalid-method-override] Invalid override of method `__truediv__`: Definition is incompatible with `Index.__truediv__`
pandas-stubs/core/indexes/timedeltas.pyi:128:9: error[invalid-method-override] Invalid override of method `__rtruediv__`: Definition is incompatible with `Index.__rtruediv__`
pandas-stubs/core/indexes/timedeltas.pyi:138:9: error[invalid-method-override] Invalid override of method `__floordiv__`: Definition is incompatible with `Index.__floordiv__`
pandas-stubs/core/indexes/timedeltas.pyi:146:9: error[invalid-method-override] Invalid override of method `__rfloordiv__`: Definition is incompatible with `Index.__rfloordiv__`
pandas-stubs/core/series.pyi:274:9: error[invalid-method-override] Invalid override of method `__getitem__`: Definition is incompatible with `_LocationIndexer.__getitem__`
pandas-stubs/core/series.pyi:283:9: error[invalid-method-override] Invalid override of method `__setitem__`: Definition is incompatible with `_NDFrameIndexer.__setitem__`
pandas-stubs/core/series.pyi:300:9: error[invalid-method-override] Invalid override of method `__getitem__`: Definition is incompatible with `_LocationIndexer.__getitem__`
pandas-stubs/core/series.pyi:330:9: error[invalid-method-override] Invalid override of method `__setitem__`: Definition is incompatible with `_NDFrameIndexer.__setitem__`
pandas-stubs/core/series.pyi:338:71: error[invalid-type-arguments] Type `typing.TypeVar` is not assignable to upper bound `str | bytes | int | ... omitted 12 union elements` of type variable `S1@IndexOpsMixin`
pandas-stubs/core/series.pyi:4630:9: error[invalid-method-override] Invalid override of method `xs`: Definition is incompatible with `NDFrame.xs`
pandas-stubs/io/excel/_base.pyi:16:6: error[unresolved-import] Cannot resolve imported module `openpyxl.workbook.workbook`
pandas-stubs/io/excel/_base.pyi:20:6: error[unresolved-import] Cannot resolve imported module `xlrd.book`
Found 47 diagnostics
Found 54 diagnostics
WARN Ignoring the `tool.ty` section in `<CWD>/pyproject.toml` because `<CWD>/ty.toml` takes precedence.

View File

@ -50,6 +50,7 @@ ERROR pandas/core/_numba/kernels/mean_.py:135:21-47: `num_consecutive_same_value
ERROR pandas/core/_numba/kernels/mean_.py:136:21-31: `prev_value` is uninitialized [unbound-name]
ERROR pandas/core/_numba/kernels/mean_.py:141:16-42: `num_consecutive_same_value` may be uninitialized [unbound-name]
ERROR pandas/core/_numba/kernels/mean_.py:142:26-36: `prev_value` may be uninitialized [unbound-name]
ERROR pandas/core/_numba/kernels/min_max_.py:109:17-110:37: `int` is not assignable to `int` (caused by inconsistent types when breaking cycles) [bad-assignment]
ERROR pandas/core/_numba/kernels/sum_.py:135:21-47: `num_consecutive_same_value` is uninitialized [unbound-name]
ERROR pandas/core/_numba/kernels/sum_.py:136:21-31: `prev_value` is uninitialized [unbound-name]
ERROR pandas/core/_numba/kernels/sum_.py:142:16-42: `num_consecutive_same_value` may be uninitialized [unbound-name]
@ -75,12 +76,13 @@ ERROR pandas/core/algorithms.py:587:18-31: Object of class `SequenceNotStr` has
Object of class `range` has no attribute `astype` [missing-attribute]
ERROR pandas/core/algorithms.py:591:27-33: Argument `ExtensionArray | Index | SequenceNotStr[Unknown] | Series | ndarray[tuple[Any, ...], dtype[Any]] | range | Unknown` is not assignable to parameter `values` with type `ndarray[tuple[Any, ...], dtype[Any]]` in function `pandas._libs.hashtable.ismember` [bad-argument-type]
ERROR pandas/core/algorithms.py:855:32-67: `ExtensionArray | Index | Series | ndarray[tuple[Any, ...], dtype[Any]] | Unknown` is not assignable to upper bound `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]` of type variable `ArrayLikeT` [bad-specialization]
ERROR pandas/core/algorithms.py:857:12-26: Returned type `tuple[ndarray[tuple[Any, ...], dtype[signedinteger[_32Bit | _64Bit]]] | ndarray[tuple[Any, ...], dtype[Any]] | Unknown, ExtensionArray | Index | Series | ndarray[tuple[Any, ...], dtype[Any]] | Unknown]` is not assignable to declared return type `tuple[ndarray[tuple[Any, ...], dtype[Any]], Index | ndarray[tuple[Any, ...], dtype[Any]]]` [bad-return]
ERROR pandas/core/algorithms.py:857:12-26: Returned type `tuple[ndarray[tuple[Any, ...], dtype[signedinteger[_NBitIntP]]] | ndarray[tuple[Any, ...], dtype[Any]] | Unknown, ExtensionArray | Index | Series | ndarray[tuple[Any, ...], dtype[Any]] | Unknown]` is not assignable to declared return type `tuple[ndarray[tuple[Any, ...], dtype[Any]], Index | ndarray[tuple[Any, ...], dtype[Any]]]` [bad-return]
ERROR pandas/core/algorithms.py:930:54-60: Argument `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]` is not assignable to parameter `values` with type `ndarray[tuple[Any, ...], dtype[Any]]` in function `value_counts_arraylike` [bad-argument-type]
ERROR pandas/core/algorithms.py:951:36-57: No matching overload found for function `pandas.core.frame.DataFrame.sort_values` called with arguments: (ascending=bool) [no-matching-overload]
ERROR pandas/core/algorithms.py:954:27-37: Object of class `DatetimeArray` has no attribute `sum`
Object of class `PeriodArray` has no attribute `sum` [missing-attribute]
ERROR pandas/core/algorithms.py:956:12-18: Returned type `DataFrame | Series | Unknown` is not assignable to declared return type `Series` [bad-return]
ERROR pandas/core/algorithms.py:1235:25-1241:10: No matching overload found for function `pandas.core.array_algos.take.take_nd` called with arguments: (ExtensionArray | Index | NumpyExtensionArray | Series | ndarray[tuple[Any, ...], dtype[Any]], ndarray[tuple[Any, ...], dtype[signedinteger[_NBitIntP]]], axis=int, allow_fill=Literal[True], fill_value=Unknown | None) [no-matching-overload]
ERROR pandas/core/apply.py:197:52-58: Expected argument after ** to be a mapping, got: Unknown | None in function `reconstruct_func` [bad-unpacking]
ERROR pandas/core/apply.py:210:12-17: `klass` may be uninitialized [unbound-name]
ERROR pandas/core/apply.py:379:57-60: Argument `(BaseWindow & NDFrame) | (DataFrameGroupBy & NDFrame) | (GroupBy[Unknown] & NDFrame) | (NDFrame & Resampler) | (NDFrame & SeriesGroupBy) | DataFrame | Series` is not assignable to parameter `obj` with type `DataFrame | Series` in function `Apply.normalize_dictlike_arg` [bad-argument-type]
@ -91,8 +93,10 @@ ERROR pandas/core/apply.py:1152:42-45: Argument `object` is not assignable to pa
ERROR pandas/core/apply.py:1477:5-8: Class member `SeriesApply.obj` overrides parent class `NDFrameApply` in an inconsistent manner [bad-override]
ERROR pandas/core/apply.py:1589:5-8: Class member `GroupByApply.obj` overrides parent class `Apply` in an inconsistent manner [bad-override]
ERROR pandas/core/apply.py:1684:5-8: Class member `ResamplerWindowApply.obj` overrides parent class `GroupByApply` in an inconsistent manner [bad-override]
ERROR pandas/core/apply.py:1794:12-44: Returned type `tuple[bool, ((...) -> Unknown) | MutableMapping[Hashable, ((...) -> Unknown) | list[((...) -> Unknown) | str] | str] | MutableMapping[Hashable, list[((...) -> Unknown) | str]] | list[((...) -> Unknown) | str] | str, tuple[str, ...] | None, ndarray[tuple[Any, ...], dtype[signedinteger[_32Bit | _64Bit]]] | None]` is not assignable to declared return type `tuple[bool, ((...) -> Unknown) | MutableMapping[Hashable, ((...) -> Unknown) | list[((...) -> Unknown) | str] | str] | list[((...) -> Unknown) | str] | str, tuple[str, ...] | None, ndarray[tuple[Any, ...], dtype[signedinteger[_32Bit | _64Bit]]] | None]` [bad-return]
ERROR pandas/core/apply.py:2000:49-53: Argument `((...) -> Unknown) | MutableMapping[Hashable, ((...) -> Unknown) | list[((...) -> Unknown) | str] | str] | list[((...) -> Unknown) | str] | str` is not assignable to parameter `func` with type `dict[str, list[((...) -> Unknown) | str]]` in function `relabel_result` [bad-argument-type]
ERROR pandas/core/apply.py:1794:12-44: Returned type `tuple[bool, ((...) -> Unknown) | MutableMapping[Hashable, ((...) -> Unknown) | list[AggFuncTypeBase] | str] | MutableMapping[Hashable, list[AggFuncTypeBase]] | list[AggFuncTypeBase] | str, tuple[str, ...] | None, ndarray[tuple[Any, ...], dtype[signedinteger[_NBitIntP]]] | None]` is not assignable to declared return type `tuple[bool, AggFuncType, tuple[str, ...] | None, ndarray[tuple[Any, ...], dtype[signedinteger[_NBitIntP]]] | None]` [bad-return]
ERROR pandas/core/apply.py:2000:49-53: Argument `((...) -> Unknown) | MutableMapping[Hashable, ((...) -> Unknown) | list[AggFuncTypeBase] | str] | list[AggFuncTypeBase] | str` is not assignable to parameter `func` with type `dict[str, list[((...) -> Unknown) | str]]` in function `relabel_result` [bad-argument-type]
ERROR pandas/core/array_algos/quantile.py:145:23-152:6: No matching overload found for function `numpy.lib._function_base_impl.quantile` called with arguments: (ndarray[tuple[Any, ...], dtype[Any]], ndarray[tuple[Any, ...], dtype[float64]], method=str) [no-matching-overload]
ERROR pandas/core/array_algos/quantile.py:218:27-226:10: No matching overload found for function `numpy.lib._function_base_impl.quantile` called with arguments: (ndarray[tuple[Any, ...], dtype[Any]], ndarray[tuple[Any, ...], dtype[float64]], axis=Literal[1], method=str) [no-matching-overload]
ERROR pandas/core/array_algos/take.py:244:8-12: `func` may be uninitialized [unbound-name]
ERROR pandas/core/array_algos/take.py:245:16-20: `func` may be uninitialized [unbound-name]
ERROR pandas/core/array_algos/take.py:258:8-12: `func` may be uninitialized [unbound-name]
@ -359,6 +363,7 @@ ERROR pandas/core/arrays/arrow/array.py:3084:18-35: No attribute `floor_temporal
ERROR pandas/core/arrays/arrow/array.py:3088:18-29: No attribute `strftime` in module `pyarrow.compute` [missing-attribute]
ERROR pandas/core/arrays/arrow/array.py:3156:18-29: No attribute `strftime` in module `pyarrow.compute` [missing-attribute]
ERROR pandas/core/arrays/arrow/array.py:3162:18-29: No attribute `strftime` in module `pyarrow.compute` [missing-attribute]
ERROR pandas/core/arrays/arrow/array.py:3190:14-3193:10: No matching overload found for function `dict.get` called with arguments: (Literal['NaT', 'raise', 'shift_backward', 'shift_forward'] | timedelta, None) [no-matching-overload]
ERROR pandas/core/arrays/arrow/array.py:3197:22-40: No attribute `local_timestamp` in module `pyarrow.compute` [missing-attribute]
ERROR pandas/core/arrays/arrow/array.py:3199:22-40: No attribute `assume_timezone` in module `pyarrow.compute` [missing-attribute]
ERROR pandas/core/arrays/arrow/extension_types.py:171:5-30: No attribute `_hotfix_installed` in module `pyarrow` [missing-attribute]
@ -447,7 +452,7 @@ ERROR pandas/core/arrays/interval.py:401:35-68: Object of class `ExtensionArray`
Object of class `ndarray` has no attribute `_ensure_matching_resos` [missing-attribute]
ERROR pandas/core/arrays/interval.py:417:21-56: Object of class `ExtensionArray` has no attribute `base` [missing-attribute]
ERROR pandas/core/arrays/interval.py:419:21-56: Object of class `ExtensionArray` has no attribute `base` [missing-attribute]
ERROR pandas/core/arrays/interval.py:438:16-34: Returned type `tuple[ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]], ArrowExtensionArray | ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]], IntervalDtype]` is not assignable to declared return type `tuple[DatetimeArray | TimedeltaArray | ndarray[tuple[Any, ...], dtype[Any]], DatetimeArray | TimedeltaArray | ndarray[tuple[Any, ...], dtype[Any]], IntervalDtype]` [bad-return]
ERROR pandas/core/arrays/interval.py:438:16-34: Returned type `tuple[ArrayLike, ArrowExtensionArray | ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]], IntervalDtype]` is not assignable to declared return type `tuple[IntervalSide, IntervalSide, IntervalDtype]` [bad-return]
ERROR pandas/core/arrays/interval.py:826:9-20: Class member `IntervalArray.__getitem__` overrides parent class `ExtensionArray` in an inconsistent manner [bad-param-name-override]
ERROR pandas/core/arrays/interval.py:841:20-24: Argument `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]` is not assignable to parameter `a` with type `_Buffer | _NestedSequence[bytes | complex | str] | _NestedSequence[_SupportsArray[dtype[Any]]] | _SupportsArray[dtype[Any]] | bytes | complex | str` in function `numpy._core.fromnumeric.ndim` [bad-argument-type]
ERROR pandas/core/arrays/interval.py:887:27-43: Object of class `ExtensionArray` has no attribute `categories` [missing-attribute]
@ -507,11 +512,12 @@ ERROR pandas/core/arrays/sparse/accessor.py:430:34-53: Object of class `NoneType
ERROR pandas/core/arrays/sparse/accessor.py:435:40-58: Object of class `NoneType` has no attribute `items` [missing-attribute]
ERROR pandas/core/arrays/sparse/accessor.py:446:67-85: Object of class `NoneType` has no attribute `shape` [missing-attribute]
ERROR pandas/core/arrays/sparse/accessor.py:464:62-80: Object of class `NoneType` has no attribute `items` [missing-attribute]
ERROR pandas/core/arrays/sparse/array.py:464:39-467:14: No matching overload found for function `numpy._core.multiarray.asarray` called with arguments: (ndarray[tuple[Any, ...], dtype[Any]], dtype=ExtensionDtype | dtype[object_ | Any] | dtype[Any] | None) [no-matching-overload]
ERROR pandas/core/arrays/sparse/array.py:514:9-26: Object of class `object` has no attribute `_sparse_index` [missing-attribute]
ERROR pandas/core/arrays/sparse/array.py:515:9-27: Object of class `object` has no attribute `_sparse_values` [missing-attribute]
ERROR pandas/core/arrays/sparse/array.py:516:9-19: Object of class `object` has no attribute `_dtype` [missing-attribute]
ERROR pandas/core/arrays/sparse/array.py:517:16-19: Returned type `object` is not assignable to declared return type `Self@SparseArray` [bad-return]
ERROR pandas/core/arrays/sparse/array.py:844:34-44: Argument `object | Unknown | None` is not assignable to parameter `*arrays_and_dtypes` with type `_Buffer | _NestedSequence[bytes | complex | str] | _NestedSequence[_SupportsArray[dtype[Any]]] | _SupportsArray[dtype[Any]] | _SupportsDType[dtype[Any]] | bytes | complex | dtype[Any] | list[Any] | str | TypedDict[_DTypeDict] | tuple[Any, Any] | type[Any] | None` in function `numpy._core.multiarray.result_type` [bad-argument-type]
ERROR pandas/core/arrays/sparse/array.py:844:34-44: Argument `object | Unknown | None` is not assignable to parameter `*arrays_and_dtypes` with type `_Buffer | _NestedSequence[bytes | complex | str] | _NestedSequence[_SupportsArray[dtype[Any]]] | _SupportsArray[dtype[Any]] | _SupportsDType[dtype[Any]] | bytes | complex | dtype[Any] | list[Any] | str | _DTypeDict | tuple[Any, Any] | type[Any] | None` in function `numpy._core.multiarray.result_type` [bad-argument-type]
ERROR pandas/core/arrays/sparse/array.py:948:16-24: Object of class `ExtensionArray` has no attribute `any` [missing-attribute]
ERROR pandas/core/arrays/sparse/array.py:949:17-29: Cannot index into `ndarray[tuple[Any, ...], dtype[signedinteger[_64Bit]]]` [bad-index]
ERROR pandas/core/arrays/sparse/array.py:949:17-29: Cannot set item in `ndarray[tuple[Any, ...], dtype[signedinteger[_64Bit]]]` [unsupported-operation]
@ -577,7 +583,7 @@ ERROR pandas/core/computation/align.py:210:20-23: Expected 0 positional argument
ERROR pandas/core/computation/align.py:210:25-30: Unexpected keyword argument `dtype` in function `object.__init__` [unexpected-keyword]
ERROR pandas/core/computation/align.py:210:38-42: Unexpected keyword argument `name` in function `object.__init__` [unexpected-keyword]
ERROR pandas/core/computation/eval.py:175:35-38: `msg` may be uninitialized [unbound-name]
ERROR pandas/core/computation/expr.py:172:9-173:41: Argument `Generator[object, None, None]` is not assignable to parameter `iterable` with type `Iterable[Sequence[int | str | tuple[int, int]] | TokenInfo]` in function `tokenize.untokenize` [bad-argument-type]
ERROR pandas/core/computation/expr.py:172:9-173:41: Argument `Generator[object, None, None]` is not assignable to parameter `iterable` with type `Iterable[_Token]` in function `tokenize.untokenize` [bad-argument-type]
ERROR pandas/core/computation/expr.py:241:22-250:18: `-` is not supported between `UnionType` and `frozenset[str]` [unsupported-operation]
ERROR pandas/core/computation/expr.py:241:22-250:18: `-` is not supported between `type` and `frozenset[str]` [unsupported-operation]
ERROR pandas/core/computation/expr.py:635:25-60: `str | Any | Unknown` is not assignable to attribute `assigner` with type `None` [bad-assignment]
@ -607,13 +613,14 @@ ERROR pandas/core/dtypes/cast.py:407:16-36: Returned type `ndarray[tuple[Any, ..
ERROR pandas/core/dtypes/cast.py:409:16-37: Returned type `ndarray[tuple[Any, ...], dtype[unsignedinteger[_64Bit]]] | Unknown` is not assignable to declared return type `NumpyIndexT` [bad-return]
ERROR pandas/core/dtypes/cast.py:411:16-38: Returned type `ndarray[tuple[Any, ...], dtype[float64]] | Unknown` is not assignable to declared return type `NumpyIndexT` [bad-return]
ERROR pandas/core/dtypes/cast.py:500:42-46: Argument `float | Unknown | None` is not assignable to parameter `dtype` with type `_SupportsDType[dtype[datetime64[date | int | None]]] | _SupportsDType[dtype[timedelta64[int | timedelta | None]]] | dtype[datetime64[date | int | None]] | dtype[timedelta64[int | timedelta | None]] | str | type[datetime64[date | int | None]] | type[timedelta64[int | timedelta | None]]` in function `numpy._core.multiarray.datetime_data` [bad-argument-type]
ERROR pandas/core/dtypes/cast.py:866:25-869:6: `-` is not supported between `set[DtypeObj]` and `set[type[bytes_] | type[str_]]` [unsupported-operation]
ERROR pandas/core/dtypes/common.py:1681:28-45: Object of class `type` has no attribute `type` [missing-attribute]
ERROR pandas/core/dtypes/dtypes.py:329:35-47: Object of class `NoneType` has no attribute `dtype` [missing-attribute]
ERROR pandas/core/dtypes/dtypes.py:343:21-33: Object of class `NoneType` has no attribute `dtype` [missing-attribute]
ERROR pandas/core/dtypes/dtypes.py:344:17-29: Object of class `NoneType` has no attribute `dtype` [missing-attribute]
ERROR pandas/core/dtypes/dtypes.py:651:16-32: Returned type `Index | None` is not assignable to declared return type `Index` [bad-return]
ERROR pandas/core/dtypes/dtypes.py:806:43-45: Argument `tzinfo | None` is not assignable to parameter `tz` with type `tzinfo` in function `pandas._libs.tslibs.timezones.tz_standardize` [bad-argument-type]
ERROR pandas/core/dtypes/dtypes.py:972:30-88: No matching overload found for function `numpy._core.fromnumeric.amax` called with arguments: (list[ExtensionDtype | dtype[Any]]) [no-matching-overload]
ERROR pandas/core/dtypes/dtypes.py:972:30-88: No matching overload found for function `numpy._core.fromnumeric.amax` called with arguments: (list[DtypeObj]) [no-matching-overload]
ERROR pandas/core/dtypes/dtypes.py:1063:26-49: Object of class `BaseOffset` has no attribute `_period_dtype_code` [missing-attribute]
ERROR pandas/core/dtypes/dtypes.py:1066:9-16: Object of class `PeriodDtypeBase` has no attribute `_freq` [missing-attribute]
ERROR pandas/core/dtypes/dtypes.py:1067:16-17: Returned type `PeriodDtypeBase` is not assignable to declared return type `PeriodDtype` [bad-return]
@ -627,6 +634,7 @@ ERROR pandas/core/frame.py:1678:17-21: Expected string literal "itertuple" [inva
ERROR pandas/core/frame.py:2055:9-16: Overload return type `dict[Unknown, Unknown]` is not assignable to implementation return type `list[type[dict[Unknown, Unknown]]] | type[dict[Unknown, Unknown]]` [inconsistent-overload]
ERROR pandas/core/frame.py:2064:9-16: Overload return type `list[dict[Unknown, Unknown]]` is not assignable to implementation return type `list[type[dict[Unknown, Unknown]]] | type[dict[Unknown, Unknown]]` [inconsistent-overload]
ERROR pandas/core/frame.py:2185:16-61: Returned type `MutableMapping[Unknown, Unknown] | list[MutableMappingT]` is not assignable to declared return type `list[MutableMappingT] | MutableMappingT` [bad-return]
ERROR pandas/core/frame.py:2358:62-2361:26: No matching overload found for function `pandas._libs.lib.maybe_convert_objects` called with arguments: (ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]], try_float=Literal[True]) [no-matching-overload]
ERROR pandas/core/frame.py:2541:20-41: `in` is not supported between `Hashable` and `None` [not-iterable]
ERROR pandas/core/frame.py:2541:20-41: `in` is not supported between `str` and `None` [not-iterable]
ERROR pandas/core/frame.py:2541:20-41: `in` is not supported between `Unknown` and `None` [not-iterable]
@ -642,7 +650,7 @@ ERROR pandas/core/frame.py:7245:9-20: Class member `DataFrame.sort_values` overr
ERROR pandas/core/frame.py:10189:37-42: Argument `list[Hashable]` is not assignable to parameter `level` with type `list[int]` in function `pandas.core.reshape.reshape.stack_v3` [bad-argument-type]
ERROR pandas/core/frame.py:10624:42-49: Argument `int | integer[Any]` is not assignable to parameter `periods` with type `Sequence[int] | int` in function `DataFrame.shift` [bad-argument-type]
ERROR pandas/core/frame.py:10628:37-44: Argument `int | integer[Any]` is not assignable to parameter `n` with type `int` in function `pandas.core.internals.managers.BaseBlockManager.diff` [bad-argument-type]
ERROR pandas/core/frame.py:10732:37-41: Argument `Unknown | None` is not assignable to parameter `func` with type `((...) -> Unknown) | MutableMapping[Hashable, ((...) -> Unknown) | list[((...) -> Unknown) | str] | str] | list[((...) -> Unknown) | str] | str` in function `pandas.core.apply.frame_apply` [bad-argument-type]
ERROR pandas/core/frame.py:10732:37-41: Argument `Unknown | None` is not assignable to parameter `func` with type `((...) -> Unknown) | MutableMapping[Hashable, ((...) -> Unknown) | list[AggFuncTypeBase] | str] | list[AggFuncTypeBase] | str` in function `pandas.core.apply.frame_apply` [bad-argument-type]
ERROR pandas/core/frame.py:11426:20-26: Returned type `DataFrame | Series` is not assignable to declared return type `DataFrame` [bad-return]
ERROR pandas/core/frame.py:12132:24-35: Object of class `ndarray` has no attribute `_reduce` [missing-attribute]
ERROR pandas/core/frame.py:12227:9-12: Class member `DataFrame.any` overrides parent class `NDFrame` in an inconsistent manner [bad-override]
@ -663,6 +671,7 @@ ERROR pandas/core/frame.py:13335:9-15: Class member `DataFrame.cumsum` overrides
ERROR pandas/core/frame.py:13344:16-67: Returned type `NDFrame` is not assignable to declared return type `Self@DataFrame` [bad-return]
ERROR pandas/core/frame.py:13347:9-16: Class member `DataFrame.cumprod` overrides parent class `NDFrame` in an inconsistent manner [bad-override]
ERROR pandas/core/frame.py:13356:16-68: Returned type `NDFrame` is not assignable to declared return type `Self@DataFrame` [bad-return]
ERROR pandas/core/frame.py:13843:35-13849:14: No matching overload found for function `DataFrame.quantile` called with arguments: (list[ExtensionArray | Index | Sequence[float] | Series | float | ndarray[tuple[Any, ...], dtype[Any]]], axis=int, numeric_only=bool, interpolation=Literal['higher', 'linear', 'lower', 'midpoint', 'nearest'], method=Literal['single', 'table']) [no-matching-overload]
ERROR pandas/core/frame.py:13917:45-48: `res` may be uninitialized [unbound-name]
ERROR pandas/core/frame.py:13917:55-58: `res` may be uninitialized [unbound-name]
ERROR pandas/core/frame.py:14223:5-22: Class member `DataFrame._info_axis_number` overrides parent class `NDFrame` in an inconsistent manner [bad-override]
@ -687,8 +696,9 @@ ERROR pandas/core/generic.py:7655:30-40: Argument `Unknown | None` is not assign
ERROR pandas/core/generic.py:7658:27-32: Argument `builtins.bool | numpy.bool[builtins.bool]` is not assignable to parameter `regex` with type `builtins.bool` in function `pandas.core.internals.managers.BaseBlockManager.replace_list` [bad-argument-type]
ERROR pandas/core/generic.py:7686:46-51: Argument `builtins.bool | numpy.bool[builtins.bool]` is not assignable to parameter `regex` with type `builtins.bool` in function `pandas.core.array_algos.replace.should_use_regex` [bad-argument-type]
WARN pandas/core/generic.py:8122:28-44: Redundant cast: `Series` is the same type as `Series` [redundant-cast]
ERROR pandas/core/generic.py:9489:22-9493:10: No matching overload found for function `pandas.core.reshape.concat.concat` called with arguments: (list[NDFrame | Unknown | Self@NDFrame], axis=int | Unknown, keys=tuple[*Sequence[str | None]]) [no-matching-overload]
ERROR pandas/core/generic.py:9956:64-72: `res_cols` may be uninitialized [unbound-name]
ERROR pandas/core/groupby/generic.py:1133:17-22: Argument `list[ndarray[tuple[int], dtype[Unknown]] | ndarray[tuple[Any, ...], dtype[Any]] | ndarray[tuple[Any, ...], dtype[Unknown]]]` is not assignable to parameter `right_keys` with type `list[ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]]` in function `pandas.core.reshape.merge.get_join_indexers` [bad-argument-type]
ERROR pandas/core/groupby/generic.py:1133:17-22: Argument `list[ndarray[tuple[int], dtype[Unknown]] | ndarray[tuple[Any, ...], dtype[Any]] | ndarray[tuple[Any, ...], dtype[Unknown]]]` is not assignable to parameter `right_keys` with type `list[ArrayLike]` in function `pandas.core.reshape.merge.get_join_indexers` [bad-argument-type]
ERROR pandas/core/groupby/generic.py:2258:19-23: `path` may be uninitialized [unbound-name]
ERROR pandas/core/groupby/groupby.py:712:24-49: `NDFrameT` is not subscriptable [unsupported-operation]
ERROR pandas/core/groupby/groupby.py:770:24-53: No matching overload found for function `pandas.core.common.pipe` called with arguments: (Self@BaseGroupBy, ((Self@BaseGroupBy, ParamSpec(P)) -> T) | tuple[(...) -> T, str], *tuple[Any, ...], **dict[str, Any]) [no-matching-overload]
@ -703,7 +713,7 @@ ERROR pandas/core/groupby/grouper.py:369:28-36: `NDFrameT` is not subscriptable
ERROR pandas/core/groupby/grouper.py:656:47-54: `na_code` may be uninitialized [unbound-name]
ERROR pandas/core/groupby/grouper.py:657:34-41: `na_mask` may be uninitialized [unbound-name]
ERROR pandas/core/groupby/grouper.py:657:43-50: `na_code` may be uninitialized [unbound-name]
ERROR pandas/core/groupby/grouper.py:678:16-30: Returned type `tuple[ndarray[tuple[Any, ...], dtype[signedinteger[_32Bit | _64Bit]]] | ndarray[tuple[Any, ...], dtype[Any]], ExtensionArray | Index | ndarray[tuple[Any, ...], dtype[Any]]]` is not assignable to declared return type `tuple[ndarray[tuple[Any, ...], dtype[signedinteger[Any]]], ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]]` [bad-return]
ERROR pandas/core/groupby/grouper.py:678:16-30: Returned type `tuple[ndarray[tuple[Any, ...], dtype[signedinteger[_NBitIntP]]] | ndarray[tuple[Any, ...], dtype[Any]], ExtensionArray | Index | ndarray[tuple[Any, ...], dtype[Any]]]` is not assignable to declared return type `tuple[ndarray[tuple[Any, ...], dtype[signedinteger[Any]]], ArrayLike]` [bad-return]
ERROR pandas/core/groupby/grouper.py:871:30-43: `NDFrameT` is not subscriptable [unsupported-operation]
ERROR pandas/core/groupby/grouper.py:881:28-36: Object of class `NoneType` has no attribute `name` [missing-attribute]
ERROR pandas/core/groupby/grouper.py:886:57-60: Argument `Index | Unknown | None` is not assignable to parameter `key` with type `Hashable` in function `pandas.core.generic.NDFrame._check_label_or_level_ambiguity` [bad-argument-type]
@ -733,7 +743,7 @@ ERROR pandas/core/indexes/base.py:667:13-31: Object of class `object` has no att
ERROR pandas/core/indexes/base.py:668:9-27: Object of class `object` has no attribute `_references` [missing-attribute]
ERROR pandas/core/indexes/base.py:670:16-22: Returned type `object` is not assignable to declared return type `Self@Index` [bad-return]
ERROR pandas/core/indexes/base.py:972:20-26: Argument `object` is not assignable to parameter `a` with type `_Buffer | _NestedSequence[bytes | complex | str] | _NestedSequence[_SupportsArray[dtype[Any]]] | _SupportsArray[dtype[Any]] | bytes | complex | str` in function `numpy._core.fromnumeric.ndim` [bad-argument-type]
ERROR pandas/core/indexes/base.py:1359:42-49: Argument `ndarray[tuple[Any, ...], dtype[signedinteger[_32Bit | _64Bit]]]` is not assignable to parameter `repeats` with type `Sequence[int] | int` in function `pandas.core.arrays.base.ExtensionArray.repeat` [bad-argument-type]
ERROR pandas/core/indexes/base.py:1359:42-49: Argument `ndarray[tuple[Any, ...], dtype[signedinteger[_NBitIntP]]]` is not assignable to parameter `repeats` with type `Sequence[int] | int` in function `pandas.core.arrays.base.ExtensionArray.repeat` [bad-argument-type]
ERROR pandas/core/indexes/base.py:1831:16-25: Argument `list[Unknown | None] | Unknown | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
ERROR pandas/core/indexes/base.py:1833:75-84: Argument `list[Unknown | None] | Unknown | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
ERROR pandas/core/indexes/base.py:1837:31-41: Type `None` is not iterable [not-iterable]
@ -758,6 +768,7 @@ ERROR pandas/core/indexes/base.py:4902:16-26: `join_index` may be uninitialized
ERROR pandas/core/indexes/base.py:5299:23-35: Object of class `object` has no attribute `to_numpy` [missing-attribute]
ERROR pandas/core/indexes/base.py:5310:25-30: No matching overload found for function `pandas.core.arrays.base.ExtensionArray.__getitem__` called with arguments: (ndarray[tuple[Any, ...], dtype[Any]] | object | Unknown) [no-matching-overload]
ERROR pandas/core/indexes/base.py:5310:25-30: No matching overload found for function `numpy.ndarray.__getitem__` called with arguments: (ndarray[tuple[Any, ...], dtype[Any]] | object | Unknown) [no-matching-overload]
ERROR pandas/core/indexes/base.py:5745:47-5748:10: No matching overload found for function `numpy.ndarray.searchsorted` called with arguments: (ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]], side=Literal['right']) [no-matching-overload]
ERROR pandas/core/indexes/base.py:6135:64-74: Argument `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | Unknown` is not assignable to parameter `targets` with type `ndarray[tuple[Any, ...], dtype[Any]]` in function `pandas._libs.index.ExtensionEngine.get_indexer_non_unique` [bad-argument-type]
ERROR pandas/core/indexes/base.py:6135:64-74: Argument `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | Unknown` is not assignable to parameter `targets` with type `ndarray[tuple[Any, ...], dtype[Any]]` in function `pandas._libs.index.IndexEngine.get_indexer_non_unique` [bad-argument-type]
ERROR pandas/core/indexes/category.py:186:5-10: Class member `CategoricalIndex._data` overrides parent class `NDArrayBackedExtensionIndex` in an inconsistent manner [bad-override]
@ -789,7 +800,7 @@ ERROR pandas/core/indexes/datetimes.py:579:16-28: Returned type `tuple[NaTType |
ERROR pandas/core/indexes/extension.py:147:5-10: Class member `ExtensionIndex._data` overrides parent class `Index` in an inconsistent manner [bad-override]
ERROR pandas/core/indexes/extension.py:169:5-10: Class member `NDArrayBackedExtensionIndex._data` overrides parent class `ExtensionIndex` in an inconsistent manner [bad-override]
ERROR pandas/core/indexes/interval.py:242:5-10: Class member `IntervalIndex._data` overrides parent class `ExtensionIndex` in an inconsistent manner [bad-override]
ERROR pandas/core/indexes/interval.py:807:20-33: Returned type `signedinteger[_32Bit | _64Bit] | Unknown` is not assignable to declared return type `int | ndarray[tuple[Any, ...], dtype[Any]] | slice[Any, Any, Any]` [bad-return]
ERROR pandas/core/indexes/interval.py:807:20-33: Returned type `signedinteger[_NBitIntP] | Unknown` is not assignable to declared return type `int | ndarray[tuple[Any, ...], dtype[Any]] | slice[Any, Any, Any]` [bad-return]
ERROR pandas/core/indexes/interval.py:1375:36-41: Argument `Unknown | None` is not assignable to parameter `value` with type `Interval[Unknown] | Timedelta | Timestamp | bool | bytes | complex | complexfloating[Any, Unknown] | date | datetime | datetime64[date | int | None] | float | floating[Any] | int | integer[Any] | str | timedelta | timedelta64[int | timedelta | None]` in function `pandas.core.dtypes.cast.maybe_box_datetimelike` [bad-argument-type]
ERROR pandas/core/indexes/interval.py:1376:34-37: Argument `Unknown | None` is not assignable to parameter `value` with type `Interval[Unknown] | Timedelta | Timestamp | bool | bytes | complex | complexfloating[Any, Unknown] | date | datetime | datetime64[date | int | None] | float | floating[Any] | int | integer[Any] | str | timedelta | timedelta64[int | timedelta | None]` in function `pandas.core.dtypes.cast.maybe_box_datetimelike` [bad-argument-type]
ERROR pandas/core/indexes/interval.py:1397:29-35: No matching overload found for function `pandas._libs.tslibs.offsets.to_offset` called with arguments: (Literal['D', 1] | Unknown) [no-matching-overload]
@ -1071,6 +1082,7 @@ ERROR pandas/core/indexes/multi.py:1589:9-19: Class member `MultiIndex._set_name
ERROR pandas/core/indexes/multi.py:1616:21-28: No matching overload found for function `list.__init__` called with arguments: (Unknown | None) [no-matching-overload]
ERROR pandas/core/indexes/multi.py:1707:16-21: Returned type `int | integer[Any] | Unknown` is not assignable to declared return type `int` [bad-return]
ERROR pandas/core/indexes/multi.py:2859:9-18: Class member `MultiIndex.sortlevel` overrides parent class `Index` in an inconsistent manner [bad-override]
ERROR pandas/core/indexes/multi.py:3184:9-3223:75: `Literal[0] | ndarray[tuple[Any, ...], dtype[signedinteger[_NBitIntP]]] | signedinteger[_NBitIntP] | Any` is not assignable to `int` (caused by inconsistent types when breaking cycles) [bad-assignment]
ERROR pandas/core/indexes/multi.py:3434:50-55: Argument `int | list[Hashable]` is not assignable to parameter `level` with type `int | list[int]` in function `MultiIndex._get_loc_level` [bad-argument-type]
ERROR pandas/core/indexes/multi.py:3539:17-3568:43: `ndarray[tuple[int], dtype[Any]] | Unknown | None` is not assignable to `None` (caused by inconsistent types when breaking cycles) [bad-assignment]
ERROR pandas/core/indexes/multi.py:4048:22-66: Illegal `super(type[MultiIndex], Index)` call: `Index` is not an instance or subclass of `type[MultiIndex]` [invalid-super-call]
@ -1129,6 +1141,7 @@ ERROR pandas/core/interchange/column.py:174:17-31: Object of class `str` has no
ERROR pandas/core/internals/api.py:82:5-11: Class member `_DatetimeTZBlock.values` overrides parent class `DatetimeLikeBlock` in an inconsistent manner [bad-override]
ERROR pandas/core/internals/api.py:113:57-61: Argument `Unknown | None` is not assignable to parameter `ndim` with type `int` in function `pandas.core.internals.blocks.extract_pandas_array` [bad-argument-type]
ERROR pandas/core/internals/api.py:133:13-19: Argument `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]` is not assignable to parameter `values` with type `ndarray[tuple[Any, ...], dtype[datetime64[date | int | None]]]` in function `pandas.core.arrays.datetimes.DatetimeArray._simple_new` [bad-argument-type]
ERROR pandas/core/internals/blocks.py:509:47-512:10: No matching overload found for function `pandas._libs.lib.maybe_convert_objects` called with arguments: (ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | Any, convert_non_numeric=Literal[True]) [no-matching-overload]
ERROR pandas/core/internals/blocks.py:1204:29-46: Cannot index into `ExtensionArray` [bad-index]
ERROR pandas/core/internals/blocks.py:1339:13-17: `mask` may be uninitialized [unbound-name]
ERROR pandas/core/internals/blocks.py:1339:18-22: `mask` may be uninitialized [unbound-name]
@ -1144,8 +1157,8 @@ ERROR pandas/core/internals/construction.py:286:39-45: Argument `ExtensionArray
ERROR pandas/core/internals/construction.py:628:34-39: `index` may be uninitialized [unbound-name]
ERROR pandas/core/internals/construction.py:631:35-40: `index` may be uninitialized [unbound-name]
ERROR pandas/core/internals/construction.py:637:25-30: `index` may be uninitialized [unbound-name]
ERROR pandas/core/internals/construction.py:768:24-39: Returned type `tuple[list[ndarray[tuple[Any, ...], dtype[Any]]], Index]` is not assignable to declared return type `tuple[list[ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]], Index]` [bad-return]
ERROR pandas/core/internals/construction.py:776:16-31: Returned type `tuple[list[ndarray[tuple[Any, ...], dtype[Any]]], Index]` is not assignable to declared return type `tuple[list[ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]], Index]` [bad-return]
ERROR pandas/core/internals/construction.py:768:24-39: Returned type `tuple[list[ndarray[tuple[Any, ...], dtype[Any]]], Index]` is not assignable to declared return type `tuple[list[ArrayLike], Index]` [bad-return]
ERROR pandas/core/internals/construction.py:776:16-31: Returned type `tuple[list[ndarray[tuple[Any, ...], dtype[Any]]], Index]` is not assignable to declared return type `tuple[list[ArrayLike], Index]` [bad-return]
ERROR pandas/core/internals/construction.py:787:31-35: Argument `list[tuple[@_, ...]]` is not assignable to parameter `data` with type `list[list[Unknown] | tuple[Unknown, ...]]` in function `_list_to_arrays` [bad-argument-type]
ERROR pandas/core/internals/construction.py:829:31-66: Argument `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]` is not assignable to parameter `object` with type `_NestedSequence[_SupportsArray[dtype[Any]]] | _SupportsArray[dtype[Any]]` in function `list.append` [bad-argument-type]
ERROR pandas/core/internals/construction.py:992:52-1000:22: No matching overload found for function `pandas._libs.lib.maybe_convert_objects` called with arguments: (ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]], convert_numeric=Literal[False], convert_non_numeric=Literal[True], convert_to_nullable_dtype=bool, dtype_if_all_nat=dtype[datetime64[date | int | None]]) [no-matching-overload]
@ -1161,22 +1174,21 @@ ERROR pandas/core/methods/to_dict.py:76:5-12: Overload return type `dict[Unknown
ERROR pandas/core/methods/to_dict.py:86:5-12: Overload return type `list[dict[Unknown, Unknown]]` is not assignable to implementation return type `list[type[dict[Unknown, Unknown]]] | type[dict[Unknown, Unknown]]` [inconsistent-overload]
ERROR pandas/core/missing.py:269:26-32: `idxpos` may be uninitialized [unbound-name]
ERROR pandas/core/missing.py:608:24-28: Argument `str | Unknown | None` is not assignable to parameter `kind` with type `Literal['cubic', 'linear', 'nearest', 'nearest-up', 'next', 'previous', 'quadratic', 'slinear', 'zero'] | int` in function `scipy.interpolate._interpolate.interp1d.__init__` [bad-argument-type]
ERROR pandas/core/missing.py:608:41-51: Argument `Unknown | None` is not assignable to parameter `fill_value` with type `Literal['extrapolate'] | SequenceND[_CanArray[numpy.bool[builtins.bool] | floating[Any] | integer[Any]] | float] | _CanArrayND[numpy.bool[builtins.bool] | floating[Any] | integer[Any]] | numpy.bool[builtins.bool] | float | floating[Any] | integer[Any] | tuple[SequenceND[_CanArray[numpy.bool[builtins.bool] | floating[Any] | integer[Any]] | float] | _CanArrayND[numpy.bool[builtins.bool] | floating[Any] | integer[Any]] | numpy.bool[builtins.bool] | float | floating[Any] | integer[Any], SequenceND[_CanArray[numpy.bool[builtins.bool] | floating[Any] | integer[Any]] | float] | _CanArrayND[numpy.bool[builtins.bool] | floating[Any] | integer[Any]] | numpy.bool[builtins.bool] | float | floating[Any] | integer[Any]]` in function `scipy.interpolate._interpolate.interp1d.__init__` [bad-argument-type]
ERROR pandas/core/missing.py:608:41-51: Argument `Unknown | None` is not assignable to parameter `fill_value` with type `Literal['extrapolate'] | SequenceND[_CanArray[floating_co] | float] | _CanArrayND[floating_co] | numpy.bool[builtins.bool] | float | floating[Any] | integer[Any] | tuple[SequenceND[_CanArray[floating_co] | float] | _CanArrayND[floating_co] | numpy.bool[builtins.bool] | float | floating[Any] | integer[Any], SequenceND[_CanArray[floating_co] | float] | _CanArrayND[floating_co] | numpy.bool[builtins.bool] | float | floating[Any] | integer[Any]]` in function `scipy.interpolate._interpolate.interp1d.__init__` [bad-argument-type]
ERROR pandas/core/missing.py:613:28-38: `<=` is not supported between `None` and `Literal[0]` [unsupported-operation]
ERROR pandas/core/missing.py:617:53-58: Argument `Unknown | None` is not assignable to parameter `k` with type `Literal[1, 2, 3, 4, 5]` in function `scipy.interpolate._fitpack2.UnivariateSpline.__init__` [bad-argument-type]
ERROR pandas/core/nanops.py:140:30-37: Expected a callable, got `None` [not-callable]
ERROR pandas/core/nanops.py:1525:12-24: Object of class `int` has no attribute `astype` [missing-attribute]
ERROR pandas/core/ops/array_ops.py:126:48-57: Argument `ExtensionArray | ndarray[tuple[int], dtype[object_]] | ndarray[tuple[int], dtype[Any]] | Unknown` is not assignable to parameter `right` with type `ndarray[tuple[Any, ...], dtype[object_]]` in function `pandas._libs.ops.vec_compare` [bad-argument-type]
ERROR pandas/core/ops/array_ops.py:340:44-51: Argument `ndarray[tuple[Any, ...], dtype[Any]] | object` is not assignable to parameter `right` with type `ExtensionArray | Interval[Unknown] | Timedelta | Timestamp | bool | bytes | complex | complexfloating[Any, Unknown] | date | datetime | datetime64[date | int | None] | float | floating[Any] | int | integer[Any] | list[Unknown] | ndarray[tuple[Any, ...], dtype[Any]] | str | timedelta | timedelta64[int | timedelta | None]` in function `pandas.core.ops.invalid.invalid_comparison` [bad-argument-type]
ERROR pandas/core/ops/mask_ops.py:79:12-24: Returned type `tuple[ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | ndarray[tuple[Any, ...], dtype[Any]] | Unknown, ndarray[tuple[Any, ...], dtype[Any]] | Unknown | mask]` is not assignable to declared return type `tuple[ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]], ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]]]` [bad-return]
ERROR pandas/core/ops/mask_ops.py:79:12-24: Returned type `tuple[ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | ndarray[tuple[Any, ...], dtype[Any]] | Unknown, ndarray[tuple[Any, ...], dtype[Any]] | type[Unknown] | Unknown]` is not assignable to declared return type `tuple[ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]], ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]]]` [bad-return]
ERROR pandas/core/resample.py:141:5-13: Class member `Resampler._grouper` overrides parent class `BaseGroupBy` in an inconsistent manner [bad-override]
ERROR pandas/core/resample.py:341:28-51: No matching overload found for function `pandas.core.groupby.groupby.BaseGroupBy.pipe` called with arguments: (((Self@Resampler, ParamSpec(P)) -> T) | tuple[(...) -> T, str], *tuple[Any, ...], **dict[str, Any]) [no-matching-overload]
ERROR pandas/core/resample.py:442:45-49: Argument `Unknown | None` is not assignable to parameter `func` with type `((...) -> Unknown) | MutableMapping[Hashable, ((...) -> Unknown) | list[((...) -> Unknown) | str] | str] | list[((...) -> Unknown) | str] | str` in function `pandas.core.apply.ResamplerWindowApply.__init__` [bad-argument-type]
ERROR pandas/core/resample.py:442:45-49: Argument `Unknown | None` is not assignable to parameter `func` with type `((...) -> Unknown) | MutableMapping[Hashable, ((...) -> Unknown) | list[AggFuncTypeBase] | str] | list[AggFuncTypeBase] | str` in function `pandas.core.apply.ResamplerWindowApply.__init__` [bad-argument-type]
ERROR pandas/core/resample.py:1048:55-66: `final_index` may be uninitialized [unbound-name]
ERROR pandas/core/resample.py:1051:37-48: `final_index` may be uninitialized [unbound-name]
ERROR pandas/core/resample.py:2062:5-7: Class member `DatetimeIndexResampler.ax` overrides parent class `Resampler` in an inconsistent manner [bad-override]
ERROR pandas/core/resample.py:2110:9-18: Class member `DatetimeIndexResampler._upsample` overrides parent class `Resampler` in an inconsistent manner [bad-param-name-override]
ERROR pandas/core/resample.py:2264:34-2268:10: No matching overload found for function `_take_new_index` called with arguments: (NDFrame, ndarray[tuple[Any, ...], dtype[signedinteger[_32Bit | _64Bit]]], DatetimeIndex | PeriodIndex | TimedeltaIndex) [no-matching-overload]
ERROR pandas/core/resample.py:2477:31-48: `NaTType | Timestamp` is not assignable to attribute `origin` with type `Literal['end', 'end_day', 'epoch', 'start', 'start_day'] | Timestamp` [bad-assignment]
ERROR pandas/core/resample.py:2574:31-40: Argument `Unknown | None` is not assignable to parameter `freq` with type `BaseOffset | _NoDefault | str` in function `pandas.core.indexes.datetimes.DatetimeIndex.__new__` [bad-argument-type]
ERROR pandas/core/resample.py:2581:13-22: Argument `Unknown | None` is not assignable to parameter `freq` with type `BaseOffset` in function `_get_timestamp_range_edges` [bad-argument-type]
@ -1214,14 +1226,18 @@ ERROR pandas/core/reshape/merge.py:2927:32-39: Argument `ExtensionArray | ndarra
ERROR pandas/core/reshape/merge.py:2928:32-39: Argument `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]` is not assignable to parameter `values` with type `ndarray[tuple[Any, ...], dtype[Any]]` in function `pandas._libs.hashtable.Factorizer.factorize` [bad-argument-type]
ERROR pandas/core/reshape/pivot.py:403:30-42: `values_multi` may be uninitialized [unbound-name]
ERROR pandas/core/reshape/pivot.py:592:25-34: Argument `list[Hashable | Unknown]` is not assignable to parameter `tuples` with type `Iterable[tuple[Hashable, ...]]` in function `pandas.core.indexes.multi.MultiIndex.from_tuples` [bad-argument-type]
ERROR pandas/core/reshape/tile.py:542:31-48: No matching overload found for function `pandas.core.array_algos.take.take_nd` called with arguments: (Categorical | IntervalIndex | Unknown, ndarray[tuple[Any, ...], dtype[signedinteger[_32Bit | _64Bit]]]) [no-matching-overload]
ERROR pandas/core/reshape/reshape.py:513:13-520:65: `DataFrame | Series` is not assignable to `DataFrame` (caused by inconsistent types when breaking cycles) [bad-assignment]
ERROR pandas/core/reshape/reshape.py:742:9-745:66: `DataFrame | Series` is not assignable to `DataFrame` (caused by inconsistent types when breaking cycles) [bad-assignment]
ERROR pandas/core/reshape/reshape.py:756:9-763:62: `DataFrame | Series` is not assignable to `DataFrame` (caused by inconsistent types when breaking cycles) [bad-assignment]
ERROR pandas/core/reshape/tile.py:542:31-48: No matching overload found for function `pandas.core.array_algos.take.take_nd` called with arguments: (Categorical | IntervalIndex | Unknown, ndarray[tuple[Any, ...], dtype[signedinteger[_NBitIntP]]]) [no-matching-overload]
ERROR pandas/core/series.py:353:5-12: Class member `Series.hasnans` overrides parent class `IndexOpsMixin` in an inconsistent manner [bad-override]
ERROR pandas/core/series.py:358:5-9: Class member `Series._mgr` overrides parent class `NDFrame` in an inconsistent manner [bad-override]
ERROR pandas/core/series.py:446:20-30: Argument `dtype[Any]` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
ERROR pandas/core/series.py:939:9-20: Class member `Series.__getitem__` overrides parent class `NDFrame` in an inconsistent manner [bad-param-name-override]
ERROR pandas/core/series.py:1561:26-54: No matching overload found for function `open` called with arguments: (PathLike[str] | WriteBuffer[str] | str, Literal['w'], encoding=Literal['utf-8']) [no-matching-overload]
ERROR pandas/core/series.py:1740:9-16: Overload return type `dict[Unknown, Unknown]` is not assignable to implementation return type `type[dict[Unknown, Unknown]]` [inconsistent-overload]
ERROR pandas/core/series.py:4642:32-36: Argument `dict[str, Unknown] | Unknown` is not assignable to parameter `func` with type `((...) -> Unknown) | MutableMapping[Hashable, ((...) -> Unknown) | list[((...) -> Unknown) | str] | str] | list[((...) -> Unknown) | str] | str` in function `pandas.core.apply.SeriesApply.__init__` [bad-argument-type]
ERROR pandas/core/series.py:4642:32-36: Argument `dict[str, Unknown] | Unknown` is not assignable to parameter `func` with type `((...) -> Unknown) | MutableMapping[Hashable, ((...) -> Unknown) | list[AggFuncTypeBase] | str] | list[AggFuncTypeBase] | str` in function `pandas.core.apply.SeriesApply.__init__` [bad-argument-type]
ERROR pandas/core/series.py:5073:35-5078:14: No matching overload found for function `pandas.core.generic.NDFrame._rename` called with arguments: (((Any) -> Hashable) | ((...) -> object) | Hashable | Mapping[Any, Hashable] | None, inplace=bool, level=Hashable | None, errors=Literal['ignore', 'raise']) [no-matching-overload]
ERROR pandas/core/series.py:5359:9-20: Class member `Series.rename_axis` overrides parent class `NDFrame` in an inconsistent manner [bad-override]
ERROR pandas/core/series.py:6181:16-34: Returned type `NDFrame` is not assignable to declared return type `Series` [bad-return]
ERROR pandas/core/series.py:6537:5-22: Class member `Series._info_axis_number` overrides parent class `NDFrame` in an inconsistent manner [bad-override]
@ -1233,7 +1249,7 @@ ERROR pandas/core/series.py:8026:16-68: Returned type `NDFrame` is not assignabl
ERROR pandas/core/sorting.py:294:29-33: `lift` may be uninitialized [unbound-name]
ERROR pandas/core/sorting.py:295:46-50: `lift` may be uninitialized [unbound-name]
ERROR pandas/core/sorting.py:367:23-28: Argument `ndarray[tuple[Any, ...], dtype[Any]]` is not assignable to parameter `object` with type `_NestedSequence[bytes | complex | str] | bytes | complex | str` in function `list.append` [bad-argument-type]
ERROR pandas/core/sorting.py:428:16-432:10: Returned type `Series | ndarray[tuple[Any, ...], dtype[signedinteger[_32Bit | _64Bit]]] | ndarray[tuple[Any, ...], dtype[Any]]` is not assignable to declared return type `ndarray[tuple[Any, ...], dtype[signedinteger[_32Bit | _64Bit]]]` [bad-return]
ERROR pandas/core/sorting.py:428:16-432:10: Returned type `Series | ndarray[tuple[Any, ...], dtype[signedinteger[_NBitIntP]]] | ndarray[tuple[Any, ...], dtype[Any]]` is not assignable to declared return type `ndarray[tuple[Any, ...], dtype[signedinteger[_NBitIntP]]]` [bad-return]
ERROR pandas/core/sorting.py:429:13-22: Unexpected keyword argument `ascending` in function `pandas.core.series.Series.argsort` [unexpected-keyword]
ERROR pandas/core/sorting.py:431:13-24: Unexpected keyword argument `na_position` in function `pandas.core.series.Series.argsort` [unexpected-keyword]
ERROR pandas/core/strings/accessor.py:215:27-37: `Index` is not assignable to attribute `_index` with type `None` [bad-assignment]
@ -1275,7 +1291,7 @@ ERROR pandas/core/window/numba_.py:257:18-46: Type `prange` is not iterable [not
ERROR pandas/core/window/numba_.py:323:22-44: Type `prange` is not iterable [not-iterable]
ERROR pandas/core/window/online.py:63:22-44: Type `prange` is not iterable [not-iterable]
ERROR pandas/core/window/rolling.py:419:47-58: Argument `Unknown | None` is not assignable to parameter `window_size` with type `int` in function `pandas.core.indexers.objects.BaseIndexer.__init__` [bad-argument-type]
ERROR pandas/core/window/rolling.py:1288:45-49: Argument `Unknown | None` is not assignable to parameter `func` with type `((...) -> Unknown) | MutableMapping[Hashable, ((...) -> Unknown) | list[((...) -> Unknown) | str] | str] | list[((...) -> Unknown) | str] | str` in function `pandas.core.apply.ResamplerWindowApply.__init__` [bad-argument-type]
ERROR pandas/core/window/rolling.py:1288:45-49: Argument `Unknown | None` is not assignable to parameter `func` with type `((...) -> Unknown) | MutableMapping[Hashable, ((...) -> Unknown) | list[AggFuncTypeBase] | str] | list[AggFuncTypeBase] | str` in function `pandas.core.apply.ResamplerWindowApply.__init__` [bad-argument-type]
ERROR pandas/core/window/rolling.py:1291:22-26: Expected a callable, got `None` [not-callable]
ERROR pandas/core/window/rolling.py:1616:24-53: No matching overload found for function `pandas.core.common.pipe` called with arguments: (Self@RollingAndExpandingMixin, ((Self@RollingAndExpandingMixin, ParamSpec(P)) -> T) | tuple[(...) -> T, str], *tuple[Any, ...], **dict[str, Any]) [no-matching-overload]
ERROR pandas/core/window/rolling.py:2004:37-79: `int | signedinteger[_64Bit]` is not assignable to attribute `_win_freq_i8` with type `int | None` [bad-assignment]
@ -1320,9 +1336,11 @@ ERROR pandas/io/clipboard/__init__.py:561:20-30: Could not find import of `Found
ERROR pandas/io/clipboard/__init__.py:582:20-24: Could not find import of `qtpy` [missing-import]
ERROR pandas/io/clipboard/__init__.py:589:28-33: Could not find import of `PyQt4` [missing-import]
ERROR pandas/io/common.py:437:16-51: Expected a type form, got instance of `tuple[Any, ...]` [not-a-type]
ERROR pandas/io/common.py:770:39-776:18: No matching overload found for function `gzip.GzipFile.__init__` called with arguments: (fileobj=BaseBuffer, mode=str, **dict[str, Any]) [no-matching-overload]
ERROR pandas/io/common.py:874:24-30: Argument `BZ2File | GzipFile | IO[bytes] | LZMAFile | _BytesTarFile | _BytesZipFile | Unknown` is not assignable to parameter `object` with type `BaseBuffer` in function `list.append` [bad-argument-type]
ERROR pandas/io/common.py:902:54-60: Argument `BZ2File | BaseBuffer | GzipFile | IO[bytes] | IO[Any] | LZMAFile | _BytesTarFile | _BytesZipFile | Unknown` is not assignable to parameter `handle` with type `BaseBuffer | PathLike[str] | str` in function `_is_binary_mode` [bad-argument-type]
ERROR pandas/io/common.py:909:33-39: Argument `BZ2File | BaseBuffer | GzipFile | IO[bytes] | IO[Any] | LZMAFile | _BytesTarFile | _BytesZipFile | Unknown` is not assignable to parameter `buffer` with type `BaseBuffer` in function `_IOWrapper.__init__` [bad-argument-type]
ERROR pandas/io/common.py:1150:13-1154:14: Argument `mmap` is not assignable to parameter `buffer` with type `BaseBuffer` in function `_IOWrapper.__init__` [bad-argument-type]
ERROR pandas/io/common.py:1161:12-42: Returned type `tuple[_IOWrapper, Literal[True], list[_IOWrapper]]` is not assignable to declared return type `tuple[BaseBuffer | str, bool, list[BaseBuffer]]` [bad-return]
ERROR pandas/io/excel/_base.py:493:24-34: Argument `int | list[IntStrT] | str | None` is not assignable to parameter `sheet_name` with type `int | list[int] | list[str] | str | None` in function `ExcelFile.parse` [bad-argument-type]
ERROR pandas/io/excel/_base.py:496:23-32: Argument `Sequence[int] | int | str | None` is not assignable to parameter `index_col` with type `Sequence[int] | int | None` in function `ExcelFile.parse` [bad-argument-type]
@ -1345,7 +1363,6 @@ ERROR pandas/io/excel/_xlrd.py:79:9-23: Class member `XlrdReader.get_sheet_data`
ERROR pandas/io/formats/excel.py:252:21-24: Argument `dict[str, dict[str, bool | float | str | None] | dict[str, bool | str | None] | dict[str, str | None] | dict[str, dict[str, str | None]] | Unknown]` is not assignable to parameter `d` with type `dict[str, str | None]` in function `remove_none` [bad-argument-type]
ERROR pandas/io/formats/excel.py:253:16-19: Returned type `dict[str, dict[str, bool | float | str | None] | dict[str, bool | str | None] | dict[str, str | None] | dict[str, dict[str, str | None]] | Unknown]` is not assignable to declared return type `dict[str, dict[str, str]]` [bad-return]
WARN pandas/io/formats/format.py:237:28-43: Redundant cast: `int` is the same type as `int` [redundant-cast]
ERROR pandas/io/formats/format.py:422:5-12: Class member `DataFrameFormatter.__doc__` overrides parent class `object` in an inconsistent manner [bad-override]
ERROR pandas/io/formats/format.py:1052:1-16: Argument `(buf: PathLike[str] | WriteBuffer[str] | str | None, encoding: str | None = None) -> Generator[StringIO, None, None] | Generator[WriteBuffer[str], None, None]` is not assignable to parameter `func` with type `(buf: PathLike[str] | WriteBuffer[str] | str | None, encoding: str | None = None) -> Iterator[StringIO]` in function `contextlib.contextmanager` [bad-argument-type]
ERROR pandas/io/formats/format.py:1081:19-20: Type of yielded value `TextIOWrapper[_WrappedBuffer]` is not assignable to declared return type `StringIO` [invalid-yield]
ERROR pandas/io/formats/format.py:1159:9-15: Argument `DatetimeArray | ExtensionArray | TimedeltaArray | ndarray[tuple[Any, ...], dtype[Any]]` is not assignable to parameter `values` with type `DatetimeArray` in function `_Datetime64Formatter.__init__` [bad-argument-type]
@ -1393,13 +1410,13 @@ ERROR pandas/io/html.py:639:9-18: Class member `_BeautifulSoupHtml5LibFrameParse
ERROR pandas/io/html.py:731:9-18: Class member `_LxmlFrameParser._parse_td` overrides parent class `_HtmlFrameParser` in an inconsistent manner [bad-param-name-override]
ERROR pandas/io/html.py:736:9-22: Class member `_LxmlFrameParser._parse_tables` overrides parent class `_HtmlFrameParser` in an inconsistent manner [bad-param-name-override]
ERROR pandas/io/json/_json.py:955:16-19: `obj` may be uninitialized [unbound-name]
ERROR pandas/io/json/_json.py:1025:38-46: Unpacked keyword argument `_NoDefault | bool | str | Unknown | None` is not assignable to parameter `dtype` with type `ExtensionDtype | Mapping[Hashable, ExtensionDtype | dtype[Any] | str | type[bool | complex | object | str]] | dtype[Any] | str | type[bool | complex | object | str] | None` in function `Parser.__init__` [bad-argument-type]
ERROR pandas/io/json/_json.py:1025:38-46: Unpacked keyword argument `_NoDefault | bool | str | Unknown | None` is not assignable to parameter `dtype` with type `ExtensionDtype | Mapping[Hashable, Dtype] | dtype[Any] | str | type[bool | complex | object | str] | None` in function `Parser.__init__` [bad-argument-type]
ERROR pandas/io/json/_json.py:1025:38-46: Unpacked keyword argument `_NoDefault | bool | str | Unknown | None` is not assignable to parameter `convert_axes` with type `bool` in function `Parser.__init__` [bad-argument-type]
ERROR pandas/io/json/_json.py:1025:38-46: Unpacked keyword argument `_NoDefault | bool | str | Unknown | None` is not assignable to parameter `convert_dates` with type `bool | list[str]` in function `Parser.__init__` [bad-argument-type]
ERROR pandas/io/json/_json.py:1025:38-46: Unpacked keyword argument `_NoDefault | bool | str | Unknown | None` is not assignable to parameter `keep_default_dates` with type `bool` in function `Parser.__init__` [bad-argument-type]
ERROR pandas/io/json/_json.py:1025:38-46: Unpacked keyword argument `_NoDefault | bool | str | Unknown | None` is not assignable to parameter `precise_float` with type `bool` in function `Parser.__init__` [bad-argument-type]
ERROR pandas/io/json/_json.py:1025:38-46: Unpacked keyword argument `_NoDefault | bool | str | Unknown | None` is not assignable to parameter `dtype_backend` with type `Literal['numpy_nullable', 'pyarrow'] | _NoDefault` in function `Parser.__init__` [bad-argument-type]
ERROR pandas/io/json/_json.py:1029:39-47: Unpacked keyword argument `_NoDefault | bool | str | Unknown | None` is not assignable to parameter `dtype` with type `ExtensionDtype | Mapping[Hashable, ExtensionDtype | dtype[Any] | str | type[bool | complex | object | str]] | dtype[Any] | str | type[bool | complex | object | str] | None` in function `Parser.__init__` [bad-argument-type]
ERROR pandas/io/json/_json.py:1029:39-47: Unpacked keyword argument `_NoDefault | bool | str | Unknown | None` is not assignable to parameter `dtype` with type `ExtensionDtype | Mapping[Hashable, Dtype] | dtype[Any] | str | type[bool | complex | object | str] | None` in function `Parser.__init__` [bad-argument-type]
ERROR pandas/io/json/_json.py:1029:39-47: Unpacked keyword argument `_NoDefault | bool | str | Unknown | None` is not assignable to parameter `convert_axes` with type `bool` in function `Parser.__init__` [bad-argument-type]
ERROR pandas/io/json/_json.py:1029:39-47: Unpacked keyword argument `_NoDefault | bool | str | Unknown | None` is not assignable to parameter `convert_dates` with type `bool | list[str]` in function `Parser.__init__` [bad-argument-type]
ERROR pandas/io/json/_json.py:1029:39-47: Unpacked keyword argument `_NoDefault | bool | str | Unknown | None` is not assignable to parameter `keep_default_dates` with type `bool` in function `Parser.__init__` [bad-argument-type]
@ -1410,27 +1427,29 @@ ERROR pandas/io/json/_normalize.py:578:32-41: Argument `int` is not assignable t
ERROR pandas/io/json/_table_schema.py:311:36-53: Object of class `Index` has no attribute `levels` [missing-attribute]
ERROR pandas/io/parsers/arrow_parser_wrapper.py:184:30-57: `+` is not supported between `list[str]` and `range` [unsupported-operation]
ERROR pandas/io/parsers/base_parser.py:432:20-21: Returned type `int | integer[Any]` is not assignable to declared return type `int` [bad-return]
ERROR pandas/io/parsers/base_parser.py:489:64-494:18: No matching overload found for function `pandas._libs.lib.maybe_convert_numeric` called with arguments: (Unknown, Unknown, Literal[False], convert_to_masked_nullable=bool | Unknown) [no-matching-overload]
ERROR pandas/io/parsers/base_parser.py:529:58-534:14: No matching overload found for function `pandas._libs.ops.maybe_convert_bool` called with arguments: (ndarray[tuple[Any, ...], dtype[Any]], true_values=Unknown, false_values=Unknown, convert_to_masked_nullable=bool | Unknown) [no-matching-overload]
ERROR pandas/io/parsers/c_parser_wrapper.py:137:45-71: `set[int]` is not assignable to upper bound `Sequence[Hashable]` of type variable `SequenceT` [bad-specialization]
ERROR pandas/io/parsers/c_parser_wrapper.py:147:45-150:18: `set[int]` is not assignable to upper bound `Sequence[Hashable]` of type variable `SequenceT` [bad-specialization]
ERROR pandas/io/parsers/c_parser_wrapper.py:240:42-65: `MultiIndex | list[Hashable]` is not assignable to upper bound `Sequence[Hashable]` of type variable `SequenceT` [bad-specialization]
ERROR pandas/io/parsers/python_parser.py:142:25-26: `list[str]` is not assignable to attribute `data` with type `Iterator[list[str]] | list[list[Interval[Unknown] | Timedelta | Timestamp | bool | bytes | complex | complexfloating[Any, Unknown] | date | datetime | datetime64[date | int | None] | float | floating[Any] | int | integer[Any] | str | timedelta | timedelta64[int | timedelta | None]]]` [bad-assignment]
ERROR pandas/io/parsers/python_parser.py:142:25-26: `list[str]` is not assignable to attribute `data` with type `Iterator[list[str]] | list[list[Scalar]]` [bad-assignment]
ERROR pandas/io/parsers/python_parser.py:172:14-24: Class member `PythonParser.orig_names` overrides parent class `ParserBase` in an inconsistent manner [bad-override]
ERROR pandas/io/parsers/python_parser.py:428:48-83: Argument `set[Unknown] | Unknown` is not assignable to parameter `values` with type `ExtensionArray | Index | SequenceNotStr[Unknown] | Series | ndarray[tuple[Any, ...], dtype[Any]] | range` in function `pandas.core.algorithms.isin` [bad-argument-type]
ERROR pandas/io/parsers/python_parser.py:481:25-30: Cannot set item in `dict[Any, ndarray[tuple[Any, ...], dtype[Any]]]` [unsupported-operation]
ERROR pandas/io/parsers/python_parser.py:528:25-36: Unexpected keyword argument `true_values` in function `pandas.core.arrays.base.ExtensionArray._from_sequence_of_strings` [unexpected-keyword]
ERROR pandas/io/parsers/python_parser.py:529:25-37: Unexpected keyword argument `false_values` in function `pandas.core.arrays.base.ExtensionArray._from_sequence_of_strings` [unexpected-keyword]
ERROR pandas/io/parsers/python_parser.py:530:25-36: Unexpected keyword argument `none_values` in function `pandas.core.arrays.base.ExtensionArray._from_sequence_of_strings` [unexpected-keyword]
ERROR pandas/io/parsers/python_parser.py:1310:62-70: Argument `list[list[str]]` is not assignable to parameter `new_rows` with type `list[list[Interval[Unknown] | Timedelta | Timestamp | bool | bytes | complex | complexfloating[Any, Unknown] | date | datetime | datetime64[date | int | None] | float | floating[Any] | int | integer[Any] | str | timedelta | timedelta64[int | timedelta | None]]]` in function `PythonParser._remove_skipped_rows` [bad-argument-type]
ERROR pandas/io/parsers/python_parser.py:1320:49-57: Argument `list[Interval[Unknown] | Timedelta | Timestamp | bool | bytes | complex | complexfloating[Any, Unknown] | date | datetime | datetime64[date | int | None] | float | floating[Any] | int | integer[Any] | str | timedelta | timedelta64[int | timedelta | None]]` is not assignable to parameter `object` with type `list[str]` in function `list.append` [bad-argument-type]
ERROR pandas/io/parsers/python_parser.py:1325:58-66: Argument `list[list[str]]` is not assignable to parameter `new_rows` with type `list[list[Interval[Unknown] | Timedelta | Timestamp | bool | bytes | complex | complexfloating[Any, Unknown] | date | datetime | datetime64[date | int | None] | float | floating[Any] | int | integer[Any] | str | timedelta | timedelta64[int | timedelta | None]]]` in function `PythonParser._remove_skipped_rows` [bad-argument-type]
ERROR pandas/io/parsers/readers.py:310:5-13: Implementation signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, sep: _NoDefault | str | None = _NoDefault.no_default, delimiter: _NoDefault | str | None = None, header: Literal['infer'] | Sequence[int] | int | None = 'infer', names: Sequence[Hashable] | _NoDefault | None = _NoDefault.no_default, index_col: Literal[False] | Hashable | Sequence[Hashable] | None = None, usecols: ((Unknown) -> bool) | ExtensionArray | Index | SequenceNotStr[Hashable] | Series | ndarray[tuple[Any, ...], dtype[Any]] | range | None = None, dtype: ExtensionDtype | Mapping[Hashable, ExtensionDtype | dtype[Any] | str | type[bool | complex | object | str]] | dtype[Any] | str | type[bool | complex | object | str] | None = None, engine: Literal['c', 'pyarrow', 'python', 'python-fwf'] | None = None, converters: Mapping[HashableT, (...) -> Unknown] | None = None, true_values: list[Unknown] | None = None, false_values: list[Unknown] | None = None, skipinitialspace: bool = False, skiprows: ((Hashable) -> bool) | int | list[int] | None = None, skipfooter: int = 0, nrows: int | None = None, na_values: Hashable | Iterable[Hashable] | Mapping[Hashable, Iterable[Hashable]] | None = None, keep_default_na: bool = True, na_filter: bool = True, skip_blank_lines: bool = True, parse_dates: Sequence[Hashable] | bool | None = None, date_format: dict[Hashable, str] | str | None = None, dayfirst: bool = False, cache_dates: bool = True, iterator: bool = False, chunksize: int | None = None, compression: Literal['bz2', 'gzip', 'infer', 'tar', 'xz', 'zip', 'zstd'] | dict[str, Any] | None = 'infer', thousands: str | None = None, decimal: str = '.', lineterminator: str | None = None, quotechar: str = '"', quoting: int = 0, doublequote: bool = True, escapechar: str | None = None, comment: str | None = None, encoding: str | None = None, encoding_errors: str | None = 'strict', dialect: Dialect | str | None = None, on_bad_lines: str = 'error', low_memory: bool = True, memory_map: bool = False, float_precision: Literal['high', 'legacy', 'round_trip'] | None = None, storage_options: dict[str, Any] | None = None, dtype_backend: Literal['numpy_nullable', 'pyarrow'] | _NoDefault = _NoDefault.no_default) -> DataFrame | TextFileReader` does not accept all arguments that overload signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, iterator: Literal[True], chunksize: int | None = ..., **kwds: Unpack[TypedDict[_read_shared[HashableT]]]) -> TextFileReader` accepts [inconsistent-overload]
ERROR pandas/io/parsers/readers.py:320:5-13: Implementation signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, sep: _NoDefault | str | None = _NoDefault.no_default, delimiter: _NoDefault | str | None = None, header: Literal['infer'] | Sequence[int] | int | None = 'infer', names: Sequence[Hashable] | _NoDefault | None = _NoDefault.no_default, index_col: Literal[False] | Hashable | Sequence[Hashable] | None = None, usecols: ((Unknown) -> bool) | ExtensionArray | Index | SequenceNotStr[Hashable] | Series | ndarray[tuple[Any, ...], dtype[Any]] | range | None = None, dtype: ExtensionDtype | Mapping[Hashable, ExtensionDtype | dtype[Any] | str | type[bool | complex | object | str]] | dtype[Any] | str | type[bool | complex | object | str] | None = None, engine: Literal['c', 'pyarrow', 'python', 'python-fwf'] | None = None, converters: Mapping[HashableT, (...) -> Unknown] | None = None, true_values: list[Unknown] | None = None, false_values: list[Unknown] | None = None, skipinitialspace: bool = False, skiprows: ((Hashable) -> bool) | int | list[int] | None = None, skipfooter: int = 0, nrows: int | None = None, na_values: Hashable | Iterable[Hashable] | Mapping[Hashable, Iterable[Hashable]] | None = None, keep_default_na: bool = True, na_filter: bool = True, skip_blank_lines: bool = True, parse_dates: Sequence[Hashable] | bool | None = None, date_format: dict[Hashable, str] | str | None = None, dayfirst: bool = False, cache_dates: bool = True, iterator: bool = False, chunksize: int | None = None, compression: Literal['bz2', 'gzip', 'infer', 'tar', 'xz', 'zip', 'zstd'] | dict[str, Any] | None = 'infer', thousands: str | None = None, decimal: str = '.', lineterminator: str | None = None, quotechar: str = '"', quoting: int = 0, doublequote: bool = True, escapechar: str | None = None, comment: str | None = None, encoding: str | None = None, encoding_errors: str | None = 'strict', dialect: Dialect | str | None = None, on_bad_lines: str = 'error', low_memory: bool = True, memory_map: bool = False, float_precision: Literal['high', 'legacy', 'round_trip'] | None = None, storage_options: dict[str, Any] | None = None, dtype_backend: Literal['numpy_nullable', 'pyarrow'] | _NoDefault = _NoDefault.no_default) -> DataFrame | TextFileReader` does not accept all arguments that overload signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, iterator: bool = ..., chunksize: int, **kwds: Unpack[TypedDict[_read_shared[HashableT]]]) -> TextFileReader` accepts [inconsistent-overload]
ERROR pandas/io/parsers/readers.py:330:5-13: Implementation signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, sep: _NoDefault | str | None = _NoDefault.no_default, delimiter: _NoDefault | str | None = None, header: Literal['infer'] | Sequence[int] | int | None = 'infer', names: Sequence[Hashable] | _NoDefault | None = _NoDefault.no_default, index_col: Literal[False] | Hashable | Sequence[Hashable] | None = None, usecols: ((Unknown) -> bool) | ExtensionArray | Index | SequenceNotStr[Hashable] | Series | ndarray[tuple[Any, ...], dtype[Any]] | range | None = None, dtype: ExtensionDtype | Mapping[Hashable, ExtensionDtype | dtype[Any] | str | type[bool | complex | object | str]] | dtype[Any] | str | type[bool | complex | object | str] | None = None, engine: Literal['c', 'pyarrow', 'python', 'python-fwf'] | None = None, converters: Mapping[HashableT, (...) -> Unknown] | None = None, true_values: list[Unknown] | None = None, false_values: list[Unknown] | None = None, skipinitialspace: bool = False, skiprows: ((Hashable) -> bool) | int | list[int] | None = None, skipfooter: int = 0, nrows: int | None = None, na_values: Hashable | Iterable[Hashable] | Mapping[Hashable, Iterable[Hashable]] | None = None, keep_default_na: bool = True, na_filter: bool = True, skip_blank_lines: bool = True, parse_dates: Sequence[Hashable] | bool | None = None, date_format: dict[Hashable, str] | str | None = None, dayfirst: bool = False, cache_dates: bool = True, iterator: bool = False, chunksize: int | None = None, compression: Literal['bz2', 'gzip', 'infer', 'tar', 'xz', 'zip', 'zstd'] | dict[str, Any] | None = 'infer', thousands: str | None = None, decimal: str = '.', lineterminator: str | None = None, quotechar: str = '"', quoting: int = 0, doublequote: bool = True, escapechar: str | None = None, comment: str | None = None, encoding: str | None = None, encoding_errors: str | None = 'strict', dialect: Dialect | str | None = None, on_bad_lines: str = 'error', low_memory: bool = True, memory_map: bool = False, float_precision: Literal['high', 'legacy', 'round_trip'] | None = None, storage_options: dict[str, Any] | None = None, dtype_backend: Literal['numpy_nullable', 'pyarrow'] | _NoDefault = _NoDefault.no_default) -> DataFrame | TextFileReader` does not accept all arguments that overload signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, iterator: Literal[False] = ..., chunksize: None = ..., **kwds: Unpack[TypedDict[_read_shared[HashableT]]]) -> DataFrame` accepts [inconsistent-overload]
ERROR pandas/io/parsers/readers.py:340:5-13: Implementation signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, sep: _NoDefault | str | None = _NoDefault.no_default, delimiter: _NoDefault | str | None = None, header: Literal['infer'] | Sequence[int] | int | None = 'infer', names: Sequence[Hashable] | _NoDefault | None = _NoDefault.no_default, index_col: Literal[False] | Hashable | Sequence[Hashable] | None = None, usecols: ((Unknown) -> bool) | ExtensionArray | Index | SequenceNotStr[Hashable] | Series | ndarray[tuple[Any, ...], dtype[Any]] | range | None = None, dtype: ExtensionDtype | Mapping[Hashable, ExtensionDtype | dtype[Any] | str | type[bool | complex | object | str]] | dtype[Any] | str | type[bool | complex | object | str] | None = None, engine: Literal['c', 'pyarrow', 'python', 'python-fwf'] | None = None, converters: Mapping[HashableT, (...) -> Unknown] | None = None, true_values: list[Unknown] | None = None, false_values: list[Unknown] | None = None, skipinitialspace: bool = False, skiprows: ((Hashable) -> bool) | int | list[int] | None = None, skipfooter: int = 0, nrows: int | None = None, na_values: Hashable | Iterable[Hashable] | Mapping[Hashable, Iterable[Hashable]] | None = None, keep_default_na: bool = True, na_filter: bool = True, skip_blank_lines: bool = True, parse_dates: Sequence[Hashable] | bool | None = None, date_format: dict[Hashable, str] | str | None = None, dayfirst: bool = False, cache_dates: bool = True, iterator: bool = False, chunksize: int | None = None, compression: Literal['bz2', 'gzip', 'infer', 'tar', 'xz', 'zip', 'zstd'] | dict[str, Any] | None = 'infer', thousands: str | None = None, decimal: str = '.', lineterminator: str | None = None, quotechar: str = '"', quoting: int = 0, doublequote: bool = True, escapechar: str | None = None, comment: str | None = None, encoding: str | None = None, encoding_errors: str | None = 'strict', dialect: Dialect | str | None = None, on_bad_lines: str = 'error', low_memory: bool = True, memory_map: bool = False, float_precision: Literal['high', 'legacy', 'round_trip'] | None = None, storage_options: dict[str, Any] | None = None, dtype_backend: Literal['numpy_nullable', 'pyarrow'] | _NoDefault = _NoDefault.no_default) -> DataFrame | TextFileReader` does not accept all arguments that overload signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, iterator: bool = ..., chunksize: int | None = ..., **kwds: Unpack[TypedDict[_read_shared[HashableT]]]) -> DataFrame | TextFileReader` accepts [inconsistent-overload]
ERROR pandas/io/parsers/readers.py:877:5-15: Implementation signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, sep: _NoDefault | str | None = _NoDefault.no_default, delimiter: _NoDefault | str | None = None, header: Literal['infer'] | Sequence[int] | int | None = 'infer', names: Sequence[Hashable] | _NoDefault | None = _NoDefault.no_default, index_col: Literal[False] | Hashable | Sequence[Hashable] | None = None, usecols: ((Unknown) -> bool) | ExtensionArray | Index | SequenceNotStr[Hashable] | Series | ndarray[tuple[Any, ...], dtype[Any]] | range | None = None, dtype: ExtensionDtype | Mapping[Hashable, ExtensionDtype | dtype[Any] | str | type[bool | complex | object | str]] | dtype[Any] | str | type[bool | complex | object | str] | None = None, engine: Literal['c', 'pyarrow', 'python', 'python-fwf'] | None = None, converters: Mapping[HashableT, (...) -> Unknown] | None = None, true_values: list[Unknown] | None = None, false_values: list[Unknown] | None = None, skipinitialspace: bool = False, skiprows: ((Hashable) -> bool) | int | list[int] | None = None, skipfooter: int = 0, nrows: int | None = None, na_values: Hashable | Iterable[Hashable] | Mapping[Hashable, Iterable[Hashable]] | None = None, keep_default_na: bool = True, na_filter: bool = True, skip_blank_lines: bool = True, parse_dates: Sequence[Hashable] | bool | None = None, date_format: dict[Hashable, str] | str | None = None, dayfirst: bool = False, cache_dates: bool = True, iterator: bool = False, chunksize: int | None = None, compression: Literal['bz2', 'gzip', 'infer', 'tar', 'xz', 'zip', 'zstd'] | dict[str, Any] | None = 'infer', thousands: str | None = None, decimal: str = '.', lineterminator: str | None = None, quotechar: str = '"', quoting: int = 0, doublequote: bool = True, escapechar: str | None = None, comment: str | None = None, encoding: str | None = None, encoding_errors: str | None = 'strict', dialect: Dialect | str | None = None, on_bad_lines: str = 'error', low_memory: bool = True, memory_map: bool = False, float_precision: Literal['high', 'legacy', 'round_trip'] | None = None, storage_options: dict[str, Any] | None = None, dtype_backend: Literal['numpy_nullable', 'pyarrow'] | _NoDefault = _NoDefault.no_default) -> DataFrame | TextFileReader` does not accept all arguments that overload signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, iterator: Literal[True], chunksize: int | None = ..., **kwds: Unpack[TypedDict[_read_shared[HashableT]]]) -> TextFileReader` accepts [inconsistent-overload]
ERROR pandas/io/parsers/readers.py:887:5-15: Implementation signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, sep: _NoDefault | str | None = _NoDefault.no_default, delimiter: _NoDefault | str | None = None, header: Literal['infer'] | Sequence[int] | int | None = 'infer', names: Sequence[Hashable] | _NoDefault | None = _NoDefault.no_default, index_col: Literal[False] | Hashable | Sequence[Hashable] | None = None, usecols: ((Unknown) -> bool) | ExtensionArray | Index | SequenceNotStr[Hashable] | Series | ndarray[tuple[Any, ...], dtype[Any]] | range | None = None, dtype: ExtensionDtype | Mapping[Hashable, ExtensionDtype | dtype[Any] | str | type[bool | complex | object | str]] | dtype[Any] | str | type[bool | complex | object | str] | None = None, engine: Literal['c', 'pyarrow', 'python', 'python-fwf'] | None = None, converters: Mapping[HashableT, (...) -> Unknown] | None = None, true_values: list[Unknown] | None = None, false_values: list[Unknown] | None = None, skipinitialspace: bool = False, skiprows: ((Hashable) -> bool) | int | list[int] | None = None, skipfooter: int = 0, nrows: int | None = None, na_values: Hashable | Iterable[Hashable] | Mapping[Hashable, Iterable[Hashable]] | None = None, keep_default_na: bool = True, na_filter: bool = True, skip_blank_lines: bool = True, parse_dates: Sequence[Hashable] | bool | None = None, date_format: dict[Hashable, str] | str | None = None, dayfirst: bool = False, cache_dates: bool = True, iterator: bool = False, chunksize: int | None = None, compression: Literal['bz2', 'gzip', 'infer', 'tar', 'xz', 'zip', 'zstd'] | dict[str, Any] | None = 'infer', thousands: str | None = None, decimal: str = '.', lineterminator: str | None = None, quotechar: str = '"', quoting: int = 0, doublequote: bool = True, escapechar: str | None = None, comment: str | None = None, encoding: str | None = None, encoding_errors: str | None = 'strict', dialect: Dialect | str | None = None, on_bad_lines: str = 'error', low_memory: bool = True, memory_map: bool = False, float_precision: Literal['high', 'legacy', 'round_trip'] | None = None, storage_options: dict[str, Any] | None = None, dtype_backend: Literal['numpy_nullable', 'pyarrow'] | _NoDefault = _NoDefault.no_default) -> DataFrame | TextFileReader` does not accept all arguments that overload signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, iterator: bool = ..., chunksize: int, **kwds: Unpack[TypedDict[_read_shared[HashableT]]]) -> TextFileReader` accepts [inconsistent-overload]
ERROR pandas/io/parsers/readers.py:897:5-15: Implementation signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, sep: _NoDefault | str | None = _NoDefault.no_default, delimiter: _NoDefault | str | None = None, header: Literal['infer'] | Sequence[int] | int | None = 'infer', names: Sequence[Hashable] | _NoDefault | None = _NoDefault.no_default, index_col: Literal[False] | Hashable | Sequence[Hashable] | None = None, usecols: ((Unknown) -> bool) | ExtensionArray | Index | SequenceNotStr[Hashable] | Series | ndarray[tuple[Any, ...], dtype[Any]] | range | None = None, dtype: ExtensionDtype | Mapping[Hashable, ExtensionDtype | dtype[Any] | str | type[bool | complex | object | str]] | dtype[Any] | str | type[bool | complex | object | str] | None = None, engine: Literal['c', 'pyarrow', 'python', 'python-fwf'] | None = None, converters: Mapping[HashableT, (...) -> Unknown] | None = None, true_values: list[Unknown] | None = None, false_values: list[Unknown] | None = None, skipinitialspace: bool = False, skiprows: ((Hashable) -> bool) | int | list[int] | None = None, skipfooter: int = 0, nrows: int | None = None, na_values: Hashable | Iterable[Hashable] | Mapping[Hashable, Iterable[Hashable]] | None = None, keep_default_na: bool = True, na_filter: bool = True, skip_blank_lines: bool = True, parse_dates: Sequence[Hashable] | bool | None = None, date_format: dict[Hashable, str] | str | None = None, dayfirst: bool = False, cache_dates: bool = True, iterator: bool = False, chunksize: int | None = None, compression: Literal['bz2', 'gzip', 'infer', 'tar', 'xz', 'zip', 'zstd'] | dict[str, Any] | None = 'infer', thousands: str | None = None, decimal: str = '.', lineterminator: str | None = None, quotechar: str = '"', quoting: int = 0, doublequote: bool = True, escapechar: str | None = None, comment: str | None = None, encoding: str | None = None, encoding_errors: str | None = 'strict', dialect: Dialect | str | None = None, on_bad_lines: str = 'error', low_memory: bool = True, memory_map: bool = False, float_precision: Literal['high', 'legacy', 'round_trip'] | None = None, storage_options: dict[str, Any] | None = None, dtype_backend: Literal['numpy_nullable', 'pyarrow'] | _NoDefault = _NoDefault.no_default) -> DataFrame | TextFileReader` does not accept all arguments that overload signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, iterator: Literal[False] = ..., chunksize: None = ..., **kwds: Unpack[TypedDict[_read_shared[HashableT]]]) -> DataFrame` accepts [inconsistent-overload]
ERROR pandas/io/parsers/readers.py:907:5-15: Implementation signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, sep: _NoDefault | str | None = _NoDefault.no_default, delimiter: _NoDefault | str | None = None, header: Literal['infer'] | Sequence[int] | int | None = 'infer', names: Sequence[Hashable] | _NoDefault | None = _NoDefault.no_default, index_col: Literal[False] | Hashable | Sequence[Hashable] | None = None, usecols: ((Unknown) -> bool) | ExtensionArray | Index | SequenceNotStr[Hashable] | Series | ndarray[tuple[Any, ...], dtype[Any]] | range | None = None, dtype: ExtensionDtype | Mapping[Hashable, ExtensionDtype | dtype[Any] | str | type[bool | complex | object | str]] | dtype[Any] | str | type[bool | complex | object | str] | None = None, engine: Literal['c', 'pyarrow', 'python', 'python-fwf'] | None = None, converters: Mapping[HashableT, (...) -> Unknown] | None = None, true_values: list[Unknown] | None = None, false_values: list[Unknown] | None = None, skipinitialspace: bool = False, skiprows: ((Hashable) -> bool) | int | list[int] | None = None, skipfooter: int = 0, nrows: int | None = None, na_values: Hashable | Iterable[Hashable] | Mapping[Hashable, Iterable[Hashable]] | None = None, keep_default_na: bool = True, na_filter: bool = True, skip_blank_lines: bool = True, parse_dates: Sequence[Hashable] | bool | None = None, date_format: dict[Hashable, str] | str | None = None, dayfirst: bool = False, cache_dates: bool = True, iterator: bool = False, chunksize: int | None = None, compression: Literal['bz2', 'gzip', 'infer', 'tar', 'xz', 'zip', 'zstd'] | dict[str, Any] | None = 'infer', thousands: str | None = None, decimal: str = '.', lineterminator: str | None = None, quotechar: str = '"', quoting: int = 0, doublequote: bool = True, escapechar: str | None = None, comment: str | None = None, encoding: str | None = None, encoding_errors: str | None = 'strict', dialect: Dialect | str | None = None, on_bad_lines: str = 'error', low_memory: bool = True, memory_map: bool = False, float_precision: Literal['high', 'legacy', 'round_trip'] | None = None, storage_options: dict[str, Any] | None = None, dtype_backend: Literal['numpy_nullable', 'pyarrow'] | _NoDefault = _NoDefault.no_default) -> DataFrame | TextFileReader` does not accept all arguments that overload signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, iterator: bool = ..., chunksize: int | None = ..., **kwds: Unpack[TypedDict[_read_shared[HashableT]]]) -> DataFrame | TextFileReader` accepts [inconsistent-overload]
ERROR pandas/io/parsers/python_parser.py:1310:62-70: Argument `list[list[str]]` is not assignable to parameter `new_rows` with type `list[list[Scalar]]` in function `PythonParser._remove_skipped_rows` [bad-argument-type]
ERROR pandas/io/parsers/python_parser.py:1320:49-57: Argument `list[Scalar]` is not assignable to parameter `object` with type `list[str]` in function `list.append` [bad-argument-type]
ERROR pandas/io/parsers/python_parser.py:1325:58-66: Argument `list[list[str]]` is not assignable to parameter `new_rows` with type `list[list[Scalar]]` in function `PythonParser._remove_skipped_rows` [bad-argument-type]
ERROR pandas/io/parsers/readers.py:310:5-13: Implementation signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, sep: _NoDefault | str | None = _NoDefault.no_default, delimiter: _NoDefault | str | None = None, header: Literal['infer'] | Sequence[int] | int | None = 'infer', names: Sequence[Hashable] | _NoDefault | None = _NoDefault.no_default, index_col: Literal[False] | Hashable | Sequence[Hashable] | None = None, usecols: ((Unknown) -> bool) | ExtensionArray | Index | SequenceNotStr[Hashable] | Series | ndarray[tuple[Any, ...], dtype[Any]] | range | None = None, dtype: ExtensionDtype | Mapping[Hashable, Dtype] | dtype[Any] | str | type[bool | complex | object | str] | None = None, engine: Literal['c', 'pyarrow', 'python', 'python-fwf'] | None = None, converters: Mapping[HashableT, (...) -> Unknown] | None = None, true_values: list[Unknown] | None = None, false_values: list[Unknown] | None = None, skipinitialspace: bool = False, skiprows: ((Hashable) -> bool) | int | list[int] | None = None, skipfooter: int = 0, nrows: int | None = None, na_values: Hashable | Iterable[Hashable] | Mapping[Hashable, Iterable[Hashable]] | None = None, keep_default_na: bool = True, na_filter: bool = True, skip_blank_lines: bool = True, parse_dates: Sequence[Hashable] | bool | None = None, date_format: dict[Hashable, str] | str | None = None, dayfirst: bool = False, cache_dates: bool = True, iterator: bool = False, chunksize: int | None = None, compression: Literal['bz2', 'gzip', 'infer', 'tar', 'xz', 'zip', 'zstd'] | dict[str, Any] | None = 'infer', thousands: str | None = None, decimal: str = '.', lineterminator: str | None = None, quotechar: str = '"', quoting: int = 0, doublequote: bool = True, escapechar: str | None = None, comment: str | None = None, encoding: str | None = None, encoding_errors: str | None = 'strict', dialect: Dialect | str | None = None, on_bad_lines: str = 'error', low_memory: bool = True, memory_map: bool = False, float_precision: Literal['high', 'legacy', 'round_trip'] | None = None, storage_options: dict[str, Any] | None = None, dtype_backend: Literal['numpy_nullable', 'pyarrow'] | _NoDefault = _NoDefault.no_default) -> DataFrame | TextFileReader` does not accept all arguments that overload signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, iterator: Literal[True], chunksize: int | None = ..., **kwds: Unpack[_read_shared[HashableT]]) -> TextFileReader` accepts [inconsistent-overload]
ERROR pandas/io/parsers/readers.py:320:5-13: Implementation signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, sep: _NoDefault | str | None = _NoDefault.no_default, delimiter: _NoDefault | str | None = None, header: Literal['infer'] | Sequence[int] | int | None = 'infer', names: Sequence[Hashable] | _NoDefault | None = _NoDefault.no_default, index_col: Literal[False] | Hashable | Sequence[Hashable] | None = None, usecols: ((Unknown) -> bool) | ExtensionArray | Index | SequenceNotStr[Hashable] | Series | ndarray[tuple[Any, ...], dtype[Any]] | range | None = None, dtype: ExtensionDtype | Mapping[Hashable, Dtype] | dtype[Any] | str | type[bool | complex | object | str] | None = None, engine: Literal['c', 'pyarrow', 'python', 'python-fwf'] | None = None, converters: Mapping[HashableT, (...) -> Unknown] | None = None, true_values: list[Unknown] | None = None, false_values: list[Unknown] | None = None, skipinitialspace: bool = False, skiprows: ((Hashable) -> bool) | int | list[int] | None = None, skipfooter: int = 0, nrows: int | None = None, na_values: Hashable | Iterable[Hashable] | Mapping[Hashable, Iterable[Hashable]] | None = None, keep_default_na: bool = True, na_filter: bool = True, skip_blank_lines: bool = True, parse_dates: Sequence[Hashable] | bool | None = None, date_format: dict[Hashable, str] | str | None = None, dayfirst: bool = False, cache_dates: bool = True, iterator: bool = False, chunksize: int | None = None, compression: Literal['bz2', 'gzip', 'infer', 'tar', 'xz', 'zip', 'zstd'] | dict[str, Any] | None = 'infer', thousands: str | None = None, decimal: str = '.', lineterminator: str | None = None, quotechar: str = '"', quoting: int = 0, doublequote: bool = True, escapechar: str | None = None, comment: str | None = None, encoding: str | None = None, encoding_errors: str | None = 'strict', dialect: Dialect | str | None = None, on_bad_lines: str = 'error', low_memory: bool = True, memory_map: bool = False, float_precision: Literal['high', 'legacy', 'round_trip'] | None = None, storage_options: dict[str, Any] | None = None, dtype_backend: Literal['numpy_nullable', 'pyarrow'] | _NoDefault = _NoDefault.no_default) -> DataFrame | TextFileReader` does not accept all arguments that overload signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, iterator: bool = ..., chunksize: int, **kwds: Unpack[_read_shared[HashableT]]) -> TextFileReader` accepts [inconsistent-overload]
ERROR pandas/io/parsers/readers.py:330:5-13: Implementation signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, sep: _NoDefault | str | None = _NoDefault.no_default, delimiter: _NoDefault | str | None = None, header: Literal['infer'] | Sequence[int] | int | None = 'infer', names: Sequence[Hashable] | _NoDefault | None = _NoDefault.no_default, index_col: Literal[False] | Hashable | Sequence[Hashable] | None = None, usecols: ((Unknown) -> bool) | ExtensionArray | Index | SequenceNotStr[Hashable] | Series | ndarray[tuple[Any, ...], dtype[Any]] | range | None = None, dtype: ExtensionDtype | Mapping[Hashable, Dtype] | dtype[Any] | str | type[bool | complex | object | str] | None = None, engine: Literal['c', 'pyarrow', 'python', 'python-fwf'] | None = None, converters: Mapping[HashableT, (...) -> Unknown] | None = None, true_values: list[Unknown] | None = None, false_values: list[Unknown] | None = None, skipinitialspace: bool = False, skiprows: ((Hashable) -> bool) | int | list[int] | None = None, skipfooter: int = 0, nrows: int | None = None, na_values: Hashable | Iterable[Hashable] | Mapping[Hashable, Iterable[Hashable]] | None = None, keep_default_na: bool = True, na_filter: bool = True, skip_blank_lines: bool = True, parse_dates: Sequence[Hashable] | bool | None = None, date_format: dict[Hashable, str] | str | None = None, dayfirst: bool = False, cache_dates: bool = True, iterator: bool = False, chunksize: int | None = None, compression: Literal['bz2', 'gzip', 'infer', 'tar', 'xz', 'zip', 'zstd'] | dict[str, Any] | None = 'infer', thousands: str | None = None, decimal: str = '.', lineterminator: str | None = None, quotechar: str = '"', quoting: int = 0, doublequote: bool = True, escapechar: str | None = None, comment: str | None = None, encoding: str | None = None, encoding_errors: str | None = 'strict', dialect: Dialect | str | None = None, on_bad_lines: str = 'error', low_memory: bool = True, memory_map: bool = False, float_precision: Literal['high', 'legacy', 'round_trip'] | None = None, storage_options: dict[str, Any] | None = None, dtype_backend: Literal['numpy_nullable', 'pyarrow'] | _NoDefault = _NoDefault.no_default) -> DataFrame | TextFileReader` does not accept all arguments that overload signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, iterator: Literal[False] = ..., chunksize: None = ..., **kwds: Unpack[_read_shared[HashableT]]) -> DataFrame` accepts [inconsistent-overload]
ERROR pandas/io/parsers/readers.py:340:5-13: Implementation signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, sep: _NoDefault | str | None = _NoDefault.no_default, delimiter: _NoDefault | str | None = None, header: Literal['infer'] | Sequence[int] | int | None = 'infer', names: Sequence[Hashable] | _NoDefault | None = _NoDefault.no_default, index_col: Literal[False] | Hashable | Sequence[Hashable] | None = None, usecols: ((Unknown) -> bool) | ExtensionArray | Index | SequenceNotStr[Hashable] | Series | ndarray[tuple[Any, ...], dtype[Any]] | range | None = None, dtype: ExtensionDtype | Mapping[Hashable, Dtype] | dtype[Any] | str | type[bool | complex | object | str] | None = None, engine: Literal['c', 'pyarrow', 'python', 'python-fwf'] | None = None, converters: Mapping[HashableT, (...) -> Unknown] | None = None, true_values: list[Unknown] | None = None, false_values: list[Unknown] | None = None, skipinitialspace: bool = False, skiprows: ((Hashable) -> bool) | int | list[int] | None = None, skipfooter: int = 0, nrows: int | None = None, na_values: Hashable | Iterable[Hashable] | Mapping[Hashable, Iterable[Hashable]] | None = None, keep_default_na: bool = True, na_filter: bool = True, skip_blank_lines: bool = True, parse_dates: Sequence[Hashable] | bool | None = None, date_format: dict[Hashable, str] | str | None = None, dayfirst: bool = False, cache_dates: bool = True, iterator: bool = False, chunksize: int | None = None, compression: Literal['bz2', 'gzip', 'infer', 'tar', 'xz', 'zip', 'zstd'] | dict[str, Any] | None = 'infer', thousands: str | None = None, decimal: str = '.', lineterminator: str | None = None, quotechar: str = '"', quoting: int = 0, doublequote: bool = True, escapechar: str | None = None, comment: str | None = None, encoding: str | None = None, encoding_errors: str | None = 'strict', dialect: Dialect | str | None = None, on_bad_lines: str = 'error', low_memory: bool = True, memory_map: bool = False, float_precision: Literal['high', 'legacy', 'round_trip'] | None = None, storage_options: dict[str, Any] | None = None, dtype_backend: Literal['numpy_nullable', 'pyarrow'] | _NoDefault = _NoDefault.no_default) -> DataFrame | TextFileReader` does not accept all arguments that overload signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, iterator: bool = ..., chunksize: int | None = ..., **kwds: Unpack[_read_shared[HashableT]]) -> DataFrame | TextFileReader` accepts [inconsistent-overload]
ERROR pandas/io/parsers/readers.py:877:5-15: Implementation signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, sep: _NoDefault | str | None = _NoDefault.no_default, delimiter: _NoDefault | str | None = None, header: Literal['infer'] | Sequence[int] | int | None = 'infer', names: Sequence[Hashable] | _NoDefault | None = _NoDefault.no_default, index_col: Literal[False] | Hashable | Sequence[Hashable] | None = None, usecols: ((Unknown) -> bool) | ExtensionArray | Index | SequenceNotStr[Hashable] | Series | ndarray[tuple[Any, ...], dtype[Any]] | range | None = None, dtype: ExtensionDtype | Mapping[Hashable, Dtype] | dtype[Any] | str | type[bool | complex | object | str] | None = None, engine: Literal['c', 'pyarrow', 'python', 'python-fwf'] | None = None, converters: Mapping[HashableT, (...) -> Unknown] | None = None, true_values: list[Unknown] | None = None, false_values: list[Unknown] | None = None, skipinitialspace: bool = False, skiprows: ((Hashable) -> bool) | int | list[int] | None = None, skipfooter: int = 0, nrows: int | None = None, na_values: Hashable | Iterable[Hashable] | Mapping[Hashable, Iterable[Hashable]] | None = None, keep_default_na: bool = True, na_filter: bool = True, skip_blank_lines: bool = True, parse_dates: Sequence[Hashable] | bool | None = None, date_format: dict[Hashable, str] | str | None = None, dayfirst: bool = False, cache_dates: bool = True, iterator: bool = False, chunksize: int | None = None, compression: Literal['bz2', 'gzip', 'infer', 'tar', 'xz', 'zip', 'zstd'] | dict[str, Any] | None = 'infer', thousands: str | None = None, decimal: str = '.', lineterminator: str | None = None, quotechar: str = '"', quoting: int = 0, doublequote: bool = True, escapechar: str | None = None, comment: str | None = None, encoding: str | None = None, encoding_errors: str | None = 'strict', dialect: Dialect | str | None = None, on_bad_lines: str = 'error', low_memory: bool = True, memory_map: bool = False, float_precision: Literal['high', 'legacy', 'round_trip'] | None = None, storage_options: dict[str, Any] | None = None, dtype_backend: Literal['numpy_nullable', 'pyarrow'] | _NoDefault = _NoDefault.no_default) -> DataFrame | TextFileReader` does not accept all arguments that overload signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, iterator: Literal[True], chunksize: int | None = ..., **kwds: Unpack[_read_shared[HashableT]]) -> TextFileReader` accepts [inconsistent-overload]
ERROR pandas/io/parsers/readers.py:887:5-15: Implementation signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, sep: _NoDefault | str | None = _NoDefault.no_default, delimiter: _NoDefault | str | None = None, header: Literal['infer'] | Sequence[int] | int | None = 'infer', names: Sequence[Hashable] | _NoDefault | None = _NoDefault.no_default, index_col: Literal[False] | Hashable | Sequence[Hashable] | None = None, usecols: ((Unknown) -> bool) | ExtensionArray | Index | SequenceNotStr[Hashable] | Series | ndarray[tuple[Any, ...], dtype[Any]] | range | None = None, dtype: ExtensionDtype | Mapping[Hashable, Dtype] | dtype[Any] | str | type[bool | complex | object | str] | None = None, engine: Literal['c', 'pyarrow', 'python', 'python-fwf'] | None = None, converters: Mapping[HashableT, (...) -> Unknown] | None = None, true_values: list[Unknown] | None = None, false_values: list[Unknown] | None = None, skipinitialspace: bool = False, skiprows: ((Hashable) -> bool) | int | list[int] | None = None, skipfooter: int = 0, nrows: int | None = None, na_values: Hashable | Iterable[Hashable] | Mapping[Hashable, Iterable[Hashable]] | None = None, keep_default_na: bool = True, na_filter: bool = True, skip_blank_lines: bool = True, parse_dates: Sequence[Hashable] | bool | None = None, date_format: dict[Hashable, str] | str | None = None, dayfirst: bool = False, cache_dates: bool = True, iterator: bool = False, chunksize: int | None = None, compression: Literal['bz2', 'gzip', 'infer', 'tar', 'xz', 'zip', 'zstd'] | dict[str, Any] | None = 'infer', thousands: str | None = None, decimal: str = '.', lineterminator: str | None = None, quotechar: str = '"', quoting: int = 0, doublequote: bool = True, escapechar: str | None = None, comment: str | None = None, encoding: str | None = None, encoding_errors: str | None = 'strict', dialect: Dialect | str | None = None, on_bad_lines: str = 'error', low_memory: bool = True, memory_map: bool = False, float_precision: Literal['high', 'legacy', 'round_trip'] | None = None, storage_options: dict[str, Any] | None = None, dtype_backend: Literal['numpy_nullable', 'pyarrow'] | _NoDefault = _NoDefault.no_default) -> DataFrame | TextFileReader` does not accept all arguments that overload signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, iterator: bool = ..., chunksize: int, **kwds: Unpack[_read_shared[HashableT]]) -> TextFileReader` accepts [inconsistent-overload]
ERROR pandas/io/parsers/readers.py:897:5-15: Implementation signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, sep: _NoDefault | str | None = _NoDefault.no_default, delimiter: _NoDefault | str | None = None, header: Literal['infer'] | Sequence[int] | int | None = 'infer', names: Sequence[Hashable] | _NoDefault | None = _NoDefault.no_default, index_col: Literal[False] | Hashable | Sequence[Hashable] | None = None, usecols: ((Unknown) -> bool) | ExtensionArray | Index | SequenceNotStr[Hashable] | Series | ndarray[tuple[Any, ...], dtype[Any]] | range | None = None, dtype: ExtensionDtype | Mapping[Hashable, Dtype] | dtype[Any] | str | type[bool | complex | object | str] | None = None, engine: Literal['c', 'pyarrow', 'python', 'python-fwf'] | None = None, converters: Mapping[HashableT, (...) -> Unknown] | None = None, true_values: list[Unknown] | None = None, false_values: list[Unknown] | None = None, skipinitialspace: bool = False, skiprows: ((Hashable) -> bool) | int | list[int] | None = None, skipfooter: int = 0, nrows: int | None = None, na_values: Hashable | Iterable[Hashable] | Mapping[Hashable, Iterable[Hashable]] | None = None, keep_default_na: bool = True, na_filter: bool = True, skip_blank_lines: bool = True, parse_dates: Sequence[Hashable] | bool | None = None, date_format: dict[Hashable, str] | str | None = None, dayfirst: bool = False, cache_dates: bool = True, iterator: bool = False, chunksize: int | None = None, compression: Literal['bz2', 'gzip', 'infer', 'tar', 'xz', 'zip', 'zstd'] | dict[str, Any] | None = 'infer', thousands: str | None = None, decimal: str = '.', lineterminator: str | None = None, quotechar: str = '"', quoting: int = 0, doublequote: bool = True, escapechar: str | None = None, comment: str | None = None, encoding: str | None = None, encoding_errors: str | None = 'strict', dialect: Dialect | str | None = None, on_bad_lines: str = 'error', low_memory: bool = True, memory_map: bool = False, float_precision: Literal['high', 'legacy', 'round_trip'] | None = None, storage_options: dict[str, Any] | None = None, dtype_backend: Literal['numpy_nullable', 'pyarrow'] | _NoDefault = _NoDefault.no_default) -> DataFrame | TextFileReader` does not accept all arguments that overload signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, iterator: Literal[False] = ..., chunksize: None = ..., **kwds: Unpack[_read_shared[HashableT]]) -> DataFrame` accepts [inconsistent-overload]
ERROR pandas/io/parsers/readers.py:907:5-15: Implementation signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, sep: _NoDefault | str | None = _NoDefault.no_default, delimiter: _NoDefault | str | None = None, header: Literal['infer'] | Sequence[int] | int | None = 'infer', names: Sequence[Hashable] | _NoDefault | None = _NoDefault.no_default, index_col: Literal[False] | Hashable | Sequence[Hashable] | None = None, usecols: ((Unknown) -> bool) | ExtensionArray | Index | SequenceNotStr[Hashable] | Series | ndarray[tuple[Any, ...], dtype[Any]] | range | None = None, dtype: ExtensionDtype | Mapping[Hashable, Dtype] | dtype[Any] | str | type[bool | complex | object | str] | None = None, engine: Literal['c', 'pyarrow', 'python', 'python-fwf'] | None = None, converters: Mapping[HashableT, (...) -> Unknown] | None = None, true_values: list[Unknown] | None = None, false_values: list[Unknown] | None = None, skipinitialspace: bool = False, skiprows: ((Hashable) -> bool) | int | list[int] | None = None, skipfooter: int = 0, nrows: int | None = None, na_values: Hashable | Iterable[Hashable] | Mapping[Hashable, Iterable[Hashable]] | None = None, keep_default_na: bool = True, na_filter: bool = True, skip_blank_lines: bool = True, parse_dates: Sequence[Hashable] | bool | None = None, date_format: dict[Hashable, str] | str | None = None, dayfirst: bool = False, cache_dates: bool = True, iterator: bool = False, chunksize: int | None = None, compression: Literal['bz2', 'gzip', 'infer', 'tar', 'xz', 'zip', 'zstd'] | dict[str, Any] | None = 'infer', thousands: str | None = None, decimal: str = '.', lineterminator: str | None = None, quotechar: str = '"', quoting: int = 0, doublequote: bool = True, escapechar: str | None = None, comment: str | None = None, encoding: str | None = None, encoding_errors: str | None = 'strict', dialect: Dialect | str | None = None, on_bad_lines: str = 'error', low_memory: bool = True, memory_map: bool = False, float_precision: Literal['high', 'legacy', 'round_trip'] | None = None, storage_options: dict[str, Any] | None = None, dtype_backend: Literal['numpy_nullable', 'pyarrow'] | _NoDefault = _NoDefault.no_default) -> DataFrame | TextFileReader` does not accept all arguments that overload signature `(filepath_or_buffer: PathLike[str] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | str, *, iterator: bool = ..., chunksize: int | None = ..., **kwds: Unpack[_read_shared[HashableT]]) -> DataFrame | TextFileReader` accepts [inconsistent-overload]
ERROR pandas/io/pytables.py:140:39-44: Could not import `Block` from `pandas.core.internals` [missing-module-attribute]
ERROR pandas/io/pytables.py:483:8-47: `<=` is not supported between `None` and `None` [unsupported-operation]
ERROR pandas/io/pytables.py:487:11-31: `>` is not supported between `None` and `Literal[1]` [unsupported-operation]
@ -1476,8 +1495,8 @@ Class `object` has no class attribute `startswith`
Object of class `ExtensionDtype` has no attribute `startswith`
Object of class `Mapping` has no attribute `startswith`
Object of class `dtype` has no attribute `startswith` [missing-attribute]
ERROR pandas/io/pytables.py:2702:48-53: Argument `ExtensionDtype | Mapping[Hashable, ExtensionDtype | dtype[Any] | str | type[bool | complex | object | str]] | dtype[Any] | str | type[bool] | type[complex] | type[object] | type[str] | Unknown` is not assignable to parameter `datetime64_dtype` with type `str` in function `_set_tz` [bad-argument-type]
ERROR pandas/io/pytables.py:2742:45-64: No matching overload found for function `numpy.ndarray.astype` called with arguments: (ExtensionDtype | Mapping[Hashable, ExtensionDtype | dtype[Any] | str | type[bool | complex | object | str]] | dtype[Any] | str | type[bool] | type[complex] | type[object] | type[str] | Unknown, copy=Literal[False]) [no-matching-overload]
ERROR pandas/io/pytables.py:2702:48-53: Argument `ExtensionDtype | Mapping[Hashable, Dtype] | dtype[Any] | str | type[bool] | type[complex] | type[object] | type[str] | Unknown` is not assignable to parameter `datetime64_dtype` with type `str` in function `_set_tz` [bad-argument-type]
ERROR pandas/io/pytables.py:2742:45-64: No matching overload found for function `numpy.ndarray.astype` called with arguments: (ExtensionDtype | Mapping[Hashable, Dtype] | dtype[Any] | str | type[bool] | type[complex] | type[object] | type[str] | Unknown, copy=Literal[False]) [no-matching-overload]
ERROR pandas/io/pytables.py:2749:17-26: Argument `Categorical | DatetimeArray | ndarray[tuple[Any, ...], dtype[Any]] | Unknown` is not assignable to parameter `data` with type `ndarray[tuple[Any, ...], dtype[Any]]` in function `_unconvert_string_array` [bad-argument-type]
ERROR pandas/io/pytables.py:2841:20-31: Returned type `tuple[int, ...] | tuple[int, int, int]` is not assignable to declared return type `tuple[int, int, int]` [bad-return]
ERROR pandas/io/pytables.py:3086:31-34: Argument `ndarray[tuple[int], dtype[float64]] | Unknown` is not assignable to parameter `values` with type `ndarray[tuple[Any, ...], dtype[signedinteger[_64Bit]]]` in function `_set_tz` [bad-argument-type]
@ -1496,9 +1515,7 @@ ERROR pandas/io/pytables.py:4136:40-43: Argument `int | Unknown | None` is not a
ERROR pandas/io/pytables.py:4383:23-37: `process_filter` may be uninitialized [unbound-name]
ERROR pandas/io/pytables.py:4402:28-63: Cannot set item in `dict[str, int | str]` [unsupported-operation]
ERROR pandas/io/pytables.py:4598:24-40: Object of class `bool` has no attribute `all` [missing-attribute]
ERROR pandas/io/pytables.py:4930:22-28: Class member `AppendableMultiSeriesTable.levels` overrides parent class `AppendableSeriesTable` in an inconsistent manner [bad-override]
ERROR pandas/io/pytables.py:4945:5-11: Class member `GenericTable.levels` overrides parent class `AppendableFrameTable` in an inconsistent manner [bad-override]
ERROR pandas/io/pytables.py:5023:19-25: Class member `AppendableMultiFrameTable.levels` overrides parent class `AppendableFrameTable` in an inconsistent manner [bad-override]
ERROR pandas/io/pytables.py:5205:19-35: Object of class `ndarray` has no attribute `to_numpy` [missing-attribute]
ERROR pandas/io/pytables.py:5503:44-49: `ndarray[tuple[Any, ...], dtype[Any]]` is not assignable to attribute `coordinates` with type `None` [bad-assignment]
ERROR pandas/io/pytables.py:5506:39-46: No matching overload found for function `Selection.generate` called with arguments: (ndarray[tuple[Any, ...], dtype[Any]] | Unknown | None) [no-matching-overload]
@ -1639,4 +1656,4 @@ ERROR typings/numba.pyi:20:7-23: Module `numba.core.types` exists, but was not i
ERROR typings/numba.pyi:21:12-28: Module `numba.core.types` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR typings/numba.pyi:24:21-35: No attribute `compiler` in module `numba` [missing-attribute]
INFO Checking project configured at `<CWD>/pyrefly.toml`
INFO 1,575 errors (615 suppressed)
INFO 1,592 errors (595 suppressed)

View File

@ -36,14 +36,14 @@ pandas/core/_numba/kernels/var_.py:145:21: error[unresolved-reference] Name `pre
pandas/core/algorithms.py:214:16: error[invalid-return-type] Return type does not match returned value: expected `ArrayLikeT@_reconstruct_data`, found `ExtensionArray`
pandas/core/algorithms.py:469:16: warning[possibly-missing-attribute] Attribute `unique` may be missing on object of type `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/algorithms.py:476:45: error[invalid-argument-type] Argument to function `_get_hashtable_algo` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[Any]]`, found `(ExtensionArray & ~Index) | (ndarray[tuple[Any, ...], dtype[Any]] & ~Index)`
pandas/core/algorithms.py:546:33: error[invalid-argument-type] Argument to bound method `isin` is incorrect: Expected `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]`, found `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | @Todo | ... omitted 4 union elements`
pandas/core/algorithms.py:551:30: warning[possibly-missing-attribute] Attribute `dtype` may be missing on object of type `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | @Todo | ... omitted 4 union elements`
pandas/core/algorithms.py:555:30: warning[possibly-missing-attribute] Attribute `dtype` may be missing on object of type `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | @Todo | ... omitted 4 union elements`
pandas/core/algorithms.py:556:34: warning[possibly-missing-attribute] Attribute `astype` may be missing on object of type `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | @Todo | ... omitted 4 union elements`
pandas/core/algorithms.py:558:21: warning[possibly-missing-attribute] Attribute `dtype` may be missing on object of type `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | @Todo | ... omitted 4 union elements`
pandas/core/algorithms.py:586:38: warning[possibly-missing-attribute] Attribute `dtype` may be missing on object of type `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | @Todo | ... omitted 4 union elements`
pandas/core/algorithms.py:587:18: warning[possibly-missing-attribute] Attribute `astype` may be missing on object of type `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | @Todo | ... omitted 4 union elements`
pandas/core/algorithms.py:591:27: error[invalid-argument-type] Argument to function `ismember` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[Any]]`, found `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | @Todo | ... omitted 5 union elements`
pandas/core/algorithms.py:546:33: error[invalid-argument-type] Argument to bound method `isin` is incorrect: Expected `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]`, found `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | Index | ... omitted 3 union elements`
pandas/core/algorithms.py:551:30: warning[possibly-missing-attribute] Attribute `dtype` may be missing on object of type `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | Index | ... omitted 3 union elements`
pandas/core/algorithms.py:555:30: warning[possibly-missing-attribute] Attribute `dtype` may be missing on object of type `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | Index | ... omitted 3 union elements`
pandas/core/algorithms.py:556:34: warning[possibly-missing-attribute] Attribute `astype` may be missing on object of type `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | Index | ... omitted 3 union elements`
pandas/core/algorithms.py:558:21: warning[possibly-missing-attribute] Attribute `dtype` may be missing on object of type `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | Index | ... omitted 3 union elements`
pandas/core/algorithms.py:586:38: warning[possibly-missing-attribute] Attribute `dtype` may be missing on object of type `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | Index | ... omitted 3 union elements`
pandas/core/algorithms.py:587:18: warning[possibly-missing-attribute] Attribute `astype` may be missing on object of type `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | Index | ... omitted 3 union elements`
pandas/core/algorithms.py:591:27: error[invalid-argument-type] Argument to function `ismember` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[Any]]`, found `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | Index | ... omitted 5 union elements`
pandas/core/algorithms.py:855:33: error[invalid-argument-type] Argument to function `_reconstruct_data` is incorrect: Argument type `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | Any | Index | Series` does not satisfy constraints (`ExtensionArray`, `ndarray[tuple[Any, ...], dtype[Any]]`) of type variable `ArrayLikeT`
pandas/core/algorithms.py:930:54: error[invalid-argument-type] Argument to function `value_counts_arraylike` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[Any]]`, found `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/algorithms.py:1062:32: error[invalid-argument-type] Argument to function `_reconstruct_data` is incorrect: Argument type `Unknown | ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | ... omitted 3 union elements` does not satisfy constraints (`ExtensionArray`, `ndarray[tuple[Any, ...], dtype[Any]]`) of type variable `ArrayLikeT`
@ -51,7 +51,6 @@ pandas/core/algorithms.py:1368:33: warning[possibly-missing-attribute] Attribute
pandas/core/apply.py:197:50: error[invalid-argument-type] Argument expression after ** must be a mapping type: Found `Unknown | None`
pandas/core/apply.py:379:57: error[invalid-argument-type] Argument to bound method `normalize_dictlike_arg` is incorrect: Expected `DataFrame | Series`, found `(Unknown & NDFrame) | Series | DataFrame | ... omitted 5 union elements`
pandas/core/apply.py:2000:49: error[invalid-argument-type] Argument to function `relabel_result` is incorrect: Expected `dict[str, list[((...) -> Unknown) | str]]`, found `((...) -> Unknown) | str | list[((...) -> Unknown) | str] | MutableMapping[Hashable, ((...) -> Unknown) | str | list[((...) -> Unknown) | str]]`
pandas/core/array_algos/masked_accumulations.py:50:22: error[invalid-assignment] Object of type `iinfo[<class 'unsignedinteger[_8Bit]'>]` is not assignable to `iinfo[integer[Any]] | finfo[floating[Any]]`
pandas/core/array_algos/quantile.py:145:12: error[no-matching-overload] No overload of function `quantile` matches arguments
pandas/core/array_algos/quantile.py:218:16: error[no-matching-overload] No overload of function `quantile` matches arguments
pandas/core/array_algos/take.py:96:43: error[invalid-argument-type] Argument to function `maybe_promote` is incorrect: Expected `dtype[Any]`, found `ExtensionDtype | dtype[Any]`
@ -203,7 +202,6 @@ pandas/core/arrays/arrow/array.py:1381:20: error[invalid-return-type] Return typ
pandas/core/arrays/arrow/array.py:1409:16: error[invalid-return-type] Return type does not match returned value: expected `Self@fillna`, found `ArrowExtensionArray`
pandas/core/arrays/arrow/array.py:1416:18: error[unresolved-attribute] Module `pyarrow.compute` has no member `is_in`
pandas/core/arrays/arrow/array.py:1502:41: error[unresolved-attribute] Module `pyarrow.compute` has no member `round`
pandas/core/arrays/arrow/array.py:1749:22: error[unresolved-attribute] Object of type `ndarray[tuple[Any, ...], dtype[Any]]` has no attribute `to_numpy`
pandas/core/arrays/arrow/array.py:1766:21: error[unresolved-attribute] Module `pyarrow.compute` has no member `unique`
pandas/core/arrays/arrow/array.py:1920:23: error[unresolved-attribute] Module `pyarrow.compute` has no member `is_null`
pandas/core/arrays/arrow/array.py:1921:16: error[unresolved-attribute] Module `pyarrow.compute` has no member `all`
@ -309,10 +307,12 @@ pandas/core/arrays/arrow/array.py:3162:18: error[unresolved-attribute] Module `p
pandas/core/arrays/arrow/array.py:3197:22: error[unresolved-attribute] Module `pyarrow.compute` has no member `local_timestamp`
pandas/core/arrays/arrow/array.py:3199:22: error[unresolved-attribute] Module `pyarrow.compute` has no member `assume_timezone`
pandas/core/arrays/arrow/extension_types.py:171:5: error[unresolved-attribute] Unresolved attribute `_hotfix_installed` on type `<module 'pyarrow'>`.
pandas/core/arrays/boolean.py:259:24: warning[possibly-missing-attribute] Attribute `shape` may be missing on object of type `@Todo | None`
pandas/core/arrays/boolean.py:262:12: error[invalid-return-type] Return type does not match returned value: expected `tuple[ndarray[tuple[Any, ...], dtype[Any]], ndarray[tuple[Any, ...], dtype[Any]]]`, found `tuple[@Todo, @Todo | None]`
pandas/core/arrays/boolean.py:259:24: warning[possibly-missing-attribute] Attribute `shape` may be missing on object of type `Unknown | None | ndarray[tuple[Any, ...], dtype[bool[bool]]] | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/arrays/boolean.py:262:12: error[invalid-return-type] Return type does not match returned value: expected `tuple[ndarray[tuple[Any, ...], dtype[Any]], ndarray[tuple[Any, ...], dtype[Any]]]`, found `tuple[@Todo | ndarray[tuple[int], dtype[Any]], Unknown | None | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | ndarray[tuple[Any, ...], dtype[Any]]]`
pandas/core/arrays/boolean.py:385:9: error[invalid-method-override] Invalid override of method `_coerce_to_array`: Definition is incompatible with `BaseMaskedArray._coerce_to_array`
pandas/core/arrays/categorical.py:494:25: warning[possibly-missing-attribute] Attribute `_codes` may be missing on object of type `Unknown | RangeIndex | ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/arrays/categorical.py:494:25: warning[possibly-missing-attribute] Attribute `_codes` may be missing on object of type `Unknown | RangeIndex | ndarray[tuple[Any, ...], dtype[Any]] | ExtensionArray`
pandas/core/arrays/categorical.py:700:18: warning[possibly-missing-attribute] Attribute `is_monotonic_increasing` may be missing on object of type `Index | Unknown | ndarray[tuple[Any, ...], dtype[bool[bool]]]`
pandas/core/arrays/categorical.py:703:26: warning[possibly-missing-attribute] Attribute `sort_values` may be missing on object of type `Index | Unknown | ndarray[tuple[Any, ...], dtype[bool[bool]]]`
pandas/core/arrays/categorical.py:1397:21: error[no-matching-overload] No overload of function `find_common_type` matches arguments
pandas/core/arrays/categorical.py:1655:9: error[invalid-method-override] Invalid override of method `_validate_scalar`: Definition is incompatible with `NDArrayBackedExtensionArray._validate_scalar`
pandas/core/arrays/categorical.py:2229:9: error[invalid-method-override] Invalid override of method `_box_func`: Definition is incompatible with `NDArrayBackedExtensionArray._box_func`
@ -323,16 +323,19 @@ pandas/core/arrays/categorical.py:2989:9: error[invalid-method-override] Invalid
pandas/core/arrays/categorical.py:2992:9: error[invalid-method-override] Invalid override of method `_delegate_property_set`: Definition is incompatible with `PandasDelegate._delegate_property_set`
pandas/core/arrays/datetimelike.py:387:9: error[invalid-method-override] Invalid override of method `__getitem__`: Definition is incompatible with `ExtensionArray.__getitem__`
pandas/core/arrays/datetimelike.py:565:18: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `(Unknown & ~str) | Period | Timestamp | Timedelta | NaTType`
pandas/core/arrays/datetimelike.py:1144:42: error[invalid-argument-type] Argument to bound method `_simple_new` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[datetime64[date | int | None]]]`, found `ndarray[tuple[Any, ...], str]`
pandas/core/arrays/datetimelike.py:1206:43: error[invalid-argument-type] Argument to bound method `_simple_new` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[timedelta64[timedelta | int | None]]]`, found `ndarray[tuple[Any, ...], str]`
pandas/core/arrays/datetimelike.py:1315:20: error[invalid-return-type] Return type does not match returned value: expected `ndarray[tuple[Any, ...], dtype[Any]]`, found `ndarray[tuple[int, ...], dtype[Any] | str]`
pandas/core/arrays/datetimelike.py:1582:16: error[invalid-return-type] Return type does not match returned value: expected `Self@_quantile`, found `DatetimeLikeArrayMixin`
pandas/core/arrays/datetimelike.py:1771:47: error[invalid-argument-type] Argument to bound method `_simple_new` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[timedelta64[timedelta | int | None]]]`, found `ndarray[tuple[Any, ...], str]`
pandas/core/arrays/datetimelike.py:2375:9: error[invalid-method-override] Invalid override of method `_concat_same_type`: Definition is incompatible with `NDArrayBacked._concat_same_type`
pandas/core/arrays/datetimelike.py:2399:16: error[invalid-return-type] Return type does not match returned value: expected `Self@copy`, found `TimelikeOps`
pandas/core/arrays/datetimelike.py:2458:16: error[invalid-return-type] Return type does not match returned value: expected `Self@take`, found `TimelikeOps`
pandas/core/arrays/datetimelike.py:2476:36: error[invalid-argument-type] Argument to function `py_get_unit_from_dtype` is incorrect: Expected `dtype[Any]`, found `ExtensionDtype`
pandas/core/arrays/datetimes.py:410:9: error[invalid-method-override] Invalid override of method `_generate_range`: Definition is incompatible with `TimelikeOps._generate_range`
pandas/core/arrays/datetimes.py:483:62: warning[possibly-missing-attribute] Attribute `tz` may be missing on object of type `Timestamp | None`
pandas/core/arrays/datetimes.py:501:51: error[invalid-argument-type] Argument to bound method `tz_localize` is incorrect: Expected `bool | Literal["NaT", "raise"]`, found `Literal["NaT", "infer", "raise"] | @Todo`
pandas/core/arrays/datetimes.py:503:47: error[invalid-argument-type] Argument to bound method `tz_localize` is incorrect: Expected `bool | Literal["NaT", "raise"]`, found `Literal["NaT", "infer", "raise"] | @Todo`
pandas/core/arrays/datetimes.py:501:51: error[invalid-argument-type] Argument to bound method `tz_localize` is incorrect: Expected `bool | Literal["NaT", "raise"]`, found `Literal["NaT", "infer", "raise"] | ndarray[tuple[Any, ...], dtype[bool[bool]]]`
pandas/core/arrays/datetimes.py:503:47: error[invalid-argument-type] Argument to bound method `tz_localize` is incorrect: Expected `bool | Literal["NaT", "raise"]`, found `Literal["NaT", "infer", "raise"] | ndarray[tuple[Any, ...], dtype[bool[bool]]]`
pandas/core/arrays/datetimes.py:511:32: warning[possibly-missing-attribute] Attribute `_value` may be missing on object of type `Timestamp | None`
pandas/core/arrays/datetimes.py:511:45: warning[possibly-missing-attribute] Attribute `_value` may be missing on object of type `Timestamp | None`
pandas/core/arrays/datetimes.py:512:19: warning[possibly-missing-attribute] Attribute `_value` may be missing on object of type `Timestamp | None`
@ -341,6 +344,8 @@ pandas/core/arrays/datetimes.py:524:32: error[invalid-argument-type] Argument to
pandas/core/arrays/datetimes.py:561:45: error[invalid-argument-type] Argument to bound method `_from_value_and_reso` is incorrect: Expected `int`, found `datetime64[date | int | None]`
pandas/core/arrays/datetimes.py:590:21: error[invalid-type-form] Variable of type `property` is not allowed in a type expression
pandas/core/arrays/datetimes.py:639:25: error[invalid-type-form] Variable of type `property` is not allowed in a type expression
pandas/core/arrays/datetimes.py:1114:65: error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]], ...], /) -> ndarray[tuple[Any, ...], str], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], str], (key: str, /) -> ndarray[tuple[Any, ...], dtype[Any]], (key: list[str], /) -> ndarray[tuple[Any, ...], dtype[void]]]` cannot be called with key of type `Literal[0]` on object of type `ndarray[tuple[Any, ...], str]`
pandas/core/arrays/datetimes.py:1121:33: error[invalid-argument-type] Argument to bound method `_simple_new` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[datetime64[date | int | None]]]`, found `ndarray[tuple[Any, ...], str]`
pandas/core/arrays/datetimes.py:2891:21: error[invalid-assignment] Object of type `Timestamp` is not assignable to `_TimestampNoneT1@_maybe_normalize_endpoints`
pandas/core/arrays/datetimes.py:2894:19: error[invalid-assignment] Object of type `Timestamp` is not assignable to `_TimestampNoneT2@_maybe_normalize_endpoints`
pandas/core/arrays/datetimes.py:2928:29: error[invalid-argument-type] Argument to bound method `tz_localize` is incorrect: Expected `bool | Literal["NaT", "raise"]`, found `Unknown | bool | None`
@ -352,13 +357,9 @@ pandas/core/arrays/interval.py:399:50: warning[possibly-missing-attribute] Attri
pandas/core/arrays/interval.py:399:63: warning[possibly-missing-attribute] Attribute `unit` may be missing on object of type `Index | Unknown`
pandas/core/arrays/interval.py:401:35: warning[possibly-missing-attribute] Attribute `_ensure_matching_resos` may be missing on object of type `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | Unknown`
pandas/core/arrays/interval.py:831:9: error[invalid-method-override] Invalid override of method `__getitem__`: Definition is incompatible with `ExtensionArray.__getitem__`
pandas/core/arrays/interval.py:840:35: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Argument type `Unknown | ndarray[tuple[Any, ...], dtype[Any]]` does not satisfy constraints (`int`, `int | float`, `Timestamp`, `Timedelta`) of type variable `_OrderableT`
pandas/core/arrays/interval.py:840:35: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int`, found `Unknown | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/arrays/interval.py:1001:16: error[invalid-return-type] Return type does not match returned value: expected `Interval[Unknown] | int | float`, found `Self@min`
pandas/core/arrays/interval.py:1018:16: error[invalid-return-type] Return type does not match returned value: expected `Interval[Unknown] | int | float`, found `Self@max`
pandas/core/arrays/interval.py:1127:9: error[invalid-method-override] Invalid override of method `_concat_same_type`: Definition is incompatible with `ExtensionArray._concat_same_type`
pandas/core/arrays/interval.py:1801:50: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Argument type `Period | Timestamp | Timedelta | NaTType | ndarray[tuple[Any, ...], dtype[Any]]` does not satisfy constraints (`int`, `int | float`, `Timestamp`, `Timedelta`) of type variable `_OrderableT`
pandas/core/arrays/interval.py:1801:50: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int`, found `Period | Timestamp | Timedelta | NaTType | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/arrays/interval.py:1801:50: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Argument type `Period | Timestamp | Timedelta | NaTType | Any` does not satisfy constraints (`int`, `int | float`, `Timestamp`, `Timedelta`) of type variable `_OrderableT`
pandas/core/arrays/interval.py:1801:50: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int`, found `Period | Timestamp | Timedelta | NaTType | Any`
pandas/core/arrays/masked.py:185:30: error[invalid-assignment] Object of type `ndarray[tuple[int, ...], dtype[Any] | type]` is not assignable to `ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/arrays/masked.py:385:9: error[invalid-method-override] Invalid override of method `__contains__`: Definition is incompatible with `ExtensionArray.__contains__`
pandas/core/arrays/masked.py:1036:9: error[invalid-method-override] Invalid override of method `_concat_same_type`: Definition is incompatible with `ExtensionArray._concat_same_type`
@ -371,7 +372,7 @@ pandas/core/arrays/period.py:917:17: error[unresolved-attribute] Object of type
pandas/core/arrays/period.py:1033:9: error[invalid-method-override] Invalid override of method `_add_offset`: Definition is incompatible with `DatetimeLikeArrayMixin._add_offset`
pandas/core/arrays/period.py:1370:12: error[unresolved-attribute] Object of type `BaseOffset` has no attribute `_period_dtype_code`
pandas/core/arrays/period.py:1464:45: error[invalid-argument-type] Argument to function `freq_to_dtype_code` is incorrect: Expected `BaseOffset`, found `None`
pandas/core/arrays/period.py:1469:12: error[invalid-return-type] Return type does not match returned value: expected `tuple[ndarray[tuple[Any, ...], dtype[Any]], BaseOffset]`, found `tuple[@Todo, BaseOffset | Unknown | None]`
pandas/core/arrays/period.py:1469:12: error[invalid-return-type] Return type does not match returned value: expected `tuple[ndarray[tuple[Any, ...], dtype[Any]], BaseOffset]`, found `tuple[ndarray[tuple[Any, ...], dtype[Any]], BaseOffset | Unknown | None]`
pandas/core/arrays/sparse/accessor.py:76:24: warning[possibly-missing-attribute] Attribute `array` may be missing on object of type `Unknown | None`
pandas/core/arrays/sparse/accessor.py:240:13: error[invalid-argument-type] Argument to function `sparse_series_to_coo` is incorrect: Expected `Series`, found `Unknown | None`
pandas/core/arrays/sparse/accessor.py:271:13: warning[possibly-missing-attribute] Attribute `array` may be missing on object of type `Unknown | None`
@ -385,15 +386,18 @@ pandas/core/arrays/sparse/accessor.py:430:34: warning[possibly-missing-attribute
pandas/core/arrays/sparse/accessor.py:435:40: warning[possibly-missing-attribute] Attribute `items` may be missing on object of type `Unknown | None`
pandas/core/arrays/sparse/accessor.py:446:67: warning[possibly-missing-attribute] Attribute `shape` may be missing on object of type `Unknown | None`
pandas/core/arrays/sparse/accessor.py:464:62: warning[possibly-missing-attribute] Attribute `items` may be missing on object of type `Unknown | None`
pandas/core/arrays/sparse/accessor.py:465:16: error[invalid-return-type] Return type does not match returned value: expected `int | float`, found `floating[Any]`
pandas/core/arrays/sparse/array.py:844:34: error[invalid-argument-type] Argument to function `result_type` is incorrect: Expected `_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 12 union elements`, found `object`
pandas/core/arrays/sparse/array.py:948:16: warning[possibly-missing-attribute] Attribute `any` may be missing on object of type `Unknown | ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/arrays/sparse/array.py:949:17: error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]], ...], /) -> ndarray[tuple[Any, ...], dtype[signedinteger[_64Bit]]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], dtype[signedinteger[_64Bit]]], (key: str, /) -> ndarray[tuple[Any, ...], dtype[Any]], (key: list[str], /) -> ndarray[tuple[Any, ...], dtype[void]]]` cannot be called with key of type `Unknown | ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]` on object of type `ndarray[tuple[Any, ...], dtype[signedinteger[_64Bit]]]`
pandas/core/arrays/sparse/array.py:978:9: error[invalid-method-override] Invalid override of method `__getitem__`: Definition is incompatible with `ExtensionArray.__getitem__`
pandas/core/arrays/sparse/array.py:1078:42: error[invalid-argument-type] Argument to function `maybe_box_datetimelike` is incorrect: Expected `str | bytes | date | ... omitted 10 union elements`, found `ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/arrays/sparse/array.py:1188:9: error[invalid-method-override] Invalid override of method `searchsorted`: Definition is incompatible with `ExtensionArray.searchsorted`
pandas/core/arrays/sparse/array.py:1205:9: error[invalid-method-override] Invalid override of method `_concat_same_type`: Definition is incompatible with `ExtensionArray._concat_same_type`
pandas/core/arrays/sparse/array.py:1933:19: warning[possibly-missing-attribute] Attribute `sp_index` may be missing on object of type `Unknown | ndarray[tuple[Any, ...], dtype[bool[bool]]]`
pandas/core/arrays/string_.py:225:23: error[invalid-type-form] Invalid subscript of object of type `property` in type expression
pandas/core/arrays/string_.py:548:16: error[invalid-return-type] Return type does not match returned value: expected `Self@view`, found `BaseStringArray`
pandas/core/arrays/string_.py:689:9: error[invalid-method-override] Invalid override of method `_validate_scalar`: Definition is incompatible with `NumpyExtensionArray._validate_scalar`
pandas/core/arrays/string_.py:749:22: error[no-matching-overload] No overload of bound method `astype` matches arguments
pandas/core/arrays/string_.py:749:22: error[no-matching-overload] No overload of bound method `astype` matches arguments
pandas/core/arrays/string_arrow.py:245:9: error[invalid-method-override] Invalid override of method `_convert_bool_result`: Definition is incompatible with `ArrowExtensionArray._convert_bool_result`
pandas/core/arrays/string_arrow.py:291:18: error[unresolved-attribute] Module `pyarrow.compute` has no member `is_in`
pandas/core/arrays/string_arrow.py:446:18: error[unresolved-attribute] Module `pyarrow.compute` has no member `count_substring_regex`
@ -401,7 +405,6 @@ pandas/core/arrays/string_arrow.py:493:23: error[unresolved-attribute] Module `p
pandas/core/arrays/string_arrow.py:494:23: error[unresolved-attribute] Module `pyarrow.compute` has no member `or_kleene`
pandas/core/arrays/string_arrow.py:494:41: error[unresolved-attribute] Module `pyarrow.compute` has no member `not_equal`
pandas/core/arrays/string_arrow.py:496:23: error[unresolved-attribute] Module `pyarrow.compute` has no member `not_equal`
pandas/core/arrays/timedeltas.py:157:28: error[no-matching-overload] No overload of function `__new__` matches arguments
pandas/core/arrays/timedeltas.py:188:47: error[invalid-argument-type] Argument to bound method `_from_value_and_reso` is incorrect: Expected `signedinteger[_64Bit]`, found `timedelta64[timedelta | int | None]`
pandas/core/arrays/timedeltas.py:243:9: error[invalid-method-override] Invalid override of method `_from_sequence`: Definition is incompatible with `ExtensionArray._from_sequence`
pandas/core/arrays/timedeltas.py:250:46: error[invalid-argument-type] Argument to function `astype_overflowsafe` is incorrect: Expected `dtype[Any]`, found `(Unknown & ~AlwaysTruthy & ~None) | dtype[Any] | ExtensionDtype`
@ -416,6 +419,7 @@ pandas/core/arrays/timedeltas.py:1160:45: error[invalid-argument-type] Argument
pandas/core/arrays/timedeltas.py:1161:40: error[invalid-argument-type] Argument to function `astype_overflowsafe` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[Any]]`, found `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/base.py:1265:20: error[call-non-callable] Object of type `object` is not callable
pandas/core/col.py:170:23: error[unresolved-attribute] Object of type `(...) -> Any` has no attribute `__name__`
pandas/core/common.py:452:38: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_SupportsArray[dtype[bool[bool] | integer[Any]]] | _NestedSequence[_SupportsArray[dtype[bool[bool] | integer[Any]]]] | int | ... omitted 3 union elements`, found `int | ndarray[tuple[Any, ...], dtype[Any]] | Generator | ... omitted 3 union elements`
pandas/core/common.py:522:9: error[invalid-assignment] Invalid subscript assignment with key of type `object` and value of type `_T@pipe` on object of type `dict[str, Any]`
pandas/core/common.py:523:16: error[call-non-callable] Object of type `object` is not callable
pandas/core/computation/align.py:161:23: warning[possibly-missing-attribute] Attribute `value` may be missing on object of type `Unknown | list[Unknown]`
@ -429,18 +433,21 @@ pandas/core/computation/pytables.py:624:30: warning[possibly-missing-attribute]
pandas/core/computation/pytables.py:631:27: warning[possibly-missing-attribute] Attribute `prune` may be missing on object of type `Unknown | None`
pandas/core/construction.py:585:51: error[invalid-argument-type] Argument to function `construct_1d_arraylike_from_scalar` is incorrect: Expected `str | bytes | date | ... omitted 10 union elements`, found `object`
pandas/core/construction.py:605:25: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `~ExtensionArray & ~<Protocol with members '__array__'>`
pandas/core/construction.py:616:26: error[no-matching-overload] No overload of function `maybe_convert_objects` matches arguments
pandas/core/construction.py:658:21: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `~ExtensionArray & ~<Protocol with members '__array__'>`
pandas/core/dtypes/cast.py:197:23: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `str | Buffer | SupportsFloat | SupportsIndex`, found `str | bytes | date | ... omitted 12 union elements`
pandas/core/dtypes/cast.py:199:21: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `str | bytes | date | ... omitted 12 union elements`
pandas/core/dtypes/cast.py:344:23: error[unresolved-attribute] Object of type `ExtensionArray & ~ndarray[tuple[object, ...], dtype[object]]` has no attribute `iloc`
pandas/core/dtypes/cast.py:359:44: error[invalid-argument-type] Argument to function `allclose` is incorrect: Expected `_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 5 union elements`, found `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/dtypes/cast.py:380:36: error[invalid-argument-type] Argument to function `allclose` is incorrect: Expected `_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 5 union elements`, found `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/dtypes/cast.py:386:39: error[invalid-argument-type] Argument to function `array_equal` is incorrect: Expected `_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 5 union elements`, found `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/dtypes/cast.py:407:16: error[invalid-argument-type] Argument to bound method `astype` is incorrect: Expected `Index`, found `NumpyIndexT@maybe_upcast_numeric_to_64bit`
pandas/core/dtypes/cast.py:407:16: error[no-matching-overload] No overload of bound method `astype` matches arguments
pandas/core/dtypes/cast.py:409:16: error[invalid-argument-type] Argument to bound method `astype` is incorrect: Expected `Index`, found `NumpyIndexT@maybe_upcast_numeric_to_64bit`
pandas/core/dtypes/cast.py:409:16: error[no-matching-overload] No overload of bound method `astype` matches arguments
pandas/core/dtypes/cast.py:411:16: error[invalid-argument-type] Argument to bound method `astype` is incorrect: Expected `Index`, found `NumpyIndexT@maybe_upcast_numeric_to_64bit`
pandas/core/dtypes/cast.py:411:16: error[no-matching-overload] No overload of bound method `astype` matches arguments
pandas/core/dtypes/cast.py:445:21: error[no-matching-overload] No overload of function `__new__` matches arguments
pandas/core/dtypes/cast.py:728:23: error[no-matching-overload] No overload of function `__new__` matches arguments
pandas/core/dtypes/cast.py:500:42: error[invalid-argument-type] Argument to function `datetime_data` is incorrect: Expected `str | _SupportsDType[dtype[datetime64[date | int | None]]] | dtype[datetime64[date | int | None]] | dtype[timedelta64[timedelta | int | None]]`, found `Unknown | int | float`
pandas/core/dtypes/cast.py:1527:26: error[no-matching-overload] No overload of bound method `astype` matches arguments
pandas/core/dtypes/cast.py:1527:26: error[no-matching-overload] No overload of bound method `astype` matches arguments
pandas/core/dtypes/dtypes.py:329:35: warning[possibly-missing-attribute] Attribute `dtype` may be missing on object of type `Unknown | None`
@ -450,6 +457,7 @@ pandas/core/dtypes/dtypes.py:452:34: error[unresolved-attribute] Object of type
pandas/core/dtypes/dtypes.py:455:33: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `~None`
pandas/core/dtypes/dtypes.py:472:37: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `~None`
pandas/core/dtypes/dtypes.py:806:43: error[invalid-argument-type] Argument to function `tz_standardize` is incorrect: Expected `tzinfo`, found `tzinfo | None`
pandas/core/dtypes/dtypes.py:972:24: error[no-matching-overload] No overload of function `amax` matches arguments
pandas/core/dtypes/dtypes.py:1363:39: error[invalid-type-form] Invalid subscript of object of type `property` in type expression
pandas/core/dtypes/dtypes.py:1398:23: error[invalid-type-form] Invalid subscript of object of type `property` in type expression
pandas/core/dtypes/dtypes.py:1548:23: error[invalid-type-form] Invalid subscript of object of type `property` in type expression
@ -457,14 +465,16 @@ pandas/core/dtypes/inference.py:301:17: error[invalid-argument-type] Argument to
pandas/core/dtypes/missing.py:392:12: error[unsupported-operator] Unary operator `~` is unsupported for type `~bool`
pandas/core/frame.py:894:56: error[invalid-argument-type] Argument to function `construct_1d_arraylike_from_scalar` is incorrect: Expected `str | bytes | date | ... omitted 10 union elements`, found `(@Todo & ~BlockManager & ~None & ~Top[dict[Unknown, Unknown]] & ~ndarray[tuple[object, ...], dtype[object]] & ~Series & ~Index & ~ExtensionArray) | (list[Unknown] & ~BlockManager & ~ndarray[tuple[object, ...], dtype[object]] & ~Series & ~Index & ~ExtensionArray)`
pandas/core/frame.py:900:21: error[invalid-argument-type] Argument to function `construct_2d_arraylike_from_scalar` is incorrect: Expected `str | bytes | date | ... omitted 10 union elements`, found `(@Todo & ~BlockManager & ~None & ~Top[dict[Unknown, Unknown]] & ~ndarray[tuple[object, ...], dtype[object]] & ~Series & ~Index & ~ExtensionArray) | (list[Unknown] & ~BlockManager & ~ndarray[tuple[object, ...], dtype[object]] & ~Series & ~Index & ~ExtensionArray)`
pandas/core/frame.py:2358:37: error[no-matching-overload] No overload of function `maybe_convert_objects` matches arguments
pandas/core/frame.py:2378:21: warning[possibly-missing-attribute] Attribute `get_loc` may be missing on object of type `None | Index`
pandas/core/frame.py:2399:23: warning[possibly-missing-attribute] Attribute `drop` may be missing on object of type `None | Index`
pandas/core/frame.py:2401:37: error[invalid-argument-type] Argument to function `arrays_to_mgr` is incorrect: Expected `Index`, found `None | Index`
pandas/core/frame.py:2541:20: error[unsupported-operator] Operator `in` is not supported for types `Hashable` and `None`, in comparing `Hashable` with `Unknown | None`
pandas/core/frame.py:2541:20: error[unsupported-operator] Operator `in` is not supported between objects of type `Hashable` and `Unknown | None`
pandas/core/frame.py:2542:37: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
pandas/core/frame.py:2543:22: error[unsupported-operator] Operator `in` is not supported for types `int` and `None`, in comparing `int` with `Unknown | None`
pandas/core/frame.py:2543:22: error[unsupported-operator] Operator `in` is not supported between objects of type `int` and `Unknown | None`
pandas/core/frame.py:2544:37: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
pandas/core/frame.py:4106:9: error[invalid-method-override] Invalid override of method `__getitem__`: Definition is incompatible with `NDFrame.__getitem__`
pandas/core/frame.py:4647:29: error[no-matching-overload] No overload of function `tile` matches arguments
pandas/core/frame.py:5232:32: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `Iterable[Unknown]`, found `Unknown | None | tuple[Unknown & ~None] | tuple[()]`
pandas/core/frame.py:5232:52: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `Iterable[Unknown]`, found `Unknown | None | tuple[Unknown & ~None] | tuple[()]`
pandas/core/frame.py:7272:9: error[invalid-method-override] Invalid override of method `sort_values`: Definition is incompatible with `NDFrame.sort_values`
@ -479,8 +489,8 @@ pandas/core/frame.py:13843:22: error[no-matching-overload] No overload of bound
pandas/core/generic.py:1070:55: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `Iterable[Unknown]`, found `(Mapping[Any, Hashable] & ~(() -> object)) | (((Any, /) -> Hashable) & ~(() -> object))`
pandas/core/generic.py:3564:31: error[no-matching-overload] No overload of bound method `pop` matches arguments
pandas/core/generic.py:3565:32: error[no-matching-overload] No overload of bound method `pop` matches arguments
pandas/core/generic.py:4217:24: error[invalid-return-type] Return type does not match returned value: expected `Self@xs`, found `Unknown | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/generic.py:4592:13: error[invalid-assignment] Object of type `Unknown | str` is not assignable to `int | Literal["columns", "index", "rows"]`
pandas/core/generic.py:4669:24: error[unresolved-attribute] Object of type `ndarray[tuple[Any, ...], dtype[bool[bool]]]` has no attribute `to_numpy`
pandas/core/generic.py:6196:21: error[invalid-assignment] Cannot assign to a subscript on an object of type `Self@__setattr__`
pandas/core/generic.py:6523:16: warning[redundant-cast] Value is already of type `Self@astype`
pandas/core/generic.py:7154:25: error[invalid-assignment] Cannot assign to a subscript on an object of type `Self@fillna`
@ -509,6 +519,7 @@ pandas/core/groupby/numba_.py:116:18: error[not-iterable] Object of type `prange
pandas/core/groupby/numba_.py:118:22: error[not-iterable] Object of type `prange` is not iterable
pandas/core/groupby/numba_.py:176:18: error[not-iterable] Object of type `prange` is not iterable
pandas/core/groupby/numba_.py:178:22: error[not-iterable] Object of type `prange` is not iterable
pandas/core/indexers/utils.py:565:23: warning[possibly-missing-attribute] Attribute `to_numpy` may be missing on object of type `Unknown | ndarray[tuple[Any, ...], dtype[Unknown]]`
pandas/core/indexes/accessors.py:91:9: error[invalid-method-override] Invalid override of method `_delegate_property_get`: Definition is incompatible with `PandasDelegate._delegate_property_get`
pandas/core/indexes/accessors.py:175:9: error[invalid-method-override] Invalid override of method `_delegate_property_get`: Definition is incompatible with `PandasDelegate._delegate_property_get`
pandas/core/indexes/base.py:428:11: error[invalid-type-form] Variable of type `Accessor` is not allowed in a type expression
@ -516,6 +527,8 @@ pandas/core/indexes/base.py:440:24: error[invalid-type-form] Variable of type `A
pandas/core/indexes/base.py:441:23: error[invalid-type-form] Variable of type `Accessor` is not allowed in a type expression
pandas/core/indexes/base.py:545:33: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `(Unknown & ~range & ~<Protocol with members '__array__'>) | None`
pandas/core/indexes/base.py:562:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `(Unknown & ~range & ~<Protocol with members '__array__'> & ~Top[list[Unknown]] & ~tuple[object, ...]) | None`
pandas/core/indexes/base.py:972:20: error[invalid-argument-type] Argument to function `ndim` is incorrect: Expected `_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 5 union elements`, found `object`
pandas/core/indexes/base.py:1359:42: error[invalid-argument-type] Argument to bound method `repeat` is incorrect: Expected `int | Sequence[int]`, found `ndarray[tuple[Any, ...], dtype[signedinteger[_64Bit]]]`
pandas/core/indexes/base.py:1831:16: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `Unknown | FrozenList | list[Unknown | None] | None`
pandas/core/indexes/base.py:1833:75: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `Unknown | FrozenList | list[Unknown | None] | None`
pandas/core/indexes/base.py:1839:16: error[invalid-return-type] Return type does not match returned value: expected `list[Hashable]`, found `Unknown | FrozenList | list[Unknown | None] | None`
@ -530,15 +543,15 @@ pandas/core/indexes/base.py:5019:10: error[invalid-argument-type] Argument to fu
pandas/core/indexes/base.py:5299:23: error[unresolved-attribute] Object of type `~slice[object, object, object]` has no attribute `to_numpy`
pandas/core/indexes/base.py:5310:18: error[no-matching-overload] No overload of bound method `__getitem__` matches arguments
pandas/core/indexes/base.py:5310:18: error[no-matching-overload] No overload of bound method `__getitem__` matches arguments
pandas/core/indexes/base.py:5745:16: error[no-matching-overload] No overload of bound method `searchsorted` matches arguments
pandas/core/indexes/base.py:6135:64: error[invalid-argument-type] Argument to bound method `get_indexer_non_unique` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[Any]]`, found `Unknown | ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/indexes/base.py:6135:64: error[invalid-argument-type] Argument to bound method `get_indexer_non_unique` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[Any]]`, found `Unknown | ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/indexes/base.py:6464:16: error[no-matching-overload] No overload of bound method `__init__` matches arguments
pandas/core/indexes/category.py:429:9: error[invalid-method-override] Invalid override of method `_maybe_cast_listlike_indexer`: Definition is incompatible with `Index._maybe_cast_listlike_indexer`
pandas/core/indexes/datetimelike.py:139:10: error[invalid-argument-type] Argument to function `doc` is incorrect: Expected `None | str | ((...) -> Unknown)`, found `property`
pandas/core/indexes/datetimelike.py:156:10: error[invalid-argument-type] Argument to function `doc` is incorrect: Expected `None | str | ((...) -> Unknown)`, found `property`
pandas/core/indexes/datetimelike.py:200:42: warning[possibly-missing-attribute] Attribute `asi8` may be missing on object of type `(Any & Index) | CategoricalIndex | Self@equals`
pandas/core/indexes/datetimelike.py:527:10: error[invalid-argument-type] Argument to function `doc` is incorrect: Expected `None | str | ((...) -> Unknown)`, found `property`
pandas/core/indexes/datetimelike.py:756:16: error[invalid-return-type] Return type does not match returned value: expected `tuple[Self@_wrap_join_result, @Todo | None, @Todo | None]`, found `tuple[DatetimeTimedeltaMixin | Unknown, @Todo | None, @Todo | None]`
pandas/core/indexes/datetimelike.py:756:16: error[invalid-return-type] Return type does not match returned value: expected `tuple[Self@_wrap_join_result, ndarray[tuple[Any, ...], dtype[signedinteger[_64Bit]]] | None, ndarray[tuple[Any, ...], dtype[signedinteger[_64Bit]]] | None]`, found `tuple[DatetimeTimedeltaMixin | Unknown, ndarray[tuple[Any, ...], dtype[signedinteger[_64Bit]]] | None, ndarray[tuple[Any, ...], dtype[signedinteger[_64Bit]]] | None]`
pandas/core/indexes/datetimelike.py:815:45: error[invalid-argument-type] Argument to bound method `is_on_offset` is incorrect: Expected `datetime`, found `Timestamp | NaTType | Timedelta`
pandas/core/indexes/datetimelike.py:823:16: error[invalid-return-type] Return type does not match returned value: expected `Self@delete`, found `DatetimeTimedeltaMixin`
pandas/core/indexes/datetimelike.py:855:13: error[invalid-assignment] Object of type `BaseOffset | None` is not assignable to attribute `_freq` on type `DatetimeArray | TimedeltaArray`
@ -548,16 +561,17 @@ pandas/core/indexes/frozen.py:74:9: error[invalid-method-override] Invalid overr
pandas/core/indexes/interval.py:670:43: warning[possibly-missing-attribute] Attribute `left` may be missing on object of type `Unknown | Index`
pandas/core/indexes/interval.py:671:44: warning[possibly-missing-attribute] Attribute `right` may be missing on object of type `Unknown | Index`
pandas/core/indexes/interval.py:686:50: warning[possibly-missing-attribute] Attribute `asi8` may be missing on object of type `(Unknown & ~Top[Interval[Unknown]]) | (Index & ~Top[Interval[Unknown]])`
pandas/core/indexes/interval.py:807:20: error[invalid-return-type] Return type does not match returned value: expected `int | slice[Any, Any, Any] | ndarray[tuple[Any, ...], dtype[Any]]`, found `Unknown | signedinteger[_64Bit]`
pandas/core/indexes/interval.py:1375:36: error[invalid-argument-type] Argument to function `maybe_box_datetimelike` is incorrect: Expected `str | bytes | date | ... omitted 10 union elements`, found `Unknown | None`
pandas/core/indexes/interval.py:1376:34: error[invalid-argument-type] Argument to function `maybe_box_datetimelike` is incorrect: Expected `str | bytes | date | ... omitted 10 union elements`, found `Unknown | None`
pandas/core/indexes/interval.py:1397:20: error[no-matching-overload] No overload of function `to_offset` matches arguments
pandas/core/indexes/interval.py:1427:25: error[invalid-assignment] Object of type `object` is not assignable to `dtype[Any]`
pandas/core/indexes/interval.py:1435:46: error[unsupported-operator] Operator `*` is unsupported between objects of type `Unknown | None | Literal[1, "D"]` and `float`
pandas/core/indexes/interval.py:1440:32: error[unsupported-operator] Operator `-` is unsupported between objects of type `str | bytes | date | ... omitted 10 union elements` and `str | bytes | date | ... omitted 10 union elements`
pandas/core/indexes/interval.py:1446:22: error[no-matching-overload] No overload of function `linspace` matches arguments
pandas/core/indexes/multi.py:587:54: error[invalid-argument-type] Argument to function `tuples_to_object_array` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[object_]]`, found `(ndarray[tuple[object, ...], dtype[object]] & ~Index) | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/indexes/multi.py:1589:9: error[invalid-method-override] Invalid override of method `_set_names`: Definition is incompatible with `Index._set_names`
pandas/core/indexes/multi.py:2256:40: error[unsupported-operator] Operator `>` is not supported for types `object` and `int`, in comparing `~None` with `Literal[0]`
pandas/core/indexes/multi.py:2256:40: error[unsupported-operator] Operator `>` is not supported between objects of type `~None` and `Literal[0]`
pandas/core/indexes/multi.py:4158:9: error[invalid-method-override] Invalid override of method `_validate_fill_value`: Definition is incompatible with `Index._validate_fill_value`
pandas/core/indexes/multi.py:4484:9: error[no-matching-overload] No overload of function `tile` matches arguments
pandas/core/indexes/period.py:243:29: error[invalid-argument-type] Argument to function `period_array` is incorrect: Expected `Sequence[Period | str | None] | ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | Index | Series`, found `Unknown | None`
pandas/core/indexes/range.py:808:9: error[invalid-method-override] Invalid override of method `sort_values`: Definition is incompatible with `Index.sort_values`
pandas/core/indexes/range.py:817:20: error[invalid-return-type] Return type does not match returned value: expected `Self@sort_values | tuple[Self@sort_values, ndarray[tuple[Any, ...], dtype[Any]] | RangeIndex]`, found `RangeIndex | tuple[RangeIndex, ndarray[tuple[Any, ...], dtype[Any]]]`
@ -566,8 +580,10 @@ pandas/core/indexes/range.py:1289:27: error[invalid-argument-type] Argument to f
pandas/core/indexes/range.py:1305:23: error[unresolved-attribute] Object of type `~EllipsisType & ~slice[object, object, object]` has no attribute `to_numpy`
pandas/core/indexing.py:1242:6: error[invalid-argument-type] Argument to function `doc` is incorrect: Expected `None | str | ((...) -> Unknown)`, found `property`
pandas/core/indexing.py:1430:24: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `object`
pandas/core/indexing.py:1447:45: error[unsupported-operator] Operator `>` is not supported for types `object` and `int`, in comparing `object` with `Literal[1]`
pandas/core/indexing.py:1447:45: error[unsupported-operator] Operator `>` is not supported between objects of type `object` and `Literal[1]`
pandas/core/indexing.py:1593:6: error[invalid-argument-type] Argument to function `doc` is incorrect: Expected `None | str | ((...) -> Unknown)`, found `property`
pandas/core/indexing.py:1637:31: warning[possibly-missing-attribute] Attribute `_reduce` may be missing on object of type `Unknown | ndarray[tuple[Any, ...], dtype[Unknown]]`
pandas/core/indexing.py:1638:31: warning[possibly-missing-attribute] Attribute `_reduce` may be missing on object of type `Unknown | ndarray[tuple[Any, ...], dtype[Unknown]]`
pandas/core/indexing.py:1785:36: error[invalid-argument-type] Argument to bound method `_validate_integer` is incorrect: Expected `int | integer[Any]`, found `object`
pandas/core/indexing.py:2019:60: error[non-subscriptable] Cannot subscript object of type `Hashable` with no `__getitem__` method
pandas/core/indexing.py:2033:45: error[invalid-argument-type] Argument to bound method `_setitem_single_column` is incorrect: Expected `int`, found `Hashable`
@ -576,25 +592,39 @@ pandas/core/indexing.py:2382:21: error[index-out-of-bounds] Index 1 is out of bo
pandas/core/indexing.py:2384:49: error[index-out-of-bounds] Index 1 is out of bounds for tuple `tuple[(Unknown & slice[object, object, object]) | (Unknown & ndarray[tuple[object, ...], dtype[object]]) | (Unknown & Top[list[Unknown]]) | (Unknown & Index)]` with length 1
pandas/core/indexing.py:2557:6: error[invalid-argument-type] Argument to function `doc` is incorrect: Expected `None | str | ((...) -> Unknown)`, found `property`
pandas/core/indexing.py:2607:6: error[invalid-argument-type] Argument to function `doc` is incorrect: Expected `None | str | ((...) -> Unknown)`, found `property`
pandas/core/interchange/utils.py:146:39: error[invalid-argument-type] Argument to function `datetime_data` is incorrect: Expected `str | _SupportsDType[dtype[datetime64[date | int | None]]] | dtype[datetime64[date | int | None]] | dtype[timedelta64[timedelta | int | None]]`, found `dtype[Any] | (ExtensionDtype & ~CategoricalDtype & ~StringDtype)`
pandas/core/internals/api.py:113:57: error[invalid-argument-type] Argument to function `extract_pandas_array` is incorrect: Expected `int`, found `Unknown | None`
pandas/core/internals/construction.py:286:39: error[invalid-argument-type] Argument to function `_check_values_indices_shape_match` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[Any]]`, found `Unknown | ndarray[tuple[Any, ...], dtype[Any]] | ExtensionArray`
pandas/core/internals/api.py:133:13: error[invalid-argument-type] Argument to bound method `_simple_new` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[datetime64[date | int | None]]]`, found `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/internals/blocks.py:509:22: error[no-matching-overload] No overload of function `maybe_convert_objects` matches arguments
pandas/core/internals/construction.py:243:22: warning[possibly-missing-attribute] Attribute `reshape` may be missing on object of type `Unknown | ndarray[tuple[int, int], dtype[Any]] | ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/internals/construction.py:254:29: error[invalid-argument-type] Argument to function `_ensure_2d` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[Any]]`, found `Unknown | ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/internals/construction.py:286:39: error[invalid-argument-type] Argument to function `_check_values_indices_shape_match` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[Any]]`, found `Unknown | ndarray[tuple[int, int], dtype[Any]] | ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/internals/construction.py:992:27: error[no-matching-overload] No overload of function `maybe_convert_objects` matches arguments
pandas/core/internals/construction.py:1021:46: error[invalid-argument-type] Argument to function `maybe_cast_to_datetime` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[Any]] | list[Unknown]`, found `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/internals/managers.py:235:13: error[unresolved-attribute] Object of type `Self@blknos` has no attribute `_rebuild_blknos_and_blklocs`
pandas/core/internals/managers.py:246:13: error[unresolved-attribute] Object of type `Self@blklocs` has no attribute `_rebuild_blknos_and_blklocs`
pandas/core/internals/managers.py:1225:17: error[invalid-assignment] Invalid subscript assignment with key of type `Unknown | BlockPlacement` and value of type `ndarray[tuple[Any, ...], dtype[Any]]` on object of type `list[Unknown | None]`
pandas/core/internals/managers.py:1656:9: error[invalid-method-override] Invalid override of method `_equal_values`: Definition is incompatible with `BaseBlockManager._equal_values`
pandas/core/internals/managers.py:2231:9: error[invalid-method-override] Invalid override of method `_equal_values`: Definition is incompatible with `BaseBlockManager._equal_values`
pandas/core/internals/managers.py:2501:42: error[invalid-argument-type] Argument to bound method `_simple_new` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[datetime64[date | int | None]]]`, found `ndarray[tuple[int, ...], str]`
pandas/core/missing.py:153:12: error[invalid-return-type] Return type does not match returned value: expected `ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]]`, found `Unknown | (ExtensionArray & ndarray[tuple[object, ...], dtype[object]]) | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/missing.py:608:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Literal["linear", "nearest", "nearest-up", "slinear", "zero", ... omitted 4 literals] | int`, found `Unknown | None | (str & ~Literal["polynomial"])`
pandas/core/missing.py:613:28: error[unsupported-operator] Operator `<=` is not supported for types `None` and `int`, in comparing `Unknown | None` with `Literal[0]`
pandas/core/missing.py:613:28: error[unsupported-operator] Operator `<=` is not supported between objects of type `Unknown | None` and `Literal[0]`
pandas/core/missing.py:617:51: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Literal[1, 2, 3, 4, 5]`, found `Unknown | None`
pandas/core/nanops.py:657:20: error[invalid-return-type] Return type does not match returned value: expected `ndarray[tuple[Any, ...], dtype[Any]] | datetime64[date | int | None] | timedelta64[timedelta | int | None] | NaTType`, found `signedinteger[_64Bit]`
pandas/core/nanops.py:908:12: error[invalid-return-type] Return type does not match returned value: expected `tuple[int | float | ndarray[tuple[Any, ...], dtype[Any]], int | float | ndarray[tuple[Any, ...], dtype[Any]]]`, found `tuple[floating[Any] | @Todo | int | float | ndarray[tuple[Any, ...], dtype[Any]], Unknown | int | float]`
pandas/core/nanops.py:1525:12: warning[possibly-missing-attribute] Attribute `astype` may be missing on object of type `@Todo | int`
pandas/core/nanops.py:908:12: error[invalid-return-type] Return type does not match returned value: expected `tuple[int | float | ndarray[tuple[Any, ...], dtype[Any]], int | float | ndarray[tuple[Any, ...], dtype[Any]]]`, found `tuple[floating[Any] | ndarray[tuple[Any, ...], dtype[floating[Any]]] | int | float | ndarray[tuple[Any, ...], dtype[Any]], Unknown | int | float]`
pandas/core/nanops.py:1297:12: error[invalid-return-type] Return type does not match returned value: expected `int | float`, found `ndarray[tuple[Any, ...], dtype[Any]] | Unknown`
pandas/core/nanops.py:1416:12: error[invalid-return-type] Return type does not match returned value: expected `int | float`, found `(Unknown & ~ndarray[tuple[object, ...], dtype[object]]) | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/nanops.py:1525:12: warning[possibly-missing-attribute] Attribute `astype` may be missing on object of type `Any | int`
pandas/core/nanops.py:1561:30: error[no-matching-overload] No overload of bound method `astype` matches arguments
pandas/core/nanops.py:1561:30: error[no-matching-overload] No overload of bound method `astype` matches arguments
pandas/core/nanops.py:1563:30: error[no-matching-overload] No overload of bound method `astype` matches arguments
pandas/core/nanops.py:1563:30: error[no-matching-overload] No overload of bound method `astype` matches arguments
pandas/core/ops/array_ops.py:340:44: error[invalid-argument-type] Argument to function `invalid_comparison` is incorrect: Expected `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | list[Unknown] | ... omitted 13 union elements`, found `~Top[list[Unknown]] | @Todo`
pandas/core/ops/array_ops.py:126:48: error[invalid-argument-type] Argument to function `vec_compare` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[object_]]`, found `@Todo | ndarray[tuple[int], dtype[Any]] | ndarray[tuple[int], Unknown] | ExtensionArray`
pandas/core/ops/array_ops.py:340:44: error[invalid-argument-type] Argument to function `invalid_comparison` is incorrect: Expected `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | list[Unknown] | ... omitted 13 union elements`, found `~Top[list[Unknown]] | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/ops/mask_ops.py:59:18: error[unsupported-operator] Operator `|` is unsupported between objects of type `ndarray[tuple[Any, ...], dtype[Any]] | (NAType & ndarray[tuple[object, ...], dtype[object]])` and `bool | ndarray[tuple[Any, ...], dtype[Any]] | NAType`
pandas/core/ops/mask_ops.py:122:18: error[unsupported-operator] Operator `^` is unsupported between objects of type `ndarray[tuple[Any, ...], dtype[Any]] | (NAType & ndarray[tuple[object, ...], dtype[object]])` and `bool | ndarray[tuple[Any, ...], dtype[Any]] | NAType`
pandas/core/ops/mask_ops.py:132:12: error[invalid-return-type] Return type does not match returned value: expected `tuple[ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]], ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]]]`, found `tuple[ndarray[tuple[Any, ...], dtype[Any]] | (NAType & ndarray[tuple[object, ...], dtype[object]]) | Unknown, ndarray[tuple[Any, ...], dtype[Any]] | Unknown]`
pandas/core/ops/mask_ops.py:172:18: error[unsupported-operator] Operator `&` is unsupported between objects of type `(NAType & ndarray[tuple[object, ...], dtype[object]]) | ndarray[tuple[Any, ...], dtype[Any]]` and `bool | NAType | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/ops/mask_ops.py:190:12: error[invalid-return-type] Return type does not match returned value: expected `tuple[ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]], ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]]]`, found `tuple[(NAType & ndarray[tuple[object, ...], dtype[object]]) | ndarray[tuple[Any, ...], dtype[Any]] | Unknown, Any | ndarray[tuple[Any, ...], dtype[Any]]]`
pandas/core/ops/mask_ops.py:194:32: error[no-matching-overload] No overload matches arguments
pandas/core/resample.py:442:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `((...) -> Unknown) | str | list[((...) -> Unknown) | str] | MutableMapping[Hashable, ((...) -> Unknown) | str | list[((...) -> Unknown) | str]]`, found `Unknown | None`
pandas/core/resample.py:2110:9: error[invalid-method-override] Invalid override of method `_upsample`: Definition is incompatible with `Resampler._upsample`
pandas/core/resample.py:2242:9: error[invalid-method-override] Invalid override of method `_upsample`: Definition is incompatible with `Resampler._upsample`
@ -666,6 +696,7 @@ pandas/core/series.py:5652:30: error[invalid-type-form] Variable of type `Access
pandas/core/series.py:5996:19: error[invalid-type-form] Invalid subscript of object of type `Accessor` in type expression
pandas/core/series.py:6471:15: error[invalid-type-form] Variable of type `Accessor` is not allowed in a type expression
pandas/core/series.py:6535:19: error[invalid-type-form] Invalid subscript of object of type `Accessor` in type expression
pandas/core/sorting.py:428:16: error[invalid-return-type] Return type does not match returned value: expected `ndarray[tuple[Any, ...], dtype[signedinteger[_64Bit]]]`, found `ndarray[tuple[Any, ...], dtype[signedinteger[_64Bit]]] | Series | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/sorting.py:429:13: error[unknown-argument] Argument `ascending` does not match any known parameter of bound method `argsort`
pandas/core/sorting.py:431:13: error[unknown-argument] Argument `na_position` does not match any known parameter of bound method `argsort`
pandas/core/strings/accessor.py:310:33: warning[possibly-missing-attribute] Submodule `compute` may not be available as an attribute on module `pyarrow`
@ -677,8 +708,14 @@ pandas/core/strings/accessor.py:396:30: warning[possibly-missing-attribute] Attr
pandas/core/strings/accessor.py:1411:20: warning[possibly-missing-attribute] Attribute `flags` may be missing on object of type `str | Pattern[Unknown]`
pandas/core/strings/accessor.py:1426:33: warning[possibly-missing-attribute] Attribute `flags` may be missing on object of type `str | Pattern[Unknown] | Pattern[str]`
pandas/core/strings/accessor.py:1431:38: warning[possibly-missing-attribute] Attribute `flags` may be missing on object of type `str | Pattern[Unknown] | Pattern[str]`
pandas/core/strings/object_array.py:115:26: error[no-matching-overload] No overload of function `maybe_convert_objects` matches arguments
pandas/core/tools/datetimes.py:387:27: warning[possibly-missing-attribute] Attribute `_dt_tz_convert` may be missing on object of type `(Unknown & ~Top[list[Unknown]] & ~tuple[object, ...] & ~NumpyExtensionArray & ~Index) | (ndarray[tuple[Any, ...], dtype[Any]] & ~Index)`
pandas/core/tools/datetimes.py:389:27: warning[possibly-missing-attribute] Attribute `_dt_tz_localize` may be missing on object of type `(Unknown & ~Top[list[Unknown]] & ~tuple[object, ...] & ~NumpyExtensionArray & ~Index) | (ndarray[tuple[Any, ...], dtype[Any]] & ~Index)`
pandas/core/tools/datetimes.py:393:35: error[invalid-argument-type] Argument to function `is_supported_dtype` is incorrect: Expected `dtype[Any]`, found `(Any & ~DatetimeTZDtype) | None`
pandas/core/tools/datetimes.py:452:41: error[invalid-argument-type] Argument to bound method `_simple_new` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[datetime64[date | int | None]]]`, found `ndarray[tuple[Any, ...], str]`
pandas/core/tools/datetimes.py:1062:22: error[invalid-assignment] Object of type `bool` is not assignable to `Timestamp | NaTType | Series | Index`
pandas/core/tools/numeric.py:225:16: warning[possibly-missing-attribute] Attribute `isna` may be missing on object of type `(Unknown & ~BaseMaskedArray) | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/tools/numeric.py:226:18: warning[possibly-missing-attribute] Attribute `dropna` may be missing on object of type `(Unknown & ~BaseMaskedArray) | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/core/util/hashing.py:314:16: error[no-matching-overload] No overload of bound method `astype` matches arguments
pandas/core/util/numba_.py:79:8: warning[possibly-missing-attribute] Submodule `extending` may not be available as an attribute on module `numba`
pandas/core/util/numba_.py:82:22: error[unresolved-attribute] Object of type `(...) -> Unknown` has no attribute `__name__`
@ -690,12 +727,12 @@ pandas/core/window/numba_.py:229:18: error[not-iterable] Object of type `prange`
pandas/core/window/numba_.py:257:18: error[not-iterable] Object of type `prange` is not iterable
pandas/core/window/numba_.py:323:22: error[not-iterable] Object of type `prange` is not iterable
pandas/core/window/online.py:63:22: error[not-iterable] Object of type `prange` is not iterable
pandas/core/window/rolling.py:167:44: error[unsupported-operator] Operator `>` is not supported for types `int` and `None`, in comparing `(Unknown & ~None) | int` with `Unknown | None`
pandas/core/window/rolling.py:167:44: error[unsupported-operator] Operator `>` is not supported between objects of type `(Unknown & ~None) | int` and `Unknown | None`
pandas/core/window/rolling.py:419:35: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int`, found `(Unknown & ~BaseIndexer) | None`
pandas/core/window/rolling.py:1139:43: error[unsupported-operator] Operator `<` is not supported for types `None` and `int`, in comparing `(Unknown & ~BaseIndexer) | None` with `Literal[0]`
pandas/core/window/rolling.py:1139:43: error[unsupported-operator] Operator `<` is not supported between objects of type `(Unknown & ~BaseIndexer) | None` and `Literal[0]`
pandas/core/window/rolling.py:1288:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `((...) -> Unknown) | str | list[((...) -> Unknown) | str] | MutableMapping[Hashable, ((...) -> Unknown) | str | list[((...) -> Unknown) | str]]`, found `Unknown | None`
pandas/core/window/rolling.py:1291:22: error[call-non-callable] Object of type `None` is not callable
pandas/core/window/rolling.py:2018:45: error[unsupported-operator] Operator `<` is not supported for types `None` and `int`, in comparing `(Unknown & ~BaseIndexer) | None` with `Literal[0]`
pandas/core/window/rolling.py:2018:45: error[unsupported-operator] Operator `<` is not supported between objects of type `(Unknown & ~BaseIndexer) | None` and `Literal[0]`
pandas/core/window/rolling.py:3494:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int | BaseIndexer`, found `(Unknown & BaseIndexer) | int | (Unknown & ~BaseIndexer) | None`
pandas/io/clipboard/__init__.py:121:18: error[unresolved-reference] Name `Foundation` used when not defined
pandas/io/clipboard/__init__.py:122:45: error[unresolved-reference] Name `Foundation` used when not defined
@ -754,7 +791,7 @@ pandas/io/excel/_base.py:520:12: error[invalid-return-type] Return type does not
pandas/io/excel/_base.py:574:17: error[call-non-callable] Object of type `object` is not callable
pandas/io/excel/_base.py:578:17: error[call-non-callable] Object of type `object` is not callable
pandas/io/excel/_base.py:844:21: error[unsupported-operator] Operator `+=` is unsupported between objects of type `object` and `int`
pandas/io/excel/_base.py:846:20: error[unsupported-operator] Operator `>` is not supported for types `object` and `int`
pandas/io/excel/_base.py:846:20: error[unsupported-operator] Operator `>` is not supported between objects of type `object` and `int`
pandas/io/excel/_base.py:852:17: error[invalid-assignment] Invalid subscript assignment with key of type `object` and value of type `list[Hashable]` on object of type `list[Unknown]`
pandas/io/excel/_base.py:852:57: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `object` on object of type `list[Unknown]`
pandas/io/excel/_base.py:855:54: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `object` on object of type `list[Unknown]`
@ -795,7 +832,6 @@ pandas/io/formats/style.py:2732:13: warning[possibly-missing-attribute] Attribut
pandas/io/formats/style.py:2732:38: error[invalid-argument-type] Argument to bound method `extend` is incorrect: Expected `Iterable[CSSDict]`, found `dict[Any, list[CSSDict]] | list[CSSDict] | None`
pandas/io/formats/style.py:4022:41: error[invalid-argument-type] Argument to function `_validate_apply_axis_arg` is incorrect: Expected `NDFrame | Sequence[Unknown] | ndarray[tuple[Any, ...], dtype[Any]]`, found `bytes | (date & Iterable[object]) | (timedelta & Iterable[object]) | ... omitted 12 union elements`
pandas/io/formats/style.py:4025:42: error[invalid-argument-type] Argument to function `_validate_apply_axis_arg` is incorrect: Expected `NDFrame | Sequence[Unknown] | ndarray[tuple[Any, ...], dtype[Any]]`, found `bytes | (date & Iterable[object]) | (timedelta & Iterable[object]) | ... omitted 12 union elements`
pandas/io/formats/style.py:4234:20: error[invalid-assignment] Object of type `floating[Any]` is not assignable to `int | float`
pandas/io/formats/style_render.py:1222:17: error[invalid-argument-type] Argument to function `_maybe_wrap_formatter` is incorrect: Expected `str | ((...) -> Unknown) | None`, found `object`
pandas/io/formats/style_render.py:1402:25: error[invalid-assignment] Object of type `dict[int | Unknown, object]` is not assignable to `str | ((...) -> Unknown) | dict[Any, str | ((...) -> Unknown) | None] | None`
pandas/io/formats/style_render.py:1409:17: warning[possibly-missing-attribute] Attribute `get` may be missing on object of type `dict[Any, str | ((...) -> Unknown) | None] | str | ((...) -> Unknown) | None`
@ -844,12 +880,12 @@ pandas/io/parsers/python_parser.py:530:25: error[unknown-argument] Argument `non
pandas/io/parsers/python_parser.py:736:48: error[invalid-argument-type] Argument to bound method `_handle_usecols` is incorrect: Expected `list[list[str | bytes | date | ... omitted 11 union elements]]`, found `list[Unknown | list[int]]`
pandas/io/parsers/python_parser.py:736:57: error[invalid-argument-type] Argument to bound method `_handle_usecols` is incorrect: Expected `list[str | bytes | date | ... omitted 11 union elements]`, found `Unknown | list[int]`
pandas/io/parsers/readers.py:1574:41: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `(@Todo & ~Literal[False] & ~_NoDefault) | None`
pandas/io/pytables.py:483:8: error[unsupported-operator] Operator `<=` is not supported for types `None` and `None`, in comparing `Unknown | None | int` with `Unknown | None | int`
pandas/io/pytables.py:487:11: error[unsupported-operator] Operator `>` is not supported for types `None` and `int`, in comparing `Unknown | None | int` with `Literal[1]`
pandas/io/pytables.py:483:8: error[unsupported-operator] Operator `<=` is not supported between two objects of type `Unknown | None | int`
pandas/io/pytables.py:487:11: error[unsupported-operator] Operator `>` is not supported between objects of type `Unknown | None | int` and `Literal[1]`
pandas/io/pytables.py:639:30: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
pandas/io/pytables.py:702:20: error[invalid-return-type] Return type does not match returned value: expected `list[str]`, found `list[Unknown | None | str]`
pandas/io/pytables.py:1941:55: error[invalid-argument-type] Argument to bound method `_create_storer` is incorrect: Expected `str`, found `Unknown | None`
pandas/io/pytables.py:2091:15: error[unsupported-operator] Operator `<` is not supported for types `None` and `None`, in comparing `Unknown | None | Literal[0]` with `Unknown | None | Literal[0]`
pandas/io/pytables.py:2091:15: error[unsupported-operator] Operator `<` is not supported between two objects of type `Unknown | None | Literal[0]`
pandas/io/pytables.py:2092:24: error[unsupported-operator] Operator `+` is unsupported between objects of type `Unknown | None | Literal[0]` and `int | None`
pandas/io/pytables.py:2092:50: error[invalid-argument-type] Argument to function `min` is incorrect: Argument type `Unknown | None | Literal[0]` does not satisfy upper bound `SupportsDunderLT[Any] | SupportsDunderGT[Any]` of type variable `SupportsRichComparisonT`
pandas/io/pytables.py:2196:16: warning[possibly-missing-attribute] Attribute `itemsize` may be missing on object of type `Unknown | None`
@ -861,14 +897,14 @@ pandas/io/pytables.py:2341:45: warning[possibly-missing-attribute] Attribute `it
pandas/io/pytables.py:2645:72: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `Unknown | None`
pandas/io/pytables.py:2700:12: warning[possibly-missing-attribute] Attribute `startswith` may be missing on object of type `(Unknown & ~None) | ExtensionDtype | str | ... omitted 3 union elements`
pandas/io/pytables.py:2702:48: error[invalid-argument-type] Argument to function `_set_tz` is incorrect: Expected `str`, found `(Unknown & ~None) | ExtensionDtype | str | ... omitted 3 union elements`
pandas/io/pytables.py:2749:17: error[invalid-argument-type] Argument to function `_unconvert_string_array` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[Any]]`, found `DatetimeArray | @Todo | ndarray[tuple[Any, ...], Unknown]`
pandas/io/pytables.py:2742:29: error[no-matching-overload] No overload of bound method `astype` matches arguments
pandas/io/pytables.py:2749:17: error[invalid-argument-type] Argument to function `_unconvert_string_array` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[Any]]`, found `DatetimeArray | ndarray[tuple[Any, ...], dtype[Any]] | Unknown | ndarray[tuple[Any, ...], Unknown]`
pandas/io/pytables.py:2841:20: error[invalid-return-type] Return type does not match returned value: expected `tuple[int, int, int]`, found `tuple[int, ...]`
pandas/io/pytables.py:3118:35: error[invalid-argument-type] Argument to bound method `write_array` is incorrect: Expected `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | Index | Series`, found `Unknown | None`
pandas/io/pytables.py:3146:41: error[invalid-argument-type] Argument to bound method `write_array` is incorrect: Expected `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | Index | Series`, found `Unknown | None`
pandas/io/pytables.py:3184:16: error[non-subscriptable] Cannot subscript object of type `Node` with no `__getitem__` method
pandas/io/pytables.py:3289:45: error[invalid-argument-type] Argument to bound method `write_array_empty` is incorrect: Expected `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]`, found `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | Index | Series | Unknown`
pandas/io/pytables.py:3333:41: error[invalid-argument-type] Argument to bound method `write_array_empty` is incorrect: Expected `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]`, found `(ExtensionArray & ~BaseStringArray) | (ndarray[tuple[Any, ...], dtype[Any]] & ~BaseStringArray) | (Index & ~BaseStringArray) | (Series & ~BaseStringArray) | (Unknown & ~BaseStringArray)`
pandas/io/pytables.py:3635:16: error[invalid-return-type] Return type does not match returned value: expected `int`, found `signedinteger[_64Bit]`
pandas/io/pytables.py:3666:24: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `Unknown | None`
pandas/io/pytables.py:3678:22: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `Unknown | None`
pandas/io/pytables.py:4135:13: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Index, (s: slice[Any, Any, Any], /) -> list[Index]]` cannot be called with key of type `int | Unknown | None` on object of type `list[Index]`
@ -876,6 +912,7 @@ pandas/io/pytables.py:4136:40: error[invalid-argument-type] Argument to bound me
pandas/io/pytables.py:4824:26: error[no-matching-overload] No overload of bound method `reshape` matches arguments
pandas/io/pytables.py:4824:26: error[no-matching-overload] No overload of bound method `reshape` matches arguments
pandas/io/pytables.py:5205:19: warning[possibly-missing-attribute] Attribute `to_numpy` may be missing on object of type `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/io/pytables.py:5506:26: error[no-matching-overload] No overload of bound method `generate` matches arguments
pandas/io/sas/sas7bdat.py:519:63: error[invalid-argument-type] Argument to bound method `_convert_header_text` is incorrect: Expected `bytes`, found `Unknown | str | bytes`
pandas/io/sql.py:1036:20: warning[possibly-missing-attribute] Attribute `copy` may be missing on object of type `Unknown | None | DataFrame`
pandas/io/sql.py:1045:38: warning[possibly-missing-attribute] Attribute `columns` may be missing on object of type `Unknown | DataFrame | None`
@ -899,6 +936,7 @@ pandas/io/sql.py:1346:25: error[invalid-assignment] Cannot assign to a subscript
pandas/io/sql.py:1914:33: warning[possibly-missing-attribute] Attribute `items` may be missing on object of type `ExtensionDtype | str | dtype[Any] | ... omitted 4 union elements`
pandas/io/sql.py:2548:31: warning[possibly-missing-attribute] Attribute `columns` may be missing on object of type `Unknown | None | DataFrame`
pandas/io/sql.py:2866:33: warning[possibly-missing-attribute] Attribute `items` may be missing on object of type `ExtensionDtype | str | dtype[Any] | ... omitted 4 union elements`
pandas/io/stata.py:313:30: error[no-matching-overload] No overload of bound method `astype` matches arguments
pandas/io/stata.py:2253:16: error[invalid-return-type] Return type does not match returned value: expected `AnyStr@_pad_bytes`, found `bytes`
pandas/io/stata.py:2254:12: error[invalid-return-type] Return type does not match returned value: expected `AnyStr@_pad_bytes`, found `str`
pandas/io/stata.py:2915:21: error[invalid-argument-type] Argument to function `isfile` is incorrect: Expected `int | str | bytes | PathLike[str] | PathLike[bytes]`, found `str | (Unknown & PathLike[object]) | PathLike[str] | (WriteBuffer[bytes] & PathLike[object])`
@ -920,8 +958,33 @@ pandas/plotting/_matplotlib/converter.py:182:21: warning[possibly-missing-attrib
pandas/plotting/_matplotlib/converter.py:227:9: error[invalid-method-override] Invalid override of method `convert`: Definition is incompatible with `DateConverter.convert`
pandas/plotting/_matplotlib/converter.py:236:16: error[no-matching-overload] No overload of function `to_offset` matches arguments
pandas/plotting/_matplotlib/converter.py:291:9: error[invalid-method-override] Invalid override of method `convert`: Definition is incompatible with `DateConverter.convert`
pandas/plotting/_matplotlib/converter.py:784:5: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["val"]` and value of type `ndarray[tuple[int], dtype[signedinteger[Any]]]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:785:14: error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]], ...], /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: str, /) -> ndarray[tuple[int], dtype[Any]], (key: list[str], /) -> ndarray[tuple[int], dtype[void]]]` cannot be called with key of type `Literal["val"]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:786:5: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["fmt"]` and value of type `Literal[""]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:788:16: error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]], ...], /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: str, /) -> ndarray[tuple[int], dtype[Any]], (key: list[str], /) -> ndarray[tuple[int], dtype[void]]]` cannot be called with key of type `Literal["maj"]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:789:16: error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]], ...], /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: str, /) -> ndarray[tuple[int], dtype[Any]], (key: list[str], /) -> ndarray[tuple[int], dtype[void]]]` cannot be called with key of type `Literal["fmt"]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:793:9: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["min"]` and value of type `Literal[True]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:810:9: error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]], ...], /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: str, /) -> ndarray[tuple[int], dtype[Any]], (key: list[str], /) -> ndarray[tuple[int], dtype[void]]]` cannot be called with key of type `Literal["fmt"]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:811:9: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["min"]` and value of type `Literal[True]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:818:9: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["min"]` and value of type `Literal[True]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:827:9: error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]], ...], /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: str, /) -> ndarray[tuple[int], dtype[Any]], (key: list[str], /) -> ndarray[tuple[int], dtype[void]]]` cannot be called with key of type `Literal["min"]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:837:9: error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]], ...], /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: str, /) -> ndarray[tuple[int], dtype[Any]], (key: list[str], /) -> ndarray[tuple[int], dtype[void]]]` cannot be called with key of type `Literal["min"]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:841:12: error[invalid-return-type] Return type does not match returned value: expected `ndarray[tuple[Any, ...], dtype[Any]]`, found `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:854:5: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["val"]` and value of type `ndarray[tuple[int], dtype[signedinteger[Any]]]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:855:5: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["fmt"]` and value of type `Literal[""]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:856:14: error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]], ...], /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: str, /) -> ndarray[tuple[int], dtype[Any]], (key: list[str], /) -> ndarray[tuple[int], dtype[void]]]` cannot be called with key of type `Literal["val"]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:857:16: error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]], ...], /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: str, /) -> ndarray[tuple[int], dtype[Any]], (key: list[str], /) -> ndarray[tuple[int], dtype[void]]]` cannot be called with key of type `Literal["maj"]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:858:16: error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]], ...], /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: str, /) -> ndarray[tuple[int], dtype[Any]], (key: list[str], /) -> ndarray[tuple[int], dtype[void]]]` cannot be called with key of type `Literal["fmt"]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:863:9: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["min"]` and value of type `Literal[True]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:876:9: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["min"]` and value of type `Literal[True]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:886:9: error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]], ...], /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: str, /) -> ndarray[tuple[int], dtype[Any]], (key: list[str], /) -> ndarray[tuple[int], dtype[void]]]` cannot be called with key of type `Literal["min"]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:889:12: error[invalid-return-type] Return type does not match returned value: expected `ndarray[tuple[Any, ...], dtype[Any]]`, found `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:901:5: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["val"]` and value of type `ndarray[tuple[int], dtype[signedinteger[Any]]]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:902:5: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["fmt"]` and value of type `Literal[""]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:903:14: error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]], ...], /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: str, /) -> ndarray[tuple[int], dtype[Any]], (key: list[str], /) -> ndarray[tuple[int], dtype[void]]]` cannot be called with key of type `Literal["val"]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:908:5: error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]], ...], /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: str, /) -> ndarray[tuple[int], dtype[Any]], (key: list[str], /) -> ndarray[tuple[int], dtype[void]]]` cannot be called with key of type `Literal["maj"]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:909:5: error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]], ...], /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: str, /) -> ndarray[tuple[int], dtype[Any]], (key: list[str], /) -> ndarray[tuple[int], dtype[void]]]` cannot be called with key of type `Literal["min"]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:910:5: error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | bool[bool]]], ...], /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]], (key: str, /) -> ndarray[tuple[int], dtype[Any]], (key: list[str], /) -> ndarray[tuple[int], dtype[void]]]` cannot be called with key of type `Literal["fmt"]` on object of type `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:912:12: error[invalid-return-type] Return type does not match returned value: expected `ndarray[tuple[Any, ...], dtype[Any]]`, found `ndarray[tuple[int], list[Unknown | tuple[str, <class 'int'>] | tuple[str, <class 'bool'>] | tuple[str, str]]]`
pandas/plotting/_matplotlib/converter.py:932:30: warning[possibly-missing-attribute] Submodule `ticker` may not be available as an attribute on module `matplotlib`
pandas/plotting/_matplotlib/converter.py:1013:16: warning[possibly-missing-attribute] Submodule `transforms` may not be available as an attribute on module `matplotlib`
@ -933,6 +996,7 @@ pandas/plotting/_matplotlib/core.py:756:21: error[unresolved-attribute] Object o
pandas/plotting/_matplotlib/core.py:1063:35: error[invalid-return-type] Function can implicitly return `None`, which is not assignable to return type `bool`
pandas/plotting/_matplotlib/core.py:1240:32: warning[possibly-missing-attribute] Submodule `axes` may not be available as an attribute on module `matplotlib`
pandas/plotting/_matplotlib/core.py:1383:21: warning[possibly-missing-attribute] Submodule `patches` may not be available as an attribute on module `matplotlib`
pandas/plotting/_matplotlib/core.py:1389:13: error[invalid-argument-type] Argument to bound method `scatter` is incorrect: Expected `int | float | _Buffer | ... omitted 5 union elements`, found `Unknown | ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]`
pandas/plotting/_matplotlib/core.py:1457:39: error[invalid-argument-type] Argument to bound method `get_cmap` is incorrect: Expected `str | Colormap`, found `Unknown | None`
pandas/plotting/_matplotlib/misc.py:131:22: warning[possibly-missing-attribute] Submodule `lines` may not be available as an attribute on module `matplotlib`
pandas/plotting/_matplotlib/misc.py:192:18: warning[possibly-missing-attribute] Submodule `patches` may not be available as an attribute on module `matplotlib`
@ -964,4 +1028,4 @@ pandas/util/_exceptions.py:45:15: error[no-matching-overload] No overload of fun
pandas/util/_print_versions.py:29:14: error[unresolved-import] Cannot resolve imported module `pandas._version_meson`
pandas/util/_validators.py:388:33: error[invalid-argument-type] Argument to function `validate_bool_kwarg` is incorrect: Argument type `object` does not satisfy constraints (`bool`, `int`, `None`) of type variable `BoolishNoneT`
typings/numba.pyi:24:21: error[unresolved-attribute] Module `numba` has no member `compiler`
Found 966 diagnostics
Found 1030 diagnostics

View File

@ -46,6 +46,8 @@ src/prefect/server/models/block_types.py:200:12: error[unresolved-attribute] Obj
src/prefect/server/models/block_types.py:221:12: error[unresolved-attribute] Object of type `Result[Any]` has no attribute `rowcount`
src/prefect/server/models/concurrency_limits.py:153:12: error[unresolved-attribute] Object of type `Result[Any]` has no attribute `rowcount`
src/prefect/server/models/concurrency_limits.py:165:12: error[unresolved-attribute] Object of type `Result[Any]` has no attribute `rowcount`
src/prefect/server/models/concurrency_limits_v2.py:16:12: error[invalid-return-type] Return type does not match returned value: expected `ColumnElement[int | float]`, found `greatest[int]`
src/prefect/server/models/concurrency_limits_v2.py:69:12: error[invalid-return-type] Return type does not match returned value: expected `ColumnElement[int | float]`, found `greatest[int]`
src/prefect/server/models/concurrency_limits_v2.py:171:12: error[unresolved-attribute] Object of type `Result[Unknown]` has no attribute `rowcount`
src/prefect/server/models/concurrency_limits_v2.py:192:12: error[unresolved-attribute] Object of type `Result[Any]` has no attribute `rowcount`
src/prefect/server/models/concurrency_limits_v2.py:236:12: error[unresolved-attribute] Object of type `Result[Unknown]` has no attribute `rowcount`
@ -131,4 +133,4 @@ src/prefect/server/models/workers.py:672:12: warning[possibly-missing-attribute]
src/prefect/server/models/workers.py:755:9: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["heartbeat_interval_seconds"]` and value of type `int` on object of type `dict[str, datetime | WorkerStatus]`
src/prefect/server/models/workers.py:770:12: error[unresolved-attribute] Object of type `Result[Unknown]` has no attribute `rowcount`
src/prefect/server/models/workers.py:799:12: error[unresolved-attribute] Object of type `Result[Any]` has no attribute `rowcount`
Found 133 diagnostics
Found 135 diagnostics

View File

@ -607,6 +607,7 @@ ERROR torch/_dynamo/compiled_autograd.py:181:20-31: No attribute `isnan` in modu
ERROR torch/_dynamo/compiled_autograd.py:192:20-31: No attribute `isnan` in module `torch` [missing-attribute]
ERROR torch/_dynamo/compiled_autograd.py:420:13-34: Module `torch.fx.experimental` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_dynamo/compiled_autograd.py:420:13-50: Module `torch.fx.experimental.symbolic_shapes` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_dynamo/compiled_autograd.py:422:16-427:10: Returned type `tuple[str, list[Tensor], list[Unknown], list[float | int]]` is not assignable to declared return type `tuple[str, list[Tensor], list[IntLikeType], list[FloatLikeType]]` [bad-return]
ERROR torch/_dynamo/compiled_autograd.py:473:12-33: No attribute `is_grad_enabled` in module `torch` [missing-attribute]
ERROR torch/_dynamo/compiled_autograd.py:486:19-35: Module `torch._functorch` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_dynamo/compiled_autograd.py:486:19-49: Module `torch._functorch._aot_autograd` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
@ -630,6 +631,7 @@ ERROR torch/_dynamo/compiled_autograd.py:1573:5-21: Module `torch._C._dynamo` ex
ERROR torch/_dynamo/compiled_autograd.py:1574:5-21: Module `torch._C._dynamo` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_dynamo/compiled_autograd.py:1575:5-21: Module `torch._C._dynamo` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_dynamo/compiled_autograd.py:1597:64-87: No attribute `contiguous_format` in module `torch` [missing-attribute]
ERROR torch/_dynamo/comptime.py:234:9-235:27: `InstructionTranslatorBase | None` is not assignable to `InstructionTranslatorBase` (caused by inconsistent types when breaking cycles) [bad-assignment]
ERROR torch/_dynamo/convert_frame.py:289:27-48: No attribute `is_grad_enabled` in module `torch` [missing-attribute]
ERROR torch/_dynamo/convert_frame.py:296:13-47: No attribute `_PreserveDispatchKeyGuard` in module `torch._C` [missing-attribute]
ERROR torch/_dynamo/convert_frame.py:300:36-67: No attribute `is_inference_mode_enabled` in module `torch` [missing-attribute]
@ -643,6 +645,7 @@ ERROR torch/_dynamo/convert_frame.py:342:21-66: No attribute `_is_default_mobile
ERROR torch/_dynamo/convert_frame.py:345:21-65: No attribute `_unset_default_mobile_cpu_allocator` in module `torch._C` [missing-attribute]
ERROR torch/_dynamo/convert_frame.py:347:26-55: No attribute `DisableTorchFunction` in module `torch._C` [missing-attribute]
ERROR torch/_dynamo/convert_frame.py:349:17-52: No attribute `_set_fp32_precision_setter` in module `torch._C` [missing-attribute]
ERROR torch/_dynamo/convert_frame.py:667:9-671:43: `FrameType | None` is not assignable to `FrameType` (caused by inconsistent types when breaking cycles) [bad-assignment]
ERROR torch/_dynamo/convert_frame.py:1034:23-69: `((...) -> Any) | GraphModule` is not assignable to variable `compiled_fn` with type `((...) -> Any) | None` [bad-assignment]
ERROR torch/_dynamo/convert_frame.py:1035:57-68: Argument `((...) -> Any) | None` is not assignable to parameter `compiled_fn` with type `(...) -> Any` in function `GraphRuntimeEnv.forward_callable` [bad-argument-type]
ERROR torch/_dynamo/convert_frame.py:1206:25-43: Argument `(gm: GraphModule, example_inputs: list[Tensor]) -> GraphModule` is not assignable to parameter `compiler_fn` with type `(GraphModule, list[Tensor]) -> CompiledFn` in function `compile_frame` [bad-argument-type]
@ -712,6 +715,7 @@ ERROR torch/_dynamo/device_interface.py:580:27-39: No attribute `device` in modu
ERROR torch/_dynamo/eval_frame.py:210:49-81: Argument `WrapBackendDebug` is not assignable to parameter `compiler_fn` with type `(GraphModule, list[Tensor]) -> CompiledFn` in function `_create_wrapped_callback` [bad-argument-type]
ERROR torch/_dynamo/eval_frame.py:316:49-61: Argument `WrapBackendDebug` is not assignable to parameter `compiler_fn` with type `(GraphModule, list[Tensor]) -> CompiledFn` in function `_create_wrapped_callback` [bad-argument-type]
ERROR torch/_dynamo/eval_frame.py:357:12-28: Module `torch._C._dynamo` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_dynamo/eval_frame.py:401:39-44: Runtime checkable protocol `Sized` has an unsafe overlap with type `Module` [invalid-argument]
ERROR torch/_dynamo/eval_frame.py:410:44-67: Argument `BoundMethod[Module, (...) -> Any]` is not assignable to parameter `fn` with type `(...) -> Any` in function `DisableContext.__call__` [bad-argument-type]
ERROR torch/_dynamo/eval_frame.py:421:71-85: Argument `Module` is not assignable to parameter `fn` with type `(ParamSpec(@_)) -> @_` in function `torch._dynamo.external_utils.wrap_inline` [bad-argument-type]
ERROR torch/_dynamo/eval_frame.py:527:9-20: Class member `OptimizedModule.__setattr__` overrides parent class `Module` in an inconsistent manner [bad-param-name-override]
@ -792,6 +796,7 @@ ERROR torch/_dynamo/guards.py:3507:15-32: Module `torch._dynamo.exc` exists, but
ERROR torch/_dynamo/guards.py:3553:37-53: Module `torch._C._dynamo` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_dynamo/guards.py:3776:23-40: Module `torch._dynamo.exc` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_dynamo/guards.py:3788:23-40: Module `torch._dynamo.exc` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_dynamo/guards.py:3842:25-3844:20: Object of class `object` has no attribute `items` [missing-attribute]
ERROR torch/_dynamo/guards.py:3855:21-34: Module `torch._guards` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_dynamo/logging.py:52:16-22: Could not find import of `triton` [missing-import]
ERROR torch/_dynamo/output_graph.py:335:28-44: Module `torch._functorch` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
@ -869,6 +874,7 @@ ERROR torch/_dynamo/polyfills/__init__.py:364:12-31: No attribute `_foreach_add_
ERROR torch/_dynamo/polyfills/__init__.py:368:12-30: No attribute `_foreach_pow` in module `torch` [missing-attribute]
ERROR torch/_dynamo/polyfills/fx.py:4:22-39: Could not import `_fx_map_aggregate` from `torch._C` [missing-module-attribute]
ERROR torch/_dynamo/polyfills/fx.py:4:41-52: Could not import `_fx_map_arg` from `torch._C` [missing-module-attribute]
ERROR torch/_dynamo/polyfills/os.py:17:1-64: Argument `(path: PathLike[AnyStr] | AnyStr) -> AnyStr` is not assignable to parameter with type `(path: str) -> str` [bad-argument-type]
ERROR torch/_dynamo/polyfills/tensor.py:14:10-47: No attribute `DisableTorchFunctionSubclass` in module `torch._C` [missing-attribute]
ERROR torch/_dynamo/repro/after_aot.py:42:5-63: Could not find import of `triton.runtime.autotuner` [missing-import]
ERROR torch/_dynamo/repro/after_aot.py:43:5-47: Could not find import of `triton.runtime.jit` [missing-import]
@ -1024,6 +1030,7 @@ ERROR torch/_dynamo/utils.py:4445:9-32: No attribute `default_generator` in modu
ERROR torch/_dynamo/utils.py:4496:35-73: No attribute `_disabled_torch_function_impl` in module `torch._C` [missing-attribute]
ERROR torch/_dynamo/utils.py:4507:27-40: Module `torch._guards` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_dynamo/utils.py:4557:14-45: Module `torch._dynamo.compiled_autograd` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_dynamo/utils.py:4594:9-13: `args` cannot be annotated with `list[Any]`, it is already defined with type `tuple[Any, ...]` [redefinition]
ERROR torch/_dynamo/utils.py:4612:8-39: Module `torch._dynamo.compiled_autograd` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_dynamo/utils.py:4690:17-35: Module `torch._C._autograd` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_dynamo/utils.py:4693:9-27: Module `torch._C._autograd` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
@ -1277,7 +1284,6 @@ ERROR torch/_dynamo/variables/functions.py:628:18-44: Module `torch._dynamo.side
ERROR torch/_dynamo/variables/functions.py:645:22-48: Module `torch._dynamo.side_effects` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_dynamo/variables/functions.py:1839:34-47: Module `torch._guards` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
WARN torch/_dynamo/variables/functions.py:1981:13-38: `torch.distributed.distributed_c10d._reduce_scatter_base` is deprecated [deprecated]
ERROR torch/_dynamo/variables/functions.py:2193:33-45: `(...) -> object` is not assignable to attribute `traceable_fn` with type `_F` [bad-assignment]
ERROR torch/_dynamo/variables/functions.py:2446:9-17: Class member `DynamoTritonHOPifier.call_HOP` overrides parent class `TritonHOPifier` in an inconsistent manner [bad-param-name-override]
ERROR torch/_dynamo/variables/higher_order_ops.py:98:24-57: Argument `list[bool] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
ERROR torch/_dynamo/variables/higher_order_ops.py:98:66-83: Argument `list[Any] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
@ -1459,7 +1465,6 @@ ERROR torch/_dynamo/variables/misc.py:1046:16-47: Module `torch._dynamo.compiled
ERROR torch/_dynamo/variables/misc.py:1083:9-22: Class member `LambdaVariable.call_function` overrides parent class `VariableTracker` in an inconsistent manner [bad-override]
ERROR torch/_dynamo/variables/misc.py:1145:9-22: Class member `GetAttrVariable.call_function` overrides parent class `VariableTracker` in an inconsistent manner [bad-override]
ERROR torch/_dynamo/variables/misc.py:1237:9-22: Class member `MethodWrapperVariable.call_function` overrides parent class `VariableTracker` in an inconsistent manner [bad-override]
ERROR torch/_dynamo/variables/misc.py:1272:29-61: `(self: type) -> MappingProxyType[str, Any]` is not subscriptable [unsupported-operation]
ERROR torch/_dynamo/variables/misc.py:1367:42-52: `attr_value` may be uninitialized [unbound-name]
ERROR torch/_dynamo/variables/misc.py:1403:20-35: Object of class `InstructionTranslator` has no attribute `side_effects` [missing-attribute]
ERROR torch/_dynamo/variables/misc.py:1498:9-22: Class member `NumpyVariable.call_function` overrides parent class `VariableTracker` in an inconsistent manner [bad-override]
@ -2000,6 +2005,7 @@ ERROR torch/_export/db/examples/type_reflection_method.py:20:17-28: No attribute
ERROR torch/_export/db/examples/unsupported_operator.py:15:17-28: No attribute `randn` in module `torch` [missing-attribute]
ERROR torch/_export/db/examples/user_input_mutation.py:15:17-28: No attribute `randn` in module `torch` [missing-attribute]
ERROR torch/_export/db/logging.py:43:33-40: Cannot index into `dict[type[TorchRuntimeError] | type[Unsupported] | type[UserError], str | None]` [bad-index]
ERROR torch/_export/non_strict_utils.py:102:9-105:27: `list[KeyEntry] | tuple[KeyEntry, ...]` is not assignable to `tuple[KeyEntry, ...]` (caused by inconsistent types when breaking cycles) [bad-assignment]
ERROR torch/_export/non_strict_utils.py:172:51-69: No attribute `ScriptObject` in module `torch` [missing-attribute]
ERROR torch/_export/non_strict_utils.py:312:54-67: No attribute `maximum` in module `torch` [missing-attribute]
ERROR torch/_export/non_strict_utils.py:321:39-52: No attribute `maximum` in module `torch` [missing-attribute]
@ -2019,7 +2025,7 @@ ERROR torch/_export/non_strict_utils.py:1035:20-32: No attribute `tensor` in mod
ERROR torch/_export/non_strict_utils.py:1044:24-35: Module `torch._refs` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_export/non_strict_utils.py:1050:38-53: No attribute `unsqueeze` in module `torch` [missing-attribute]
ERROR torch/_export/non_strict_utils.py:1052:34-46: No attribute `select` in module `torch` [missing-attribute]
ERROR torch/_export/non_strict_utils.py:1103:25-32: Index 0 out of range for tuple with 0 elements [bad-index]
ERROR torch/_export/non_strict_utils.py:1103:30-31: Index 0 out of range for tuple with 0 elements [bad-index]
ERROR torch/_export/pass_base.py:123:29-45: No attribute `dequantize` in module `torch` [missing-attribute]
ERROR torch/_export/pass_base.py:167:29-45: No attribute `dequantize` in module `torch` [missing-attribute]
ERROR torch/_export/pass_base.py:341:21-32: No attribute `empty` in module `torch` [missing-attribute]
@ -2076,6 +2082,7 @@ ERROR torch/_export/passes/replace_set_grad_with_hop_pass.py:41:40-66: No attrib
ERROR torch/_export/passes/replace_set_grad_with_hop_pass.py:44:41-62: No attribute `is_grad_enabled` in module `torch` [missing-attribute]
ERROR torch/_export/passes/replace_view_ops_with_view_copy_ops_pass.py:18:24-47: No attribute `FunctionSchema` in module `torch._C` [missing-attribute]
ERROR torch/_export/passes/replace_view_ops_with_view_copy_ops_pass.py:25:38-61: No attribute `FunctionSchema` in module `torch._C` [missing-attribute]
ERROR torch/_export/serde/dynamic_shapes.py:49:12-56:6: `dict[str, RootDim]` is not assignable to variable `dims` with type `dict[str, dict[str, int | list[str] | None]]` [bad-assignment]
ERROR torch/_export/serde/serialize.py:134:5-16: No attribute `uint8` in module `torch` [missing-attribute]
ERROR torch/_export/serde/serialize.py:135:5-15: No attribute `int8` in module `torch` [missing-attribute]
ERROR torch/_export/serde/serialize.py:136:5-17: No attribute `uint16` in module `torch` [missing-attribute]
@ -2192,6 +2199,7 @@ ERROR torch/_export/serde/serialize.py:2558:29-47: Module `torch.utils._sympy` e
ERROR torch/_export/serde/serialize.py:2558:29-57: Module `torch.utils._sympy.functions` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_export/serde/serialize.py:3101:51-85: No attribute `_get_max_operator_version` in module `torch._C` [missing-attribute]
ERROR torch/_export/serde/serialize.py:3180:9-16: Class member `EnumEncoder.default` overrides parent class `JSONEncoder` in an inconsistent manner [bad-param-name-override]
ERROR torch/_export/serde/serialize.py:3640:5-14: `constants` cannot be annotated with `set[str]`, it is already defined with type `set[str] | None` [redefinition]
ERROR torch/_export/serde/serialize.py:3865:31-51: No attribute `FunctionSchema` in module `torch` [missing-attribute]
ERROR torch/_export/verifier.py:49:19-38: No attribute `memory_format` in module `torch` [missing-attribute]
ERROR torch/_export/verifier.py:49:40-51: No attribute `dtype` in module `torch` [missing-attribute]
@ -2289,6 +2297,7 @@ ERROR torch/_functorch/_aot_autograd/graph_capture_wrappers.py:778:17-40: No att
ERROR torch/_functorch/_aot_autograd/graph_capture_wrappers.py:778:41-61: No attribute `DispatchKey` in module `torch._C` [missing-attribute]
ERROR torch/_functorch/_aot_autograd/graph_capture_wrappers.py:862:29-47: Module `torch.fx.traceback` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_functorch/_aot_autograd/graph_capture_wrappers.py:907:30-48: Module `torch.fx.traceback` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_functorch/_aot_autograd/graph_capture_wrappers.py:959:28-964:26: No matching overload found for function `zip.__new__` called with arguments: (type[zip[_T_co]], None, list[FxValue], None, list[InputAliasInfo]) [no-matching-overload]
ERROR torch/_functorch/_aot_autograd/graph_capture_wrappers.py:971:29-47: Module `torch.fx.traceback` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_functorch/_aot_autograd/graph_capture_wrappers.py:1008:25-43: Module `torch.fx.traceback` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_functorch/_aot_autograd/graph_capture_wrappers.py:1074:25-58: No attribute `_ExcludeDispatchKeyGuard` in module `torch._C` [missing-attribute]
@ -2833,7 +2842,7 @@ ERROR torch/_higher_order_ops/triton_kernel_wrap.py:412:17-87: Could not find im
ERROR torch/_higher_order_ops/triton_kernel_wrap.py:419:13-71: Could not find import of `triton._utils` [missing-import]
ERROR torch/_higher_order_ops/triton_kernel_wrap.py:1019:16-32: Method `__call__` inherited from class `HigherOrderOperator` has no implementation and cannot be accessed via `super()` [missing-attribute]
ERROR torch/_higher_order_ops/triton_kernel_wrap.py:1045:16-32: Method `__call__` inherited from class `HigherOrderOperator` has no implementation and cannot be accessed via `super()` [missing-attribute]
ERROR torch/_higher_order_ops/triton_kernel_wrap.py:1080:13-17: Argument `list[((dict[str, int]) -> tuple[int, ...]) | tuple[Expr | SymInt | int, ...]]` is not assignable to parameter `grids` with type `list[((dict[str, int]) -> tuple[int, ...]) | tuple[Expr | int, ...]]` in function `torch._inductor.codegen.wrapper.user_defined_kernel_grid_fn_code` [bad-argument-type]
ERROR torch/_higher_order_ops/triton_kernel_wrap.py:1080:13-17: Argument `list[TritonGridType]` is not assignable to parameter `grids` with type `list[TritonGrid]` in function `torch._inductor.codegen.wrapper.user_defined_kernel_grid_fn_code` [bad-argument-type]
ERROR torch/_higher_order_ops/triton_kernel_wrap.py:1095:17-1098:18: Could not find import of `triton.tools.experimental_descriptor` [missing-import]
ERROR torch/_higher_order_ops/triton_kernel_wrap.py:1115:17-76: Could not find import of `triton.tools.tensor_descriptor` [missing-import]
ERROR torch/_higher_order_ops/triton_kernel_wrap.py:1140:5-20: Cannot index into `Autotuner` [bad-index]
@ -3119,6 +3128,7 @@ ERROR torch/_inductor/choices.py:107:37-48: No attribute `dtype` in module `torc
ERROR torch/_inductor/choices.py:352:34-52: Module `torch.utils._sympy` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/choices.py:352:34-60: Module `torch.utils._sympy.numbers` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/choices.py:391:17-29: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/choices.py:502:25-513:26: Argument `() -> dict[str, float | list[str] | str | None]` is not assignable to parameter `row_fn` with type `() -> dict[str, float | str | None]` in function `torch._inductor.metrics.MetricTable.add_row` [bad-argument-type]
ERROR torch/_inductor/codegen/common.py:183:13-25: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/codegen/common.py:186:12-23: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_inductor/codegen/common.py:186:26-37: No attribute `uint8` in module `torch` [missing-attribute]
@ -3818,7 +3828,7 @@ ERROR torch/_inductor/codegen/cpp_wrapper_gpu.py:750:60-71: No attribute `uint8`
ERROR torch/_inductor/codegen/cpp_wrapper_mps.py:39:26-38: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/codegen/cpp_wrapper_mps.py:84:37-48: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_inductor/codegen/cuda/cuda_kernel.py:13:19-39: Could not import `dtype` from `torch` [missing-module-attribute]
ERROR torch/_inductor/codegen/cuda/cuda_kernel.py:303:66-83: Argument `Sequence[Expr | int]` is not assignable to parameter `*iterables` with type `Iterable[Expr]` in function `itertools.chain.__new__` [bad-argument-type]
ERROR torch/_inductor/codegen/cuda/cuda_kernel.py:303:66-83: Argument `Sequence[_IntLike]` is not assignable to parameter `*iterables` with type `Iterable[Expr]` in function `itertools.chain.__new__` [bad-argument-type]
ERROR torch/_inductor/codegen/cuda/cuda_kernel.py:387:23-48: Argument `int` is not assignable to parameter `count` with type `Expr` in function `torch._inductor.codegen.common.WorkspaceArg.__init__` [bad-argument-type]
ERROR torch/_inductor/codegen/cuda/cuda_kernel.py:483:16-19: Returned type `Expr` is not assignable to declared return type `str` [bad-return]
ERROR torch/_inductor/codegen/cuda/cuda_kernel.py:502:50-56: Argument `Expr | int` is not assignable to parameter `left` with type `Expr` in function `torch._inductor.sizevars.SizeVarAllocator.statically_known_leq` [bad-argument-type]
@ -4134,6 +4144,7 @@ ERROR torch/_inductor/codegen/halide.py:566:9-14: Class member `HalideOverrides.
ERROR torch/_inductor/codegen/halide.py:594:25-36: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_inductor/codegen/halide.py:720:35-46: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_inductor/codegen/halide.py:811:42-43: Argument `Literal[1]` is not assignable to parameter `divisor` with type `Expr` in function `torch._inductor.codegen.simd.IterationRangesRoot.lookup` [bad-argument-type]
ERROR torch/_inductor/codegen/halide.py:832:17-860:51: `int` is not assignable to `int` (caused by inconsistent types when breaking cycles) [bad-assignment]
ERROR torch/_inductor/codegen/halide.py:983:32-70: `list[tuple[list[Basic | Unknown], Expr | Unknown] | tuple[list[Symbol], Expr]]` is not assignable to variable `split_failed` with type `list[tuple[list[Symbol], Expr]]` [bad-assignment]
ERROR torch/_inductor/codegen/halide.py:1133:22-35: No attribute `float16` in module `torch` [missing-attribute]
ERROR torch/_inductor/codegen/halide.py:1133:37-51: No attribute `bfloat16` in module `torch` [missing-attribute]
@ -4352,7 +4363,6 @@ ERROR torch/_inductor/codegen/simd_kernel_features.py:357:46-52: Argument `list[
ERROR torch/_inductor/codegen/subgraph.py:97:44-56: Object of class `Expr` has no attribute `name` [missing-attribute]
ERROR torch/_inductor/codegen/subgraph.py:98:56-68: Object of class `Expr` has no attribute `name` [missing-attribute]
ERROR torch/_inductor/codegen/subgraph.py:373:31-42: No attribute `empty` in module `torch` [missing-attribute]
ERROR torch/_inductor/codegen/triton_combo_kernel.py:619:26-44: Class `NoneType` has no class attribute `grid_expr` [missing-attribute]
ERROR torch/_inductor/codegen/triton_split_scan.py:92:16-37: Could not find import of `triton.language` [missing-import]
ERROR torch/_inductor/codegen/triton_split_scan.py:130:55-61: Argument `int` is not assignable to parameter `index` with type `Expr` in function `torch._inductor.codegen.simd.SIMDKernel.index_to_str` [bad-argument-type]
ERROR torch/_inductor/codegen/triton_utils.py:39:25-44: No attribute `float8_e4m3fn` in module `torch` [missing-attribute]
@ -4372,10 +4382,10 @@ ERROR torch/_inductor/codegen/wrapper.py:1148:19-32: Module `torch._guards` exis
ERROR torch/_inductor/codegen/wrapper.py:1155:14-36: Module `torch._inductor.config` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/codegen/wrapper.py:1233:34-59: Could not import `_cuda_getCurrentRawStream` from `torch._C` [missing-module-attribute]
ERROR torch/_inductor/codegen/wrapper.py:1289:28-32: Cannot index into `dict[str, str]` [bad-index]
ERROR torch/_inductor/codegen/wrapper.py:1323:54-70: Argument `Sequence[Expr | int]` is not assignable to parameter `shape` with type `Sequence[Expr]` in function `PythonWrapperCodegen.codegen_python_shape_tuple` [bad-argument-type]
ERROR torch/_inductor/codegen/wrapper.py:1323:54-70: Argument `Sequence[_IntLike]` is not assignable to parameter `shape` with type `Sequence[Expr]` in function `PythonWrapperCodegen.codegen_python_shape_tuple` [bad-argument-type]
ERROR torch/_inductor/codegen/wrapper.py:1920:16-38: Module `torch._inductor.config` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/codegen/wrapper.py:1940:56-61: Argument `Expr | Symbol | TensorBox | TorchBindObject` is not assignable to parameter `value` with type `TensorBox` in function `PythonWrapperCodegen.codegen_input_symbol_assignment` [bad-argument-type]
ERROR torch/_inductor/codegen/wrapper.py:1946:45-83: Argument `list[Iterable[Expr] | Sequence[Expr | int]]` is not assignable to parameter `iterable` with type `Iterable[Iterable[Expr]]` in function `itertools.chain.from_iterable` [bad-argument-type]
ERROR torch/_inductor/codegen/wrapper.py:1946:45-83: Argument `list[Iterable[Expr] | Sequence[_IntLike]]` is not assignable to parameter `iterable` with type `Iterable[Iterable[Expr]]` in function `itertools.chain.from_iterable` [bad-argument-type]
ERROR torch/_inductor/codegen/wrapper.py:2131:38-56: No attribute `ScriptObject` in module `torch` [missing-attribute]
ERROR torch/_inductor/codegen/wrapper.py:2378:41-52: Argument `list[SymInt | int] | None` is not assignable to parameter `block_shape` with type `list[Expr] | None` in function `torch._inductor.codegen.common.TMADescriptorArg.__init__` [bad-argument-type]
ERROR torch/_inductor/codegen/wrapper.py:2462:45-48: Cannot set item in `dict[Symbol, Symbol]` [unsupported-operation]
@ -4409,6 +4419,7 @@ ERROR torch/_inductor/comms.py:69:34-46: No attribute `median` in module `torch`
ERROR torch/_inductor/comms.py:70:9-21: No attribute `tensor` in module `torch` [missing-attribute]
ERROR torch/_inductor/comms.py:776:8-22: Module `importlib.util` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/comms.py:1614:8-22: Module `importlib.util` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/comms.py:2129:5-2160:39: `list[BaseSchedulerNode] | object` is not assignable to `list[BaseSchedulerNode]` (caused by inconsistent types when breaking cycles) [bad-assignment]
ERROR torch/_inductor/comms.py:2471:13-38: Module `torch._inductor.scheduler` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/comms.py:2472:13-38: Module `torch._inductor.scheduler` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/comms.py:2479:18-43: Module `torch._inductor.scheduler` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
@ -4438,6 +4449,8 @@ ERROR torch/_inductor/compile_fx.py:1672:29-42: Module `torch._guards` exists, b
ERROR torch/_inductor/compile_fx.py:1677:29-50: Module `torch._inductor.debug` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/compile_fx.py:1819:24-37: Module `torch._guards` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/compile_fx.py:1840:12-31: No attribute `empty_strided` in module `torch` [missing-attribute]
ERROR torch/_inductor/compile_fx.py:1864:5-22: `static_input_idxs` cannot be annotated with `OrderedSet[int]`, it is already defined with type `Sequence[int]` [redefinition]
ERROR torch/_inductor/compile_fx.py:1964:5-19: `config_patches` cannot be annotated with `dict[str, Any]`, it is already defined with type `dict[str, Any] | None` [redefinition]
ERROR torch/_inductor/compile_fx.py:1993:29-42: Module `torch._guards` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/compile_fx.py:1996:9-22: Module `torch._guards` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/compile_fx.py:2062:23-36: Module `torch._guards` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
@ -4479,15 +4492,20 @@ ERROR torch/_inductor/compile_worker/__main__.py:30:12-18: Could not find import
ERROR torch/_inductor/compile_worker/subproc_pool.py:446:9-29: Module `multiprocessing.util` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/compile_worker/tracked_process_pool.py:81:24-42: Module `concurrent.futures` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/compile_worker/utils.py:42:5-31: No attribute `_initCrashHandler` in module `torch._C` [missing-attribute]
ERROR torch/_inductor/config.py:244:72-246:2: `str` is not assignable to `Literal['combined', 'intermediates', 'none', 'outputs']` [bad-assignment]
ERROR torch/_inductor/config.py:291:16-41: Module `torch._inductor.scheduler` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/config.py:292:15-40: Module `torch._inductor.scheduler` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/config.py:301:16-41: Module `torch._inductor.scheduler` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/config.py:302:15-40: Module `torch._inductor.scheduler` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/config.py:393:20-45: Module `torch._inductor.scheduler` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/config.py:394:19-44: Module `torch._inductor.scheduler` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/config.py:543:68-545:10: `str` is not assignable to `Literal['DEFAULT', 'EXHAUSTIVE']` [bad-assignment]
ERROR torch/_inductor/config.py:550:68-552:10: `str` is not assignable to `Literal['DEFAULT', 'EXHAUSTIVE']` [bad-assignment]
ERROR torch/_inductor/config.py:639:20-42: Module `torch._inductor.config` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/config.py:643:20-42: Module `torch._inductor.config` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/config.py:1040:9-37: Could not find import of `libfb.py` [missing-import]
ERROR torch/_inductor/config.py:1540:41-1542:6: `int` is not assignable to `Literal[0, 1, 2, 3]` [bad-assignment]
ERROR torch/_inductor/config.py:1666:69-1668:6: `str` is not assignable to `Literal['0', '1', '2', '3']` [bad-assignment]
ERROR torch/_inductor/constant_folding.py:130:37-51: No attribute `bfloat16` in module `torch` [missing-attribute]
ERROR torch/_inductor/constant_folding.py:192:9-17: Class member `ConstantFolder.run_node` overrides parent class `Interpreter` in an inconsistent manner [bad-param-name-override]
ERROR torch/_inductor/constant_folding.py:242:17-26: No attribute `Tag` in module `torch` [missing-attribute]
@ -4540,6 +4558,7 @@ ERROR torch/_inductor/cudagraph_trees.py:1080:13-33: No attribute `_foreach_copy
ERROR torch/_inductor/cudagraph_trees.py:1086:21-65: No attribute `_tensors_data_ptrs_at_indices_equal` in module `torch._C` [missing-attribute]
ERROR torch/_inductor/cudagraph_trees.py:1384:43-76: No attribute `_cuda_getCheckpointState` in module `torch._C` [missing-attribute]
ERROR torch/_inductor/cudagraph_trees.py:1438:13-40: No attribute `_add_cached_tensor` in module `torch._C` [missing-attribute]
ERROR torch/_inductor/cudagraph_trees.py:1474:9-1476:31: `CUDAGraphNode | Self@CUDAGraphNode | None` is not assignable to `Self@CUDAGraphNode` (caused by inconsistent types when breaking cycles) [bad-assignment]
ERROR torch/_inductor/cudagraph_trees.py:1629:17-47: No attribute `_remove_cached_tensor` in module `torch._C` [missing-attribute]
ERROR torch/_inductor/cudagraph_trees.py:1670:16-61: No attribute `_construct_storage_from_data_pointer` in module `torch._C` [missing-attribute]
ERROR torch/_inductor/cudagraph_trees.py:1697:50-65: No attribute `Generator` in module `torch` [missing-attribute]
@ -5495,16 +5514,19 @@ ERROR torch/_inductor/fx_passes/split_cat.py:506:13-24: No attribute `clamp` in
ERROR torch/_inductor/fx_passes/split_cat.py:531:13-25: No attribute `detach` in module `torch` [missing-attribute]
ERROR torch/_inductor/fx_passes/split_cat.py:734:32-41: No attribute `cat` in module `torch` [missing-attribute]
ERROR torch/_inductor/fx_passes/split_cat.py:734:43-54: No attribute `stack` in module `torch` [missing-attribute]
ERROR torch/_inductor/fx_passes/split_cat.py:779:9-792:45: `list[int] | None` is not assignable to `None` (caused by inconsistent types when breaking cycles) [bad-assignment]
ERROR torch/_inductor/fx_passes/split_cat.py:807:34-46: No attribute `cumsum` in module `torch` [missing-attribute]
ERROR torch/_inductor/fx_passes/split_cat.py:807:47-59: No attribute `tensor` in module `torch` [missing-attribute]
ERROR torch/_inductor/fx_passes/split_cat.py:859:41-50: No attribute `cat` in module `torch` [missing-attribute]
ERROR torch/_inductor/fx_passes/split_cat.py:859:52-63: No attribute `stack` in module `torch` [missing-attribute]
ERROR torch/_inductor/fx_passes/split_cat.py:866:65-74: No attribute `cat` in module `torch` [missing-attribute]
ERROR torch/_inductor/fx_passes/split_cat.py:872:25-873:28: Cannot index into `Mapping[str, Unknown]` [bad-index]
ERROR torch/_inductor/fx_passes/split_cat.py:888:41-52: No attribute `stack` in module `torch` [missing-attribute]
ERROR torch/_inductor/fx_passes/split_cat.py:941:34-46: No attribute `cumsum` in module `torch` [missing-attribute]
ERROR torch/_inductor/fx_passes/split_cat.py:941:47-59: No attribute `tensor` in module `torch` [missing-attribute]
ERROR torch/_inductor/fx_passes/split_cat.py:978:41-50: No attribute `cat` in module `torch` [missing-attribute]
ERROR torch/_inductor/fx_passes/split_cat.py:978:52-63: No attribute `stack` in module `torch` [missing-attribute]
ERROR torch/_inductor/fx_passes/split_cat.py:997:17-1074:22: `Mapping[str, Unknown] | Node | OpOverload[Ellipsis, Any] | Sequence[Unknown] | SymBool | SymFloat | SymInt | Tensor | bool | complex | float | int | range | slice[Any, Any, Any] | str | tuple[Unknown, ...] | Unknown | None` is not assignable to `None` (caused by inconsistent types when breaking cycles) [bad-assignment]
ERROR torch/_inductor/fx_passes/split_cat.py:1021:29-40: No attribute `stack` in module `torch` [missing-attribute]
ERROR torch/_inductor/fx_passes/split_cat.py:1044:29-44: No attribute `unflatten` in module `torch` [missing-attribute]
ERROR torch/_inductor/fx_passes/split_cat.py:1054:29-42: No attribute `movedim` in module `torch` [missing-attribute]
@ -5721,7 +5743,7 @@ ERROR torch/_inductor/ir.py:409:32-44: No attribute `device` in module `torch` [
ERROR torch/_inductor/ir.py:429:29-41: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:464:50-53: Argument `Expr | int` is not assignable to parameter `left` with type `Expr` in function `torch._inductor.sizevars.SizeVarAllocator.statically_known_leq` [bad-argument-type]
ERROR torch/_inductor/ir.py:489:50-52: Argument `SymInt | int` is not assignable to parameter `left` with type `Expr | int` in function `torch._inductor.sizevars.SizeVarAllocator.statically_known_equals` [bad-argument-type]
ERROR torch/_inductor/ir.py:494:38-45: Argument `Sequence[SymInt | int]` is not assignable to parameter `strides1` with type `Sequence[Expr | int]` in function `significant_strides_equal` [bad-argument-type]
ERROR torch/_inductor/ir.py:494:38-45: Argument `Sequence[SymInt | int]` is not assignable to parameter `strides1` with type `Sequence[_IntLike]` in function `significant_strides_equal` [bad-argument-type]
ERROR torch/_inductor/ir.py:501:13-26: Cannot set item in `list[Expr]` [unsupported-operation]
ERROR torch/_inductor/ir.py:613:21-42: Module `torch._inductor.debug` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/ir.py:623:25-46: Module `torch._inductor.debug` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
@ -5735,8 +5757,8 @@ ERROR torch/_inductor/ir.py:853:38-50: No attribute `device` in module `torch` [
ERROR torch/_inductor/ir.py:926:13-25: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:927:12-23: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:959:38-50: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:966:16-27: Returned type `Sequence[Expr | int]` is not assignable to declared return type `Sequence[Expr]` [bad-return]
ERROR torch/_inductor/ir.py:969:16-27: Returned type `Sequence[Expr | int]` is not assignable to declared return type `Sequence[Expr]` [bad-return]
ERROR torch/_inductor/ir.py:966:16-27: Returned type `Sequence[_IntLike]` is not assignable to declared return type `Sequence[Expr]` [bad-return]
ERROR torch/_inductor/ir.py:969:16-27: Returned type `Sequence[_IntLike]` is not assignable to declared return type `Sequence[Expr]` [bad-return]
ERROR torch/_inductor/ir.py:1051:42-54: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:1057:63-74: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:1093:42-54: No attribute `device` in module `torch` [missing-attribute]
@ -5744,12 +5766,12 @@ ERROR torch/_inductor/ir.py:1110:42-54: No attribute `device` in module `torch`
ERROR torch/_inductor/ir.py:1134:21-46: Argument `Expr` is not assignable to parameter with type `Sequence[Expr]` [bad-argument-type]
ERROR torch/_inductor/ir.py:1152:33-44: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:1219:16-27: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:1234:16-37: Returned type `Sequence[Expr | int]` is not assignable to declared return type `Sequence[Expr]` [bad-return]
ERROR torch/_inductor/ir.py:1234:16-37: Returned type `Sequence[_IntLike]` is not assignable to declared return type `Sequence[Expr]` [bad-return]
ERROR torch/_inductor/ir.py:1269:42-54: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:1286:17-29: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:1287:20-31: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:1288:20-31: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:1297:67-73: Argument `Sequence[Expr | int]` is not assignable to parameter `it` with type `Iterable[Expr]` in function `torch._inductor.utils.sympy_product` [bad-argument-type]
ERROR torch/_inductor/ir.py:1297:67-73: Argument `Sequence[_IntLike]` is not assignable to parameter `it` with type `Iterable[Expr]` in function `torch._inductor.utils.sympy_product` [bad-argument-type]
ERROR torch/_inductor/ir.py:1339:44-64: Argument `Integer | int` is not assignable to parameter with type `int` [bad-argument-type]
ERROR torch/_inductor/ir.py:1339:44-64: Argument `Integer | int` is not assignable to parameter `reduction_numel_hint` with type `int` in function `inner_reduction_splits` [bad-argument-type]
ERROR torch/_inductor/ir.py:1436:20-34: Argument `Sequence[Expr]` is not assignable to parameter `vars` with type `Sequence[Symbol]` in function `torch._inductor.sizevars.SizeVarAllocator.stride_hints` [bad-argument-type]
@ -5764,7 +5786,7 @@ ERROR torch/_inductor/ir.py:1451:39-49: Argument `Integer | int` is not assignab
ERROR torch/_inductor/ir.py:1451:39-49: Argument `Integer | int` is not assignable to parameter `numel_hint` with type `int` in function `inner_reduction_splits` [bad-argument-type]
ERROR torch/_inductor/ir.py:1459:20-31: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:1481:17-68: Argument `list[Expr]` is not assignable to parameter `stride` with type `Sequence[int] | None` in function `_fixed_indexer` [bad-argument-type]
ERROR torch/_inductor/ir.py:1490:50-56: Argument `list[Expr | int]` is not assignable to parameter with type `Sequence[Expr]` [bad-argument-type]
ERROR torch/_inductor/ir.py:1490:50-56: Argument `list[_IntLike]` is not assignable to parameter with type `Sequence[Expr]` [bad-argument-type]
ERROR torch/_inductor/ir.py:1490:59-70: No attribute `int64` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:1502:17-29: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:1503:20-31: No attribute `dtype` in module `torch` [missing-attribute]
@ -5813,18 +5835,18 @@ ERROR torch/_inductor/ir.py:2269:17-29: No attribute `device` in module `torch`
ERROR torch/_inductor/ir.py:2270:16-27: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:2326:13-29: Argument `list[Expr | Integer | int]` is not assignable to parameter `ranges` with type `list[Integer]` in function `WelfordReduction.create` [bad-argument-type]
ERROR torch/_inductor/ir.py:2327:13-25: Argument `list[FloorDiv]` is not assignable to parameter `reduction_ranges` with type `list[Integer]` in function `WelfordReduction.create` [bad-argument-type]
ERROR torch/_inductor/ir.py:2353:13-20: Argument `list[Expr | int]` is not assignable to parameter `reduction_ranges` with type `list[Integer]` in function `WelfordReduction.create` [bad-argument-type]
ERROR torch/_inductor/ir.py:2353:13-20: Argument `list[_IntLike]` is not assignable to parameter `reduction_ranges` with type `list[Integer]` in function `WelfordReduction.create` [bad-argument-type]
ERROR torch/_inductor/ir.py:2369:19-30: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:2418:16-27: Returned type `Sequence[Expr | int]` is not assignable to declared return type `Sequence[Expr]` [bad-return]
ERROR torch/_inductor/ir.py:2433:52-55: Argument `Sequence[Expr | int]` is not assignable to parameter `index` with type `Sequence[Expr]` in function `torch._inductor.dependencies.extract_free_symbols` [bad-argument-type]
ERROR torch/_inductor/ir.py:2418:16-27: Returned type `Sequence[_IntLike]` is not assignable to declared return type `Sequence[Expr]` [bad-return]
ERROR torch/_inductor/ir.py:2433:52-55: Argument `Sequence[_IntLike]` is not assignable to parameter `index` with type `Sequence[Expr]` in function `torch._inductor.dependencies.extract_free_symbols` [bad-argument-type]
ERROR torch/_inductor/ir.py:2438:17-29: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:2439:23-34: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:2520:29-36: Argument `(index: Sequence[Expr], scan_index: Sequence[Expr]) -> list[Expr]` is not assignable to parameter `reindex` with type `(Sequence[Expr | int], Sequence[Expr | int]) -> Sequence[Expr | int]` in function `Scan.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:2520:29-36: Argument `(index: Sequence[Expr], scan_index: Sequence[Expr]) -> list[Expr]` is not assignable to parameter `reindex` with type `(Sequence[Expr | int], Sequence[Expr | int]) -> Sequence[Expr | int]` in function `SplitScan.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:2520:29-36: Argument `(index: Sequence[Expr], scan_index: Sequence[Expr]) -> list[Expr]` is not assignable to parameter `reindex` with type `(Sequence[_IntLike], Sequence[_IntLike]) -> Sequence[_IntLike]` in function `Scan.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:2520:29-36: Argument `(index: Sequence[Expr], scan_index: Sequence[Expr]) -> list[Expr]` is not assignable to parameter `reindex` with type `(Sequence[_IntLike], Sequence[_IntLike]) -> Sequence[_IntLike]` in function `SplitScan.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:2537:17-29: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:2538:16-27: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:2577:19-30: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:2625:16-27: Returned type `Sequence[Expr | int]` is not assignable to declared return type `Sequence[Expr]` [bad-return]
ERROR torch/_inductor/ir.py:2625:16-27: Returned type `Sequence[_IntLike]` is not assignable to declared return type `Sequence[Expr]` [bad-return]
ERROR torch/_inductor/ir.py:2645:17-29: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:2646:23-34: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:2782:21-33: Argument `Sequence[Integer | int]` is not assignable to parameter `order` with type `Sequence[int]` in function `Buffer.freeze_layout_with_stride_order` [bad-argument-type]
@ -5833,10 +5855,10 @@ ERROR torch/_inductor/ir.py:2807:41-53: Argument `Sequence[Integer | int]` is no
ERROR torch/_inductor/ir.py:2860:24-35: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:2866:38-50: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:2916:42-54: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:2943:17-28: Cannot set item in `list[Expr | int]` [unsupported-operation]
ERROR torch/_inductor/ir.py:2943:17-28: Cannot set item in `list[_IntLike]` [unsupported-operation]
ERROR torch/_inductor/ir.py:2945:17-28: Argument `Expr | None` is not assignable to parameter `size` with type `Expr` in function `torch._inductor.sizevars.SizeVarAllocator.is_size_one_or_false` [bad-argument-type]
ERROR torch/_inductor/ir.py:2978:21-31: No matching overload found for function `list.__init__` called with arguments: (Sequence[Expr | int]) [no-matching-overload]
ERROR torch/_inductor/ir.py:2985:40-48: Argument `Sequence[Expr | int]` is not assignable to parameter `size` with type `Sequence[Expr]` in function `ExpandView.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:2978:21-31: No matching overload found for function `list.__init__` called with arguments: (Sequence[_IntLike]) [no-matching-overload]
ERROR torch/_inductor/ir.py:2985:40-48: Argument `Sequence[_IntLike]` is not assignable to parameter `size` with type `Sequence[Expr]` in function `ExpandView.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:3032:41-45: Argument `list[int]` is not assignable to parameter `dims` with type `list[Expr]` in function `PermuteView.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:3039:46-55: Argument `list[Expr]` is not assignable to parameter `dims` with type `Sequence[int]` in function `PermuteView._map_neg_dims` [bad-argument-type]
ERROR torch/_inductor/ir.py:3043:17-24: Cannot index into `Sequence[Expr]` [bad-index]
@ -5845,11 +5867,11 @@ ERROR torch/_inductor/ir.py:3055:21-29: Cannot index into `Sequence[Expr]` [bad-
ERROR torch/_inductor/ir.py:3123:16-33: Returned type `tuple[list[Expr], (index: Sequence[Expr]) -> tuple[Expr]]` is not assignable to declared return type `tuple[list[int], (Sequence[Expr]) -> tuple[Expr]]` [bad-return]
ERROR torch/_inductor/ir.py:3198:61-73: Argument `(index: Any) -> tuple[int, ...]` is not assignable to parameter `reindex` with type `(Sequence[Expr]) -> Sequence[Expr]` in function `View.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:3214:51-59: Argument `list[Expr]` is not assignable to parameter `sizes` with type `Sequence[int]` in function `FlexibleLayout.contiguous_strides` [bad-argument-type]
ERROR torch/_inductor/ir.py:3248:52-60: Argument `Sequence[Expr | int]` is not assignable to parameter `old_size` with type `Sequence[Expr]` in function `View._dynamic_reshape_indexer` [bad-argument-type]
ERROR torch/_inductor/ir.py:3248:62-70: Argument `Sequence[Expr | int]` is not assignable to parameter `new_size` with type `Sequence[Expr]` in function `View._dynamic_reshape_indexer` [bad-argument-type]
ERROR torch/_inductor/ir.py:3251:35-43: Argument `Sequence[Expr | int]` is not assignable to parameter `it` with type `Iterable[Expr]` in function `torch._inductor.utils.sympy_product` [bad-argument-type]
ERROR torch/_inductor/ir.py:3252:53-61: Argument `Sequence[Expr | int]` is not assignable to parameter `old_size` with type `Sequence[Expr]` in function `View._dynamic_reshape_indexer` [bad-argument-type]
ERROR torch/_inductor/ir.py:3253:59-67: Argument `Sequence[Expr | int]` is not assignable to parameter `new_size` with type `Sequence[Expr]` in function `View._dynamic_reshape_indexer` [bad-argument-type]
ERROR torch/_inductor/ir.py:3248:52-60: Argument `Sequence[_IntLike]` is not assignable to parameter `old_size` with type `Sequence[Expr]` in function `View._dynamic_reshape_indexer` [bad-argument-type]
ERROR torch/_inductor/ir.py:3248:62-70: Argument `Sequence[_IntLike]` is not assignable to parameter `new_size` with type `Sequence[Expr]` in function `View._dynamic_reshape_indexer` [bad-argument-type]
ERROR torch/_inductor/ir.py:3251:35-43: Argument `Sequence[_IntLike]` is not assignable to parameter `it` with type `Iterable[Expr]` in function `torch._inductor.utils.sympy_product` [bad-argument-type]
ERROR torch/_inductor/ir.py:3252:53-61: Argument `Sequence[_IntLike]` is not assignable to parameter `old_size` with type `Sequence[Expr]` in function `View._dynamic_reshape_indexer` [bad-argument-type]
ERROR torch/_inductor/ir.py:3253:59-67: Argument `Sequence[_IntLike]` is not assignable to parameter `new_size` with type `Sequence[Expr]` in function `View._dynamic_reshape_indexer` [bad-argument-type]
ERROR torch/_inductor/ir.py:3255:16-23: Returned type `(Sequence[Expr]) -> Sequence[Expr]` is not assignable to declared return type `(Sequence[_T]) -> Sequence[_V]` [bad-return]
ERROR torch/_inductor/ir.py:3322:53-54: Argument `Literal[1]` is not assignable to parameter `right` with type `Expr` in function `torch._inductor.sizevars.SizeVarAllocator.check_equals` [bad-argument-type]
ERROR torch/_inductor/ir.py:3327:53-54: Argument `Literal[1]` is not assignable to parameter `right` with type `Expr` in function `torch._inductor.sizevars.SizeVarAllocator.check_equals` [bad-argument-type]
@ -5903,8 +5925,8 @@ ERROR torch/_inductor/ir.py:4029:31-54: No attribute `contiguous_format` in modu
ERROR torch/_inductor/ir.py:4083:42-51: Argument `Sequence[Expr]` is not assignable to parameter `sizes` with type `Sequence[int]` in function `FlexibleLayout.stride_ordered` [bad-argument-type]
ERROR torch/_inductor/ir.py:4085:44-54: Argument `Sequence[Expr]` is not assignable to parameter `in_strides` with type `Sequence[int]` in function `Layout._pad_strides` [bad-argument-type]
ERROR torch/_inductor/ir.py:4091:13-23: Argument `Sequence[Expr] | Sequence[int]` is not assignable to parameter `stride` with type `Sequence[Expr] | None` in function `Layout.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:4101:44-54: Argument `Sequence[Expr | int]` is not assignable to parameter `in_strides` with type `Sequence[int]` in function `Layout._pad_strides` [bad-argument-type]
ERROR torch/_inductor/ir.py:4107:13-23: Argument `Sequence[Expr | int] | Sequence[int]` is not assignable to parameter `stride` with type `Sequence[Expr] | None` in function `Layout.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:4101:44-54: Argument `Sequence[_IntLike]` is not assignable to parameter `in_strides` with type `Sequence[int]` in function `Layout._pad_strides` [bad-argument-type]
ERROR torch/_inductor/ir.py:4107:13-23: Argument `Sequence[_IntLike] | Sequence[int]` is not assignable to parameter `stride` with type `Sequence[Expr] | None` in function `Layout.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:4113:37-72: `list[Expr]` is not assignable to `Sequence[int]` [bad-assignment]
ERROR torch/_inductor/ir.py:4113:55-64: Argument `Sequence[Expr]` is not assignable to parameter `sizes` with type `Sequence[int]` in function `FlexibleLayout.fill_ordered` [bad-argument-type]
ERROR torch/_inductor/ir.py:4120:13-23: Argument `Sequence[int]` is not assignable to parameter `stride` with type `Sequence[Expr] | None` in function `Layout.__init__` [bad-argument-type]
@ -5926,8 +5948,8 @@ ERROR torch/_inductor/ir.py:4444:9-38: Class member `Buffer.freeze_layout_with_s
ERROR torch/_inductor/ir.py:4448:9-41: Class member `Buffer.freeze_layout_with_exact_strides` overrides parent class `IRNode` in an inconsistent manner [bad-override]
ERROR torch/_inductor/ir.py:4539:31-43: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:4551:42-54: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:4637:17-38: Argument `Sequence[Expr | int]` is not assignable to parameter `size` with type `Sequence[Expr]` in function `Layout.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:4775:57-64: Argument `Sequence[Expr | int] | Sequence[Expr]` is not assignable to parameter `vars` with type `Sequence[Symbol]` in function `torch._inductor.sizevars.SizeVarAllocator.stride_hints` [bad-argument-type]
ERROR torch/_inductor/ir.py:4637:17-38: Argument `Sequence[_IntLike]` is not assignable to parameter `size` with type `Sequence[Expr]` in function `Layout.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:4775:57-64: Argument `Sequence[_IntLike] | Sequence[Expr]` is not assignable to parameter `vars` with type `Sequence[Symbol]` in function `torch._inductor.sizevars.SizeVarAllocator.stride_hints` [bad-argument-type]
ERROR torch/_inductor/ir.py:4928:22-38: `Sequence[Symbol] | Sequence[int]` is not assignable to variable `x_vars` with type `Sequence[Symbol]` [bad-assignment]
ERROR torch/_inductor/ir.py:4928:31-37: Argument `Sequence[Symbol]` is not assignable to parameter with type `Sequence[int]` [bad-argument-type]
ERROR torch/_inductor/ir.py:4934:70-78: Argument `list[int]` is not assignable to parameter `sizes` with type `Sequence[Expr]` in function `torch._inductor.codegen.common.index_prevent_reordering` [bad-argument-type]
@ -5966,12 +5988,12 @@ ERROR torch/_inductor/ir.py:6097:17-73: Argument `tuple[Expr | int, ...]` is not
ERROR torch/_inductor/ir.py:6110:53-63: Argument `Sequence[Expr]` is not assignable to parameter `vars` with type `Sequence[Symbol]` in function `torch._inductor.sizevars.SizeVarAllocator.offset_var` [bad-argument-type]
ERROR torch/_inductor/ir.py:6139:47-48: Argument `(Boolean & IRNode) | (Expr & IRNode) | (IRNode & int)` is not assignable to parameter `expr` with type `Expr` in function `ShapeAsConstantBuffer.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:6145:21-33: No attribute `tensor` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:6233:39-52: Argument `Sequence[Expr | int] | None` is not assignable to parameter `exact_strides` with type `Sequence[Integer | int] | None` in function `as_storage_and_layout` [bad-argument-type]
ERROR torch/_inductor/ir.py:6246:56-69: Argument `Sequence[Expr | int]` is not assignable to parameter `strides` with type `Sequence[SymInt | int]` in function `try_match_insignificant_strides` [bad-argument-type]
ERROR torch/_inductor/ir.py:6233:39-52: Argument `Sequence[_IntLike] | None` is not assignable to parameter `exact_strides` with type `Sequence[Integer | int] | None` in function `as_storage_and_layout` [bad-argument-type]
ERROR torch/_inductor/ir.py:6246:56-69: Argument `Sequence[_IntLike]` is not assignable to parameter `strides` with type `Sequence[SymInt | int]` in function `try_match_insignificant_strides` [bad-argument-type]
ERROR torch/_inductor/ir.py:6320:21-45: Module `torch._inductor.lowering` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/ir.py:6332:27-40: Argument `Sequence[Expr | int] | None` is not assignable to parameter `exact_strides` with type `Sequence[Integer | int] | None` in function `as_storage_and_layout` [bad-argument-type]
ERROR torch/_inductor/ir.py:6332:27-40: Argument `Sequence[_IntLike] | None` is not assignable to parameter `exact_strides` with type `Sequence[Integer | int] | None` in function `as_storage_and_layout` [bad-argument-type]
ERROR torch/_inductor/ir.py:6338:17-41: Module `torch._inductor.lowering` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/_inductor/ir.py:6340:55-68: Argument `Sequence[Expr | int]` is not assignable to parameter `strides` with type `Sequence[SymInt | int]` in function `try_match_insignificant_strides` [bad-argument-type]
ERROR torch/_inductor/ir.py:6340:55-68: Argument `Sequence[_IntLike]` is not assignable to parameter `strides` with type `Sequence[SymInt | int]` in function `try_match_insignificant_strides` [bad-argument-type]
ERROR torch/_inductor/ir.py:6381:54-66: Argument `Sequence[Expr]` is not assignable to parameter `sizes` with type `Sequence[int]` in function `FlexibleLayout.contiguous_strides` [bad-argument-type]
ERROR torch/_inductor/ir.py:6389:50-62: Argument `Sequence[Expr]` is not assignable to parameter `sizes` with type `Sequence[int]` in function `FlexibleLayout.contiguous_strides` [bad-argument-type]
ERROR torch/_inductor/ir.py:6614:49-60: Argument `dict[Symbol, @_]` is not assignable to parameter `replacements` with type `dict[Expr, Any]` in function `torch._inductor.utils.sympy_subs` [bad-argument-type]
@ -5986,7 +6008,7 @@ ERROR torch/_inductor/ir.py:6928:28-40: Object of class `Expr` has no attribute
ERROR torch/_inductor/ir.py:6958:9-55: Could not find import of `triton.runtime.autotuner` [missing-import]
ERROR torch/_inductor/ir.py:7158:38-50: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:7431:40-52: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:7465:17-23: Argument `Sequence[Expr | int] | None` is not assignable to parameter `stride` with type `Sequence[Expr] | None` in function `Layout.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:7465:17-23: Argument `Sequence[_IntLike] | None` is not assignable to parameter `stride` with type `Sequence[Expr] | None` in function `Layout.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:7507:50-62: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:7560:50-62: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:7599:37-49: No attribute `device` in module `torch` [missing-attribute]
@ -6017,7 +6039,8 @@ ERROR torch/_inductor/ir.py:8287:38-50: No attribute `device` in module `torch`
ERROR torch/_inductor/ir.py:8346:38-50: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:8419:42-54: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:8464:24-35: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:8724:32-51: Argument `Sequence[Expr | int]` is not assignable to parameter `stride` with type `Sequence[Expr] | None` in function `Layout.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:8670:9-17: `operands` cannot be annotated with `list[IRNode]`, it is already defined with type `tuple[IRNode, ...]` [redefinition]
ERROR torch/_inductor/ir.py:8724:32-51: Argument `Sequence[_IntLike]` is not assignable to parameter `stride` with type `Sequence[Expr] | None` in function `Layout.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:8858:26-86: Argument `list[Expr | int]` is not assignable to parameter `size` with type `Sequence[Expr]` in function `Layout.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:8859:28-8861:22: Argument `list[Expr | int]` is not assignable to parameter `stride` with type `Sequence[Expr] | None` in function `Layout.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:8902:29-37: Argument `Expr` is not assignable to parameter `object` with type `ShapeAsConstantBuffer` in function `list.append` [bad-argument-type]
@ -6026,7 +6049,7 @@ ERROR torch/_inductor/ir.py:9112:51-54: Argument `Expr | int` is not assignable
ERROR torch/_inductor/ir.py:9112:56-59: Argument `Expr | int` is not assignable to parameter `right` with type `Expr` in function `torch._inductor.sizevars.SizeVarAllocator.check_equals` [bad-argument-type]
ERROR torch/_inductor/ir.py:9165:30-83: Argument `list[Expr | int]` is not assignable to parameter `size` with type `Sequence[Expr]` in function `Layout.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:9166:32-87: Argument `list[Expr | int]` is not assignable to parameter `stride` with type `Sequence[Expr] | None` in function `Layout.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:9189:36-55: Argument `Sequence[Expr | int]` is not assignable to parameter `stride` with type `Sequence[Expr] | None` in function `Layout.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:9189:36-55: Argument `Sequence[_IntLike]` is not assignable to parameter `stride` with type `Sequence[Expr] | None` in function `Layout.__init__` [bad-argument-type]
ERROR torch/_inductor/ir.py:9280:36-54: No attribute `ScriptObject` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:9288:52-70: No attribute `ScriptObject` in module `torch` [missing-attribute]
ERROR torch/_inductor/ir.py:9291:31-49: No attribute `ScriptObject` in module `torch` [missing-attribute]
@ -6034,7 +6057,7 @@ ERROR torch/_inductor/ir.py:9292:35-53: No attribute `ScriptObject` in module `t
ERROR torch/_inductor/ir.py:9318:13-25: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/jagged_lowerings.py:52:13-25: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_inductor/jagged_lowerings.py:53:12-23: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_inductor/jagged_lowerings.py:60:24-65:14: Argument `tuple[str, Expr, Unknown, Expr | int]` is not assignable to parameter `boundaries` with type `tuple[str, Expr, Expr, Expr]` in function `torch._inductor.ops_handler.OpsHandler.bucketize` [bad-argument-type]
ERROR torch/_inductor/jagged_lowerings.py:60:24-65:14: Argument `tuple[str, Expr, Unknown, _IntLike]` is not assignable to parameter `boundaries` with type `tuple[str, Expr, Expr, Expr]` in function `torch._inductor.ops_handler.OpsHandler.bucketize` [bad-argument-type]
ERROR torch/_inductor/jagged_lowerings.py:97:20-31: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_inductor/jagged_lowerings.py:101:9-23: Argument `int | Unknown` is not assignable to parameter `size` with type `Expr` in function `torch._inductor.ops_handler.OpsHandler.indirect_indexing` [bad-argument-type]
ERROR torch/_inductor/jagged_lowerings.py:106:42-53: Argument `Expr | int` is not assignable to parameter `size` with type `Expr` in function `torch._inductor.ops_handler.OpsHandler.indirect_indexing` [bad-argument-type]
@ -6266,6 +6289,7 @@ ERROR torch/_inductor/lowering.py:1755:43-54: No attribute `uint8` in module `to
ERROR torch/_inductor/lowering.py:2098:8-15: `<` is not supported between `Basic` and `Literal[0]` [unsupported-operation]
ERROR torch/_inductor/lowering.py:2099:9-29: `+=` is not supported between `Basic` and `int` [unsupported-operation]
ERROR torch/_inductor/lowering.py:2100:12-36: `<=` is not supported between `Literal[0]` and `Basic` [unsupported-operation]
ERROR torch/_inductor/lowering.py:2100:12-36: `<` is not supported between `Basic` and `int` [unsupported-operation]
ERROR torch/_inductor/lowering.py:2155:19-39: No attribute `float8_e8m0fnu` in module `torch` [missing-attribute]
ERROR torch/_inductor/lowering.py:2288:32-43: No attribute `int64` in module `torch` [missing-attribute]
ERROR torch/_inductor/lowering.py:2307:57-68: No attribute `int32` in module `torch` [missing-attribute]
@ -6286,8 +6310,8 @@ ERROR torch/_inductor/lowering.py:2486:28-31: Argument `int` is not assignable t
ERROR torch/_inductor/lowering.py:2486:33-44: No attribute `int64` in module `torch` [missing-attribute]
ERROR torch/_inductor/lowering.py:2487:28-32: Argument `int` is not assignable to parameter `expr` with type `Expr` in function `torch._inductor.ops_handler.OpsHandler.index_expr` [bad-argument-type]
ERROR torch/_inductor/lowering.py:2487:34-45: No attribute `int64` in module `torch` [missing-attribute]
ERROR torch/_inductor/lowering.py:2506:12-2511:6: Returned type `tuple[str, Expr, int | Unknown, Expr | int]` is not assignable to declared return type `tuple[str, Expr, Expr, Expr]` [bad-return]
ERROR torch/_inductor/lowering.py:2515:12-46: Returned type `tuple[str, Expr | int]` is not assignable to declared return type `tuple[str, Expr]` [bad-return]
ERROR torch/_inductor/lowering.py:2506:12-2511:6: Returned type `tuple[str, Expr, int | Unknown, _IntLike]` is not assignable to declared return type `tuple[str, Expr, Expr, Expr]` [bad-return]
ERROR torch/_inductor/lowering.py:2515:12-46: Returned type `tuple[str, _IntLike]` is not assignable to declared return type `tuple[str, Expr]` [bad-return]
ERROR torch/_inductor/lowering.py:2551:19-30: No attribute `int32` in module `torch` [missing-attribute]
ERROR torch/_inductor/lowering.py:2551:49-60: No attribute `int64` in module `torch` [missing-attribute]
ERROR torch/_inductor/lowering.py:2644:19-30: No attribute `int32` in module `torch` [missing-attribute]
@ -6725,8 +6749,9 @@ ERROR torch/_inductor/runtime/triton_compat.py:35:9-55: Could not find import of
ERROR torch/_inductor/runtime/triton_compat.py:50:9-52: Could not find import of `triton.language.extra` [missing-import]
ERROR torch/_inductor/runtime/triton_compat.py:66:9-51: Could not find import of `triton.language.standard` [missing-import]
ERROR torch/_inductor/runtime/triton_compat.py:86:9-33: Could not find import of `triton` [missing-import]
ERROR torch/_inductor/scheduler.py:132:35-64: Argument `Sequence[Expr | int]` is not assignable to parameter `it` with type `Iterable[Expr]` in function `torch._inductor.utils.sympy_product` [bad-argument-type]
ERROR torch/_inductor/scheduler.py:136:35-74: Argument `Sequence[Expr | int]` is not assignable to parameter `it` with type `Iterable[Expr]` in function `torch._inductor.utils.sympy_product` [bad-argument-type]
ERROR torch/_inductor/runtime/triton_compat.py:93:9-95:10: Could not find import of `triton.compiler.compiler` [missing-import]
ERROR torch/_inductor/scheduler.py:132:35-64: Argument `Sequence[_IntLike]` is not assignable to parameter `it` with type `Iterable[Expr]` in function `torch._inductor.utils.sympy_product` [bad-argument-type]
ERROR torch/_inductor/scheduler.py:136:35-74: Argument `Sequence[_IntLike]` is not assignable to parameter `it` with type `Iterable[Expr]` in function `torch._inductor.utils.sympy_product` [bad-argument-type]
ERROR torch/_inductor/scheduler.py:147:25-31: Argument `Unknown | None` is not assignable to parameter `left` with type `Expr | int` in function `torch._inductor.sizevars.SizeVarAllocator.statically_known_equals` [bad-argument-type]
ERROR torch/_inductor/scheduler.py:151:20-36: Returned type `tuple[Unknown, Unknown | None]` is not assignable to declared return type `tuple[Expr, Expr]` [bad-return]
ERROR torch/_inductor/scheduler.py:462:38-50: No attribute `device` in module `torch` [missing-attribute]
@ -6949,6 +6974,8 @@ ERROR torch/_inductor/tiling_utils.py:206:41-50: Argument `dict[Symbol, int]` is
ERROR torch/_inductor/tiling_utils.py:211:23-24: Cannot set item in `dict[Symbol, int]` [unsupported-operation]
ERROR torch/_inductor/tiling_utils.py:214:35-44: Argument `dict[Symbol, int]` is not assignable to parameter `replacements` with type `dict[Expr, Any]` in function `torch._inductor.utils.sympy_subs` [bad-argument-type]
ERROR torch/_inductor/tiling_utils.py:216:19-20: Cannot set item in `dict[Symbol, int]` [unsupported-operation]
ERROR torch/_inductor/tiling_utils.py:259:16-262:10: Returned type `tuple[tuple[Unknown, tuple[Unknown, ...]], tuple[Unknown, tuple[Unknown, ...]]]` is not assignable to declared return type `tuple[tuple[list[Symbol], list[Expr]], tuple[list[Symbol], list[Expr]]] | None` [bad-return]
ERROR torch/_inductor/tiling_utils.py:284:16-287:10: Returned type `tuple[tuple[Unknown, tuple[Unknown, ...]], tuple[Unknown, tuple[Unknown, ...]]]` is not assignable to declared return type `tuple[tuple[list[Symbol], list[Expr]], tuple[list[Symbol], list[Expr]]] | None` [bad-return]
ERROR torch/_inductor/tiling_utils.py:300:44-60: `tuple[Expr, ...]` is not assignable to attribute `pointwise_numel` with type `Expr` [bad-assignment]
ERROR torch/_inductor/tiling_utils.py:301:38-54: `tuple[Expr, ...]` is not assignable to attribute `red_numel` with type `Expr` [bad-assignment]
ERROR torch/_inductor/tiling_utils.py:310:34-59: Module `torch._inductor.scheduler` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
@ -7146,6 +7173,7 @@ ERROR torch/_jit_internal.py:1335:9-37: No attribute `_jit_set_emit_hooks` in mo
ERROR torch/_jit_internal.py:1341:22-50: No attribute `_jit_get_emit_hooks` in module `torch._C` [missing-attribute]
ERROR torch/_jit_internal.py:1342:9-37: No attribute `_jit_set_emit_hooks` in module `torch._C` [missing-attribute]
ERROR torch/_jit_internal.py:1345:9-37: No attribute `_jit_set_emit_hooks` in module `torch._C` [missing-attribute]
ERROR torch/_lazy/closure.py:66:40-68:14: `Thread` is not assignable to attribute `_closure_event_loop` with type `None` [bad-assignment]
ERROR torch/_lazy/extract_compiled_graph.py:106:28-40: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_lazy/extract_compiled_graph.py:107:20-32: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_lazy/extract_compiled_graph.py:112:29-41: No attribute `device` in module `torch` [missing-attribute]
@ -7223,6 +7251,7 @@ ERROR torch/_library/fake_impl.py:224:5-42: Module `torch.fx.experimental.symbol
ERROR torch/_library/fake_profile.py:27:12-23: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_library/fake_profile.py:28:13-25: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_library/fake_profile.py:29:13-25: No attribute `layout` in module `torch` [missing-attribute]
ERROR torch/_library/fake_profile.py:61:13-63:58: `Literal[1] | SymInt` is not assignable to `int` (caused by inconsistent types when breaking cycles) [bad-assignment]
ERROR torch/_library/fake_profile.py:65:20-39: No attribute `empty_strided` in module `torch` [missing-attribute]
ERROR torch/_library/fake_profile.py:277:20-32: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_library/infer_schema.py:9:19-25: Could not import `device` from `torch` [missing-module-attribute]
@ -10316,6 +10345,7 @@ ERROR torch/_prims/rng_prims.py:323:20-36: Method `__call__` inherited from clas
ERROR torch/_prims_common/__init__.py:48:30-40: No attribute `Size` in module `torch` [missing-attribute]
ERROR torch/_prims_common/__init__.py:68:40-52: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_prims_common/__init__.py:73:5-17: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/_prims_common/__init__.py:275:5-291:29: `SymInt | int` is not assignable to `int` (caused by inconsistent types when breaking cycles) [bad-assignment]
ERROR torch/_prims_common/__init__.py:380:5-28: No attribute `contiguous_format` in module `torch` [missing-attribute]
ERROR torch/_prims_common/__init__.py:381:5-26: No attribute `preserve_format` in module `torch` [missing-attribute]
ERROR torch/_prims_common/__init__.py:382:5-24: No attribute `channels_last` in module `torch` [missing-attribute]
@ -10985,14 +11015,14 @@ ERROR torch/_refs/linalg/__init__.py:165:30-39: No attribute `sum` in module `to
ERROR torch/_refs/linalg/__init__.py:179:17-26: No attribute `abs` in module `torch` [missing-attribute]
ERROR torch/_refs/linalg/__init__.py:189:17-26: No attribute `abs` in module `torch` [missing-attribute]
ERROR torch/_refs/linalg/__init__.py:214:21-32: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_refs/linalg/__init__.py:228:19-25: Index 1 out of range for tuple with 1 elements [bad-index]
ERROR torch/_refs/linalg/__init__.py:230:79-85: Index 1 out of range for tuple with 1 elements [bad-index]
ERROR torch/_refs/linalg/__init__.py:252:51-57: Index 1 out of range for tuple with 1 elements [bad-index]
ERROR torch/_refs/linalg/__init__.py:228:23-24: Index 1 out of range for tuple with 1 elements [bad-index]
ERROR torch/_refs/linalg/__init__.py:230:83-84: Index 1 out of range for tuple with 1 elements [bad-index]
ERROR torch/_refs/linalg/__init__.py:252:55-56: Index 1 out of range for tuple with 1 elements [bad-index]
ERROR torch/_refs/linalg/__init__.py:253:22-31: No attribute `sum` in module `torch` [missing-attribute]
ERROR torch/_refs/linalg/__init__.py:256:42-57: No attribute `unsqueeze` in module `torch` [missing-attribute]
ERROR torch/_refs/linalg/__init__.py:270:27-37: No attribute `amax` in module `torch` [missing-attribute]
ERROR torch/_refs/linalg/__init__.py:270:56-66: No attribute `amin` in module `torch` [missing-attribute]
ERROR torch/_refs/linalg/__init__.py:276:51-57: Index 1 out of range for tuple with 1 elements [bad-index]
ERROR torch/_refs/linalg/__init__.py:276:55-56: Index 1 out of range for tuple with 1 elements [bad-index]
ERROR torch/_refs/linalg/__init__.py:280:42-57: No attribute `unsqueeze` in module `torch` [missing-attribute]
ERROR torch/_refs/linalg/__init__.py:302:21-32: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/_refs/nn/functional/__init__.py:94:50-63: No attribute `float32` in module `torch` [missing-attribute]
@ -12502,6 +12532,7 @@ ERROR torch/ao/nn/qat/modules/embedding_ops.py:57:44-82: No attribute `per_chann
ERROR torch/ao/nn/qat/modules/embedding_ops.py:91:34-72: No attribute `per_channel_affine_float_qparams` in module `torch` [missing-attribute]
ERROR torch/ao/nn/qat/modules/embedding_ops.py:176:44-82: No attribute `per_channel_affine_float_qparams` in module `torch` [missing-attribute]
ERROR torch/ao/nn/qat/modules/embedding_ops.py:214:34-72: No attribute `per_channel_affine_float_qparams` in module `torch` [missing-attribute]
ERROR torch/ao/nn/quantizable/modules/activation.py:98:25-100:10: `Linear` is not assignable to attribute `out_proj` with type `NonDynamicallyQuantizableLinear` [bad-assignment]
WARN torch/ao/nn/quantizable/modules/activation.py:190:20-49: `torch.ao.quantization.quantize.prepare` is deprecated [deprecated]
ERROR torch/ao/nn/quantizable/modules/activation.py:400:35-46: No attribute `uint8` in module `torch` [missing-attribute]
ERROR torch/ao/nn/quantizable/modules/activation.py:406:42-52: No attribute `bool` in module `torch` [missing-attribute]
@ -12655,6 +12686,7 @@ ERROR torch/ao/nn/quantized/modules/conv.py:435:9-24: Class member `Conv1d.set_w
ERROR torch/ao/nn/quantized/modules/conv.py:567:9-24: Class member `Conv2d.set_weight_bias` overrides parent class `_ConvNd` in an inconsistent manner [bad-param-name-override]
ERROR torch/ao/nn/quantized/modules/conv.py:698:9-24: Class member `Conv3d.set_weight_bias` overrides parent class `_ConvNd` in an inconsistent manner [bad-param-name-override]
ERROR torch/ao/nn/quantized/modules/conv.py:815:45-56: No attribute `qint8` in module `torch` [missing-attribute]
ERROR torch/ao/nn/quantized/modules/conv.py:820:20-831:10: Missing argument `padding_mode` in function `_ConvTransposeNd.__init__` [missing-argument]
ERROR torch/ao/nn/quantized/modules/conv.py:835:53-64: No attribute `float` in module `torch` [missing-attribute]
ERROR torch/ao/nn/quantized/modules/conv.py:960:9-24: Class member `ConvTranspose1d.set_weight_bias` overrides parent class `_ConvTransposeNd` in an inconsistent manner [bad-param-name-override]
ERROR torch/ao/nn/quantized/modules/conv.py:1083:9-24: Class member `ConvTranspose2d.set_weight_bias` overrides parent class `_ConvTransposeNd` in an inconsistent manner [bad-param-name-override]
@ -13115,12 +13147,6 @@ ERROR torch/ao/pruning/sparsifier/weight_norm_sparsifier.py:197:25-35: No attrib
ERROR torch/ao/pruning/sparsifier/weight_norm_sparsifier.py:231:25-40: No attribute `ones_like` in module `torch` [missing-attribute]
ERROR torch/ao/pruning/sparsifier/weight_norm_sparsifier.py:233:25-41: No attribute `zeros_like` in module `torch` [missing-attribute]
ERROR torch/ao/pruning/sparsifier/weight_norm_sparsifier.py:249:31-47: No attribute `logical_or` in module `torch` [missing-attribute]
WARN torch/ao/quantization/__init__.py:33:23-24: `prepare` is deprecated [deprecated]
WARN torch/ao/quantization/__init__.py:33:23-24: `quantize` is deprecated [deprecated]
WARN torch/ao/quantization/__init__.py:33:23-24: `quantize_dynamic` is deprecated [deprecated]
WARN torch/ao/quantization/__init__.py:33:23-24: `prepare_qat` is deprecated [deprecated]
WARN torch/ao/quantization/__init__.py:33:23-24: `quantize_qat` is deprecated [deprecated]
WARN torch/ao/quantization/__init__.py:33:23-24: `convert` is deprecated [deprecated]
ERROR torch/ao/quantization/__init__.py:217:16-27: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/ao/quantization/__init__.py:224:18-31: No attribute `qscheme` in module `torch` [missing-attribute]
ERROR torch/ao/quantization/_correct_bias.py:147:30-40: No attribute `mean` in module `torch` [missing-attribute]
@ -13810,6 +13836,7 @@ ERROR torch/ao/quantization/fx/convert.py:448:27-52: No attribute `quantize_per_
ERROR torch/ao/quantization/fx/convert.py:482:23-56: No attribute `quantize_per_tensor_dynamic` in module `torch` [missing-attribute]
ERROR torch/ao/quantization/fx/convert.py:500:19-32: No attribute `float16` in module `torch` [missing-attribute]
ERROR torch/ao/quantization/fx/convert.py:513:28-39: Argument `((...) -> Unknown) | None` is not assignable to parameter `target` with type `((...) -> Any) | str` in function `torch.fx.graph.Graph.create_node` [bad-argument-type]
ERROR torch/ao/quantization/fx/convert.py:549:9-551:34: Returned type `Module | Tensor | bool` is not assignable to declared return type `bool` [bad-return]
ERROR torch/ao/quantization/fx/convert.py:551:21-34: No attribute `float16` in module `torch` [missing-attribute]
ERROR torch/ao/quantization/fx/convert.py:716:22-55: Module `torch.ao.quantization.quantize_fx` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
WARN torch/ao/quantization/fx/convert.py:751:35-45: `torch.ao.quantization.quantize_fx.convert_fx` is deprecated [deprecated]
@ -14016,6 +14043,7 @@ ERROR torch/ao/quantization/observer.py:1119:47-59: No attribute `tensor` in mod
ERROR torch/ao/quantization/observer.py:1126:32-44: No attribute `tensor` in module `torch` [missing-attribute]
ERROR torch/ao/quantization/observer.py:1143:17-26: No attribute `sum` in module `torch` [missing-attribute]
ERROR torch/ao/quantization/observer.py:1144:16-28: No attribute `cumsum` in module `torch` [missing-attribute]
ERROR torch/ao/quantization/observer.py:1161:13-1162:26: `int` is not assignable to `int` (caused by inconsistent types when breaking cycles) [bad-assignment]
ERROR torch/ao/quantization/observer.py:1207:13-27: No attribute `linspace` in module `torch` [missing-attribute]
ERROR torch/ao/quantization/observer.py:1215:36-50: No attribute `linspace` in module `torch` [missing-attribute]
ERROR torch/ao/quantization/observer.py:1220:13-28: No attribute `bucketize` in module `torch` [missing-attribute]
@ -15318,6 +15346,11 @@ ERROR torch/distributed/_local_tensor/_c10d.py:275:14-31: No attribute `bitwise_
ERROR torch/distributed/_local_tensor/_c10d.py:277:14-30: No attribute `bitwise_or` in module `torch` [missing-attribute]
ERROR torch/distributed/_local_tensor/_c10d.py:279:14-31: No attribute `bitwise_xor` in module `torch` [missing-attribute]
ERROR torch/distributed/_local_tensor/_c10d.py:513:32-41: No attribute `cat` in module `torch` [missing-attribute]
ERROR torch/distributed/_pycute/layout.py:164:13-167:14: Argument `chain[Layout]` is not assignable to parameter `*layouts` with type `Layout | tuple[Layout, ...]` in function `make_layout` [bad-argument-type]
ERROR torch/distributed/_pycute/layout.py:205:13-208:14: Argument `chain[Layout | filter[CoordinateType]]` is not assignable to parameter `*layouts` with type `Layout | tuple[Layout, ...]` in function `make_layout` [bad-argument-type]
ERROR torch/distributed/_pycute/layout.py:235:13-238:14: Argument `chain[Layout]` is not assignable to parameter `*layouts` with type `Layout | tuple[Layout, ...]` in function `make_layout` [bad-argument-type]
ERROR torch/distributed/_pycute/layout.py:371:13-377:14: Argument `chain[Layout]` is not assignable to parameter `*layouts` with type `Layout | tuple[Layout, ...]` in function `make_layout` [bad-argument-type]
ERROR torch/distributed/_pycute/layout.py:396:13-402:14: Argument `chain[Layout]` is not assignable to parameter `*layouts` with type `Layout | tuple[Layout, ...]` in function `make_layout` [bad-argument-type]
ERROR torch/distributed/_serialization.py:63:31-47: No attribute `frombuffer` in module `torch` [missing-attribute]
ERROR torch/distributed/_serialization.py:65:31-42: No attribute `uint8` in module `torch` [missing-attribute]
ERROR torch/distributed/_serialization.py:84:16-28: No attribute `tensor` in module `torch` [missing-attribute]
@ -15337,8 +15370,8 @@ ERROR torch/distributed/_shard/sharded_tensor/__init__.py:249:12-25: No attribut
ERROR torch/distributed/_shard/sharded_tensor/__init__.py:252:19-42: No attribute `contiguous_format` in module `torch` [missing-attribute]
ERROR torch/distributed/_shard/sharded_tensor/__init__.py:305:12-25: No attribute `strided` in module `torch` [missing-attribute]
ERROR torch/distributed/_shard/sharded_tensor/__init__.py:308:19-42: No attribute `contiguous_format` in module `torch` [missing-attribute]
ERROR torch/distributed/_shard/sharded_tensor/_ops/_common.py:47:18-25: Index 0 out of range for tuple with 0 elements [bad-index]
ERROR torch/distributed/_shard/sharded_tensor/_ops/_common.py:97:14-21: Index 0 out of range for tuple with 0 elements [bad-index]
ERROR torch/distributed/_shard/sharded_tensor/_ops/_common.py:47:23-24: Index 0 out of range for tuple with 0 elements [bad-index]
ERROR torch/distributed/_shard/sharded_tensor/_ops/_common.py:97:19-20: Index 0 out of range for tuple with 0 elements [bad-index]
ERROR torch/distributed/_shard/sharded_tensor/_ops/binary_cmp.py:11:25-35: No attribute `ones` in module `torch` [missing-attribute]
ERROR torch/distributed/_shard/sharded_tensor/_ops/binary_cmp.py:11:46-58: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/distributed/_shard/sharded_tensor/_ops/binary_cmp.py:13:25-36: No attribute `zeros` in module `torch` [missing-attribute]
@ -15356,7 +15389,7 @@ ERROR torch/distributed/_shard/sharded_tensor/_ops/init.py:130:5-21: No attribut
ERROR torch/distributed/_shard/sharded_tensor/_ops/init.py:131:5-20: No attribute `ones_like` in module `torch` [missing-attribute]
ERROR torch/distributed/_shard/sharded_tensor/_ops/init.py:132:5-20: No attribute `rand_like` in module `torch` [missing-attribute]
ERROR torch/distributed/_shard/sharded_tensor/_ops/init.py:133:5-21: No attribute `randn_like` in module `torch` [missing-attribute]
ERROR torch/distributed/_shard/sharded_tensor/_ops/init.py:153:14-21: Index 0 out of range for tuple with 0 elements [bad-index]
ERROR torch/distributed/_shard/sharded_tensor/_ops/init.py:153:19-20: Index 0 out of range for tuple with 0 elements [bad-index]
ERROR torch/distributed/_shard/sharded_tensor/_ops/init.py:159:29-44: No attribute `full_like` in module `torch` [missing-attribute]
ERROR torch/distributed/_shard/sharded_tensor/_ops/init.py:160:29-45: No attribute `empty_like` in module `torch` [missing-attribute]
ERROR torch/distributed/_shard/sharded_tensor/_ops/init.py:161:29-45: No attribute `zeros_like` in module `torch` [missing-attribute]
@ -15364,13 +15397,13 @@ ERROR torch/distributed/_shard/sharded_tensor/_ops/init.py:162:29-44: No attribu
ERROR torch/distributed/_shard/sharded_tensor/_ops/init.py:163:29-44: No attribute `rand_like` in module `torch` [missing-attribute]
ERROR torch/distributed/_shard/sharded_tensor/_ops/init.py:164:29-45: No attribute `randn_like` in module `torch` [missing-attribute]
ERROR torch/distributed/_shard/sharded_tensor/_ops/misc_ops.py:10:19-58: No attribute `_has_compatible_shallow_copy_type` in module `torch` [missing-attribute]
ERROR torch/distributed/_shard/sharded_tensor/_ops/tensor_ops.py:44:15-22: Index 0 out of range for tuple with 0 elements [bad-index]
ERROR torch/distributed/_shard/sharded_tensor/_ops/tensor_ops.py:44:20-21: Index 0 out of range for tuple with 0 elements [bad-index]
ERROR torch/distributed/_shard/sharded_tensor/_ops/tensor_ops.py:48:10-22: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/distributed/_shard/sharded_tensor/_ops/tensor_ops.py:52:15-27: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/distributed/_shard/sharded_tensor/_ops/tensor_ops.py:54:15-27: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/distributed/_shard/sharded_tensor/_ops/tensor_ops.py:61:12-19: Index 0 out of range for tuple with 0 elements [bad-index]
ERROR torch/distributed/_shard/sharded_tensor/_ops/tensor_ops.py:61:17-18: Index 0 out of range for tuple with 0 elements [bad-index]
ERROR torch/distributed/_shard/sharded_tensor/_ops/tensor_ops.py:160:57-78: No attribute `preserve_format` in module `torch` [missing-attribute]
ERROR torch/distributed/_shard/sharded_tensor/_ops/tensor_ops.py:202:15-22: Index 0 out of range for tuple with 0 elements [bad-index]
ERROR torch/distributed/_shard/sharded_tensor/_ops/tensor_ops.py:202:20-21: Index 0 out of range for tuple with 0 elements [bad-index]
ERROR torch/distributed/_shard/sharded_tensor/_ops/tensor_ops.py:218:10-47: No attribute `DisableTorchFunctionSubclass` in module `torch._C` [missing-attribute]
ERROR torch/distributed/_shard/sharded_tensor/api.py:85:9-37: No attribute `_log_api_usage_once` in module `torch._C` [missing-attribute]
ERROR torch/distributed/_shard/sharded_tensor/api.py:98:21-44: No attribute `get_default_dtype` in module `torch` [missing-attribute]
@ -15446,7 +15479,7 @@ ERROR torch/distributed/_shard/sharding_spec/chunk_sharding_spec.py:78:23-33: No
ERROR torch/distributed/_shard/sharding_spec/chunk_sharding_spec.py:126:27-50: No attribute `contiguous_format` in module `torch` [missing-attribute]
ERROR torch/distributed/_shard/sharding_spec/chunk_sharding_spec.py:166:39-62: No attribute `contiguous_format` in module `torch` [missing-attribute]
ERROR torch/distributed/_shard/sharding_spec/chunk_sharding_spec.py:175:32-43: No attribute `empty` in module `torch` [missing-attribute]
ERROR torch/distributed/_shard/sharding_spec/chunk_sharding_spec_ops/_common.py:62:14-21: Index 0 out of range for tuple with 0 elements [bad-index]
ERROR torch/distributed/_shard/sharding_spec/chunk_sharding_spec_ops/_common.py:62:19-20: Index 0 out of range for tuple with 0 elements [bad-index]
WARN torch/distributed/_shard/sharding_spec/chunk_sharding_spec_ops/_common.py:75:16-53: `torch.distributed._shard.sharded_tensor.api.ShardedTensor._init_from_local_tensor` is deprecated [deprecated]
ERROR torch/distributed/_shard/sharding_spec/chunk_sharding_spec_ops/_common.py:151:24-39: No attribute `transpose` in module `torch` [missing-attribute]
ERROR torch/distributed/_shard/sharding_spec/chunk_sharding_spec_ops/_common.py:159:12-27: No attribute `transpose` in module `torch` [missing-attribute]
@ -15595,7 +15628,7 @@ ERROR torch/distributed/_tools/mem_tracker.py:376:35-47: No attribute `device` i
ERROR torch/distributed/_tools/mem_tracker.py:377:30-42: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/distributed/_tools/mem_tracker.py:378:35-47: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/distributed/_tools/mem_tracker.py:550:15-27: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/distributed/_tools/mem_tracker.py:923:19-26: Index 0 out of range for tuple with 0 elements [bad-index]
ERROR torch/distributed/_tools/mem_tracker.py:923:24-25: Index 0 out of range for tuple with 0 elements [bad-index]
ERROR torch/distributed/_tools/memory_tracker.py:75:9-37: No attribute `_log_api_usage_once` in module `torch._C` [missing-attribute]
ERROR torch/distributed/_tools/mod_tracker.py:91:16-47: No attribute `_current_graph_task_id` in module `torch._C` [missing-attribute]
ERROR torch/distributed/_tools/runtime_estimator.py:128:23-34: No attribute `dtype` in module `torch` [missing-attribute]
@ -15682,6 +15715,7 @@ ERROR torch/distributed/benchmarks/benchmark_ddp_rpc.py:168:30-46: No attribute
ERROR torch/distributed/benchmarks/benchmark_ddp_rpc.py:169:22-38: No attribute `LongTensor` in module `torch` [missing-attribute]
ERROR torch/distributed/c10d_logger.py:66:28-43: Module `torch.cuda.nccl` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/distributed/checkpoint/_consolidate_hf_safetensors.py:138:32-43: No attribute `finfo` in module `torch` [missing-attribute]
ERROR torch/distributed/checkpoint/_consolidate_hf_safetensors.py:280:39-282:18: `None` is not subscriptable [unsupported-operation]
ERROR torch/distributed/checkpoint/_experimental/checkpoint_reader.py:149:30-41: No attribute `empty` in module `torch` [missing-attribute]
ERROR torch/distributed/checkpoint/_experimental/checkpoint_reader.py:154:30-46: No attribute `frombuffer` in module `torch` [missing-attribute]
ERROR torch/distributed/checkpoint/_experimental/staging.py:158:40-52: No attribute `Stream` in module `torch` [missing-attribute]
@ -15838,6 +15872,7 @@ ERROR torch/distributed/collective_utils.py:323:16-31: No attribute `Generator`
ERROR torch/distributed/collective_utils.py:340:8-22: Module `importlib.util` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/distributed/collective_utils.py:349:16-31: No attribute `Generator` in module `torch` [missing-attribute]
ERROR torch/distributed/debug/_frontend.py:217:5-19: Class member `_IPv6HTTPServer.address_family` overrides parent class `ThreadingHTTPServer` in an inconsistent manner [bad-override]
ERROR torch/distributed/device_mesh.py:36:5-38:23: Object of class `ModuleType` has no attribute `init_device_mesh` [missing-attribute]
ERROR torch/distributed/device_mesh.py:198:13-41: No attribute `_log_api_usage_once` in module `torch._C` [missing-attribute]
ERROR torch/distributed/device_mesh.py:209:44-53: No attribute `int` in module `torch` [missing-attribute]
ERROR torch/distributed/device_mesh.py:211:26-38: No attribute `tensor` in module `torch` [missing-attribute]
@ -16430,6 +16465,7 @@ ERROR torch/distributed/tensor/_dispatch.py:248:43-58: No attribute `Generator`
ERROR torch/distributed/tensor/_dispatch.py:287:36-47: No attribute `zeros` in module `torch` [missing-attribute]
ERROR torch/distributed/tensor/_dispatch.py:290:36-48: No attribute `tensor` in module `torch` [missing-attribute]
ERROR torch/distributed/tensor/_dispatch.py:332:21-33: No attribute `tensor` in module `torch` [missing-attribute]
ERROR torch/distributed/tensor/_dispatch.py:536:13-548:22: Argument `OpSchema | None` is not assignable to parameter `schema` with type `OpSchema` in function `torch.distributed.tensor._op_schema.OpInfo.__init__` [bad-argument-type]
ERROR torch/distributed/tensor/_dispatch.py:575:54-55: Argument `DTensorSpec | object | None` is not assignable to parameter `spec` with type `DTensorSpec | Sequence[DTensorSpec | None] | None` in function `OpDispatcher.wrap` [bad-argument-type]
ERROR torch/distributed/tensor/_dtensor_spec.py:62:12-22: No attribute `Size` in module `torch` [missing-attribute]
ERROR torch/distributed/tensor/_dtensor_spec.py:64:12-23: No attribute `dtype` in module `torch` [missing-attribute]
@ -16448,6 +16484,7 @@ ERROR torch/distributed/tensor/_ops/_math_ops.py:912:57-67: No attribute `Size`
ERROR torch/distributed/tensor/_ops/_math_ops.py:1058:57-67: No attribute `Size` in module `torch` [missing-attribute]
ERROR torch/distributed/tensor/_ops/_matrix_ops.py:114:20-30: No attribute `Size` in module `torch` [missing-attribute]
ERROR torch/distributed/tensor/_ops/_matrix_ops.py:1095:31-41: No attribute `Size` in module `torch` [missing-attribute]
ERROR torch/distributed/tensor/_ops/_tensor_ops.py:1009:33-1013:22: Argument `tuple[DTensorSpec, *tuple[DTensorSpec | None, ...], DTensorSpec]` is not assignable to parameter `input_specs` with type `Sequence[DTensorSpec] | None` in function `torch.distributed.tensor._op_schema.OpSpec.__init__` [bad-argument-type]
ERROR torch/distributed/tensor/_ops/_view_ops.py:482:5-23: No attribute `broadcast_to` in module `torch` [missing-attribute]
ERROR torch/distributed/tensor/_ops/_view_ops.py:484:5-18: No attribute `flatten` in module `torch` [missing-attribute]
ERROR torch/distributed/tensor/_ops/_view_ops.py:485:5-18: No attribute `movedim` in module `torch` [missing-attribute]
@ -16554,8 +16591,8 @@ ERROR torch/distributed/tensor/examples/flex_attention_cp.py:70:9-19: No attribu
ERROR torch/distributed/tensor/examples/flex_attention_cp.py:149:16-27: No attribute `randn` in module `torch` [missing-attribute]
ERROR torch/distributed/tensor/examples/torchrec_sharding_example.py:52:62-72: No attribute `Size` in module `torch` [missing-attribute]
ERROR torch/distributed/tensor/examples/torchrec_sharding_example.py:67:25-35: No attribute `Size` in module `torch` [missing-attribute]
ERROR torch/distributed/tensor/examples/torchrec_sharding_example.py:95:30-37: Index 0 out of range for tuple with 0 elements [bad-index]
ERROR torch/distributed/tensor/examples/torchrec_sharding_example.py:98:56-63: Index 0 out of range for tuple with 0 elements [bad-index]
ERROR torch/distributed/tensor/examples/torchrec_sharding_example.py:95:35-36: Index 0 out of range for tuple with 0 elements [bad-index]
ERROR torch/distributed/tensor/examples/torchrec_sharding_example.py:98:61-62: Index 0 out of range for tuple with 0 elements [bad-index]
ERROR torch/distributed/tensor/examples/torchrec_sharding_example.py:113:35-45: No attribute `Size` in module `torch` [missing-attribute]
ERROR torch/distributed/tensor/examples/torchrec_sharding_example.py:117:37-47: No attribute `Size` in module `torch` [missing-attribute]
ERROR torch/distributed/tensor/examples/torchrec_sharding_example.py:131:14-26: No attribute `device` in module `torch` [missing-attribute]
@ -17235,6 +17272,7 @@ ERROR torch/export/_trace.py:196:9-25: Module `torch._functorch` exists, but was
ERROR torch/export/_trace.py:196:9-32: Module `torch._functorch.config` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/export/_trace.py:200:16-32: Module `torch._functorch` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/export/_trace.py:200:16-39: Module `torch._functorch.config` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/export/_trace.py:663:20-28: `dup_name` may be uninitialized [unbound-name]
ERROR torch/export/_trace.py:828:16-32: Module `torch._functorch` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/export/_trace.py:828:16-39: Module `torch._functorch.config` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/export/_trace.py:829:16-29: Module `torch._export` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
@ -17447,6 +17485,7 @@ ERROR torch/fx/experimental/proxy_tensor.py:1787:17-48: Object of class `_ProxyT
ERROR torch/fx/experimental/proxy_tensor.py:1998:17-48: No attribute `is_autocast_cache_enabled` in module `torch` [missing-attribute]
ERROR torch/fx/experimental/proxy_tensor.py:1999:5-37: No attribute `set_autocast_cache_enabled` in module `torch` [missing-attribute]
ERROR torch/fx/experimental/proxy_tensor.py:2003:9-41: No attribute `set_autocast_cache_enabled` in module `torch` [missing-attribute]
ERROR torch/fx/experimental/proxy_tensor.py:2128:24-2135:18: Returned type `dict[str, _ModuleStackTracer.__init__.AttrProxy | None]` is not assignable to declared return type `dict[str, _ModuleStackTracer.__init__.AttrProxy]` [bad-return]
ERROR torch/fx/experimental/proxy_tensor.py:2215:13-2222:33: `Module | _AttrProxy` is not assignable to `Module` (caused by inconsistent types when breaking cycles) [bad-assignment]
ERROR torch/fx/experimental/proxy_tensor.py:2334:47-60: Module `torch._decomp` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
ERROR torch/fx/experimental/proxy_tensor.py:2537:36-54: No attribute `ScriptObject` in module `torch` [missing-attribute]
@ -17480,6 +17519,7 @@ ERROR torch/fx/experimental/symbolic_shapes.py:810:16-812:10: Returned type `boo
ERROR torch/fx/experimental/symbolic_shapes.py:864:48-52: Argument `list[Basic | Unknown] | list[Basic]` is not assignable to parameter `args` with type `list[Expr]` in function `_sympy_from_args` [bad-argument-type]
ERROR torch/fx/experimental/symbolic_shapes.py:940:26-41: No attribute `Generator` in module `torch` [missing-attribute]
ERROR torch/fx/experimental/symbolic_shapes.py:958:40-50: No attribute `Size` in module `torch` [missing-attribute]
ERROR torch/fx/experimental/symbolic_shapes.py:1199:21-1205:14: No matching overload found for function `typing.MutableMapping.update` called with arguments: (dict[Symbol, tuple[KeyEntry, ...]]) [no-matching-overload]
ERROR torch/fx/experimental/symbolic_shapes.py:1211:21-62: No matching overload found for function `typing.MutableMapping.update` called with arguments: (dict[Symbol, tuple[KeyEntry, ...]]) [no-matching-overload]
ERROR torch/fx/experimental/symbolic_shapes.py:1219:17-1225:10: No matching overload found for function `typing.MutableMapping.update` called with arguments: (dict[Symbol, tuple[KeyEntry, ...]]) [no-matching-overload]
ERROR torch/fx/experimental/symbolic_shapes.py:1227:13-29: No attribute `sparse_csr` in module `torch` [missing-attribute]
@ -17653,11 +17693,12 @@ ERROR torch/fx/passes/split_module.py:329:31-57: No attribute `_set_grad_enabled
ERROR torch/fx/passes/split_module.py:422:28-38: Cannot index into `set[int]` [bad-index]
ERROR torch/fx/passes/split_module.py:424:22-33: Cannot index into `set[int]` [bad-index]
ERROR torch/fx/passes/split_module.py:524:22-34: Cannot index into `set[int]` [bad-index]
ERROR torch/fx/passes/splitter_base.py:72:45-74:2: `str` is not assignable to `Literal['0', '1', '2', '3']` [bad-assignment]
ERROR torch/fx/proxy.py:19:22-56: Could not import `_fx_map_aggregate` from `torch._C` [missing-module-attribute]
ERROR torch/fx/proxy.py:19:58-80: Could not import `_fx_map_arg` from `torch._C` [missing-module-attribute]
ERROR torch/fx/proxy.py:173:41-47: Argument `((...) -> Any) | str` is not assignable to parameter `target` with type `(...) -> Unknown` in function `torch.fx.operator_schemas.check_for_mutable_operation` [bad-argument-type]
ERROR torch/fx/proxy.py:296:55-59: Default `None` is not assignable to parameter `proxy_factory_fn` with type `(Node) -> Proxy` [bad-function-definition]
ERROR torch/fx/proxy.py:313:47-52: Argument `tuple[*Sequence[Unknown]]` is not assignable to parameter `args` with type `tuple[Mapping[str, Unknown] | Node | OpOverload[Ellipsis, Any] | Sequence[Unknown] | SymBool | SymFloat | SymInt | Tensor | bool | complex | float | int | range | slice[Any, Any, Any] | str | tuple[Unknown, ...] | Unknown | None, ...]` in function `TracerBase.create_node` [bad-argument-type]
ERROR torch/fx/proxy.py:313:47-52: Argument `tuple[*Sequence[Unknown]]` is not assignable to parameter `args` with type `tuple[Argument, ...]` in function `TracerBase.create_node` [bad-argument-type]
ERROR torch/fx/proxy.py:407:25-411:14: No matching overload found for function `range.__new__` called with arguments: (type[range], Mapping[str, Unknown] | Node | OpOverload[Ellipsis, Any] | Sequence[Unknown] | SymBool | SymFloat | SymInt | Tensor | bool | complex | float | int | range | slice[Any, Any, Any] | str | tuple[Unknown, ...] | Unknown | None, Mapping[str, Unknown] | Node | OpOverload[Ellipsis, Any] | Sequence[Unknown] | SymBool | SymFloat | SymInt | Tensor | bool | complex | float | int | range | slice[Any, Any, Any] | str | tuple[Unknown, ...] | Unknown | None, Mapping[str, Unknown] | Node | OpOverload[Ellipsis, Any] | Sequence[Unknown] | SymBool | SymFloat | SymInt | Tensor | bool | complex | float | int | range | slice[Any, Any, Any] | str | tuple[Unknown, ...] | Unknown | None) [no-matching-overload]
ERROR torch/fx/proxy.py:560:16-25: Returned type `Proxy` is not assignable to declared return type `dict[Unknown, Unknown]` [bad-return]
ERROR torch/fx/proxy.py:658:36-57: No attribute `ScriptMethod` in module `torch._C` [missing-attribute]
@ -17861,6 +17902,7 @@ ERROR torch/jit/frontend.py:156:29-49: No attribute `ErrorReport` in module `tor
ERROR torch/jit/frontend.py:272:14-34: No attribute `ErrorReport` in module `torch._C` [missing-attribute]
ERROR torch/jit/frontend.py:435:29-56: No attribute `parse_type_comment` in module `torch._C` [missing-attribute]
ERROR torch/jit/frontend.py:436:16-53: No attribute `merge_type_from_type_comment` in module `torch._C` [missing-attribute]
ERROR torch/jit/frontend.py:1038:9-1058:56: `BinOp | UnaryOp | None` is not assignable to `None` (caused by inconsistent types when breaking cycles) [bad-assignment]
ERROR torch/jit/generate_bytecode.py:3:22-50: Could not import `_compile_graph_to_code_table` from `torch._C` [missing-module-attribute]
ERROR torch/jit/generate_bytecode.py:3:52-77: Could not import `_generate_upgraders_graph` from `torch._C` [missing-module-attribute]
ERROR torch/jit/mobile/__init__.py:47:22-57: No attribute `_load_for_lite_interpreter` in module `torch._C` [missing-attribute]
@ -18074,6 +18116,7 @@ ERROR torch/masked/_ops.py:1630:17-27: No attribute `ones` in module `torch` [mi
ERROR torch/masked/_ops.py:1630:47-58: No attribute `int64` in module `torch` [missing-attribute]
ERROR torch/masked/_ops.py:1644:23-35: No attribute `divide` in module `torch` [missing-attribute]
ERROR torch/masked/_ops.py:1645:13-27: No attribute `subtract` in module `torch` [missing-attribute]
ERROR torch/masked/_ops.py:1650:24-1656:14: No matching overload found for function `sum` called with arguments: (Unknown, int | list[int] | tuple[int, ...] | None, keepdim=bool | None, dtype=Unknown, mask=Tensor) [no-matching-overload]
ERROR torch/masked/_ops.py:1666:21-35: No attribute `subtract` in module `torch` [missing-attribute]
ERROR torch/masked/_ops.py:1667:21-34: No attribute `maximum` in module `torch` [missing-attribute]
ERROR torch/masked/_ops.py:1668:18-30: No attribute `divide` in module `torch` [missing-attribute]
@ -18640,7 +18683,7 @@ ERROR torch/nn/utils/_expanded_weights/expanded_weights_impl.py:22:5-19: No attr
ERROR torch/nn/utils/_expanded_weights/expanded_weights_impl.py:26:5-15: No attribute `lstm` in module `torch` [missing-attribute]
ERROR torch/nn/utils/_expanded_weights/expanded_weights_impl.py:30:5-14: No attribute `gru` in module `torch` [missing-attribute]
ERROR torch/nn/utils/_expanded_weights/expanded_weights_impl.py:127:9-27: Class member `ExpandedWeight.__torch_function__` overrides parent class `Tensor` in an inconsistent manner [bad-param-name-override]
ERROR torch/nn/utils/_expanded_weights/expanded_weights_impl.py:135:17-24: Index 2 out of range for tuple with 0 elements [bad-index]
ERROR torch/nn/utils/_expanded_weights/expanded_weights_impl.py:135:22-23: Index 2 out of range for tuple with 0 elements [bad-index]
ERROR torch/nn/utils/_expanded_weights/expanded_weights_impl.py:143:20-51: No attribute `_cudnn_rnn_flatten_weight` in module `torch` [missing-attribute]
ERROR torch/nn/utils/_expanded_weights/expanded_weights_utils.py:134:28-39: No attribute `zeros` in module `torch` [missing-attribute]
ERROR torch/nn/utils/_expanded_weights/group_norm_expanded_weights.py:35:13-36: No attribute `native_group_norm` in module `torch` [missing-attribute]
@ -18856,6 +18899,7 @@ ERROR torch/onnx/_internal/exporter/_reporting.py:14:5-30: Could not find import
ERROR torch/onnx/_internal/exporter/_schemas.py:13:8-12: Could not find import of `onnx` [missing-import]
ERROR torch/onnx/_internal/exporter/_schemas.py:15:8-18: Could not find import of `onnxscript` [missing-import]
ERROR torch/onnx/_internal/exporter/_schemas.py:16:1-26: Could not find import of `onnxscript` [missing-import]
ERROR torch/onnx/_internal/exporter/_schemas.py:410:17-415:18: Argument `AttributeParameter` is not assignable to parameter `object` with type `Parameter` in function `list.append` [bad-argument-type]
ERROR torch/onnx/_internal/exporter/_schemas.py:545:56-73: Cannot index into `dict[str, TypeConstraintParam]` [bad-index]
ERROR torch/onnx/_internal/exporter/_tensors.py:6:8-18: Could not find import of `onnxscript` [missing-import]
ERROR torch/onnx/_internal/exporter/_tensors.py:7:1-26: Could not find import of `onnxscript` [missing-import]
@ -19037,6 +19081,7 @@ ERROR torch/onnx/_internal/torchscript_exporter/symbolic_helper.py:269:32-40: No
ERROR torch/onnx/_internal/torchscript_exporter/symbolic_helper.py:269:51-59: No attribute `Value` in module `torch._C` [missing-attribute]
ERROR torch/onnx/_internal/torchscript_exporter/symbolic_helper.py:280:43-51: No attribute `Value` in module `torch._C` [missing-attribute]
ERROR torch/onnx/_internal/torchscript_exporter/symbolic_helper.py:280:62-70: No attribute `Value` in module `torch._C` [missing-attribute]
ERROR torch/onnx/_internal/torchscript_exporter/symbolic_helper.py:365:20-368:14: `list[Unknown]` is not assignable to variable `args` with type `Args[_P]` [bad-assignment]
ERROR torch/onnx/_internal/torchscript_exporter/symbolic_helper.py:442:51-63: No attribute `tensor` in module `torch` [missing-attribute]
ERROR torch/onnx/_internal/torchscript_exporter/symbolic_helper.py:446:56-68: No attribute `tensor` in module `torch` [missing-attribute]
ERROR torch/onnx/_internal/torchscript_exporter/symbolic_helper.py:541:25-33: No attribute `Value` in module `torch._C` [missing-attribute]
@ -20300,6 +20345,7 @@ ERROR torch/optim/optimizer.py:381:9-37: No attribute `_log_api_usage_once` in m
ERROR torch/optim/optimizer.py:546:20-32: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/optim/optimizer.py:546:34-45: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/optim/optimizer.py:792:39-52: No attribute `float32` in module `torch` [missing-attribute]
ERROR torch/optim/optimizer.py:981:35-985:18: Cannot instantiate `Iterable` because it is a protocol [bad-instantiation]
ERROR torch/optim/optimizer.py:1045:25-37: No attribute `device` in module `torch` [missing-attribute]
ERROR torch/optim/optimizer.py:1045:51-62: No attribute `dtype` in module `torch` [missing-attribute]
ERROR torch/optim/optimizer.py:1080:25-45: No attribute `_foreach_zero_` in module `torch` [missing-attribute]
@ -20545,6 +20591,10 @@ ERROR torch/quantization/_quantized_conversions.py:113:12-28: No attribute `empt
ERROR torch/quantization/_quantized_conversions.py:114:18-28: No attribute `int8` in module `torch` [missing-attribute]
ERROR torch/quantization/_quantized_conversions.py:115:23-32: No attribute `int` in module `torch` [missing-attribute]
ERROR torch/quantization/_quantized_conversions.py:120:20-34: No attribute `quint4x2` in module `torch` [missing-attribute]
ERROR torch/quantization/_quantized_conversions.py:125:22-32: `type[Unknown]` is not subscriptable [unsupported-operation]
ERROR torch/quantization/_quantized_conversions.py:126:22-32: `type[Unknown]` is not subscriptable [unsupported-operation]
ERROR torch/quantization/_quantized_conversions.py:127:22-32: `type[Unknown]` is not subscriptable [unsupported-operation]
ERROR torch/quantization/_quantized_conversions.py:128:22-32: `type[Unknown]` is not subscriptable [unsupported-operation]
ERROR torch/quantization/_quantized_conversions.py:130:18-32: No attribute `quint4x2` in module `torch` [missing-attribute]
ERROR torch/quantization/_quantized_conversions.py:134:41-52: No attribute `uint8` in module `torch` [missing-attribute]
WARN torch/quantization/quantize.py:22:5-12: `convert` is deprecated [deprecated]
@ -21336,6 +21386,7 @@ ERROR torch/utils/_python_dispatch.py:885:31-69: No attribute `_meta_in_tls_disp
ERROR torch/utils/_python_dispatch.py:886:17-59: No attribute `_set_meta_in_tls_dispatch_include` in module `torch._C` [missing-attribute]
ERROR torch/utils/_python_dispatch.py:890:21-63: No attribute `_set_meta_in_tls_dispatch_include` in module `torch._C` [missing-attribute]
ERROR torch/utils/_pytree.py:111:9-16: Class member `EnumEncoder.default` overrides parent class `JSONEncoder` in an inconsistent manner [bad-param-name-override]
ERROR torch/utils/_pytree.py:1012:43-1022:2: No matching overload found for function `frozenset.__new__` called with arguments: (type[frozenset[type]], set[((typename: str, field_names: Iterable[str] | str, *, rename: bool = False, module: str | None = None, defaults: Iterable[Any] | None = None) -> type[tuple[Any, ...]]) | type[OrderedDict] | type[defaultdict] | type[deque] | type[dict] | type[list] | type[tuple]]) [no-matching-overload]
ERROR torch/utils/_strobelight/examples/cli_function_profiler_example.py:22:20-30: No attribute `rand` in module `torch` [missing-attribute]
ERROR torch/utils/_strobelight/examples/cli_function_profiler_example.py:22:38-48: No attribute `rand` in module `torch` [missing-attribute]
ERROR torch/utils/_strobelight/examples/cli_function_profiler_example.py:22:56-66: No attribute `rand` in module `torch` [missing-attribute]
@ -21422,6 +21473,7 @@ ERROR torch/utils/_sympy/singleton_int.py:12:5-17: Class member `SingletonInt._o
ERROR torch/utils/_sympy/solve.py:147:13-38: Object of class `Basic` has no attribute `is_positive` [missing-attribute]
ERROR torch/utils/_sympy/value_ranges.py:276:31-278:14: No matching overload found for function `ValueRanges.__init__` called with arguments: (Max, Min) [no-matching-overload]
ERROR torch/utils/_sympy/value_ranges.py:307:31-309:14: No matching overload found for function `ValueRanges.__init__` called with arguments: (Min, Max) [no-matching-overload]
ERROR torch/utils/_sympy/value_ranges.py:421:27-424:10: No matching overload found for function `ValueRanges.__init__` called with arguments: (Boolean | Expr, Boolean | Expr) [no-matching-overload]
ERROR torch/utils/_sympy/value_ranges.py:459:25-35: No attribute `bool` in module `torch` [missing-attribute]
ERROR torch/utils/_sympy/value_ranges.py:472:25-35: No attribute `bool` in module `torch` [missing-attribute]
ERROR torch/utils/_sympy/value_ranges.py:476:20-35: Object of class `BooleanAtom` has no attribute `is_finite`
@ -21599,6 +21651,7 @@ ERROR torch/utils/data/_utils/collate.py:304:12-24: No attribute `tensor` in mod
ERROR torch/utils/data/_utils/collate.py:304:38-51: No attribute `float64` in module `torch` [missing-attribute]
ERROR torch/utils/data/_utils/collate.py:312:12-24: No attribute `tensor` in module `torch` [missing-attribute]
ERROR torch/utils/data/_utils/pin_memory.py:21:5-26: No attribute `set_num_threads` in module `torch` [missing-attribute]
ERROR torch/utils/data/_utils/pin_memory.py:72:34-75:18: Cannot instantiate `Mapping` because the following members are abstract: `__len__`, `__iter__` [bad-instantiation]
ERROR torch/utils/data/_utils/signal_handling.py:40:5-31: Could not import `_error_if_any_worker_fails` from `torch._C` [missing-module-attribute]
ERROR torch/utils/data/_utils/signal_handling.py:41:5-24: Could not import `_remove_worker_pids` from `torch._C` [missing-module-attribute]
ERROR torch/utils/data/_utils/signal_handling.py:42:5-21: Could not import `_set_worker_pids` from `torch._C` [missing-module-attribute]
@ -21613,7 +21666,6 @@ ERROR torch/utils/data/dataloader.py:650:26-41: No attribute `Generator` in modu
ERROR torch/utils/data/dataloader.py:706:13-24: No attribute `empty` in module `torch` [missing-attribute]
ERROR torch/utils/data/dataloader.py:706:35-46: No attribute `int64` in module `torch` [missing-attribute]
ERROR torch/utils/data/dataloader.py:723:26-41: No attribute `Generator` in module `torch` [missing-attribute]
ERROR torch/utils/data/datapipes/datapipe.py:422:16-41: Returned type `_T_co` is not assignable to declared return type `_T_co` [bad-return]
ERROR torch/utils/data/datapipes/datapipe.py:426:9-20: Class member `_MapDataPipeSerializationWrapper.__getitem__` overrides parent class `MapDataPipe` in an inconsistent manner [bad-param-name-override]
WARN torch/utils/data/datapipes/gen_pyi.py:64:30-47: `materialize_lines` is deprecated [deprecated]
ERROR torch/utils/data/datapipes/iter/callable.py:79:9-37: No attribute `_log_api_usage_once` in module `torch._C` [missing-attribute]
@ -21817,4 +21869,4 @@ ERROR torch/xpu/streams.py:103:13-35: No attribute `_XpuEventBase` in module `to
ERROR torch/xpu/streams.py:167:32-47: Object of class `Event` has no attribute `sycl_event` [missing-attribute]
ERROR torch/xpu/streams.py:170:12-27: Object of class `Event` has no attribute `sycl_event` [missing-attribute]
INFO Checking project configured at `<CWD>/pyrefly.toml`
INFO 21,682 errors (6,437 suppressed)
INFO 21,740 errors (6,368 suppressed)

View File

@ -743,9 +743,9 @@ torch/_dynamo/eval_frame.py:1739:9: error[unresolved-attribute] Module `torch._C
torch/_dynamo/eval_frame.py:1954:9: error[unresolved-attribute] Module `torch._C` has no member `_log_api_usage_once`
torch/_dynamo/eval_frame.py:2228:22: warning[possibly-missing-attribute] Submodule `traceback` may not be available as an attribute on module `torch.fx`
torch/_dynamo/external_utils.py:103:59: error[unresolved-attribute] Module `torch` has no member `as_tensor`
torch/_dynamo/functional_export.py:372:16: error[unsupported-operator] Operator `in` is not supported for types `str` and `Module`, in comparing `Literal["dynamo_flat_name_to_original_fqn"]` with `Unknown | Tensor | Module`
torch/_dynamo/functional_export.py:372:16: error[unsupported-operator] Operator `in` is not supported between objects of type `Literal["dynamo_flat_name_to_original_fqn"]` and `Unknown | Tensor | Module`
torch/_dynamo/functional_export.py:374:70: error[non-subscriptable] Cannot subscript object of type `Module` with no `__getitem__` method
torch/_dynamo/functional_export.py:379:16: error[unsupported-operator] Operator `in` is not supported for types `str` and `Module`, in comparing `Literal["dynamo_compile_id"]` with `Unknown | Tensor | Module`
torch/_dynamo/functional_export.py:379:16: error[unsupported-operator] Operator `in` is not supported between objects of type `Literal["dynamo_compile_id"]` and `Unknown | Tensor | Module`
torch/_dynamo/functional_export.py:381:55: error[non-subscriptable] Cannot subscript object of type `Module` with no `__getitem__` method
torch/_dynamo/functional_export.py:512:13: error[unresolved-attribute] Cannot assign object of type `int` to attribute `num_inputs` on type `Self@__init__` with custom `__setattr__` method.
torch/_dynamo/functional_export.py:513:13: error[unresolved-attribute] Cannot assign object of type `None` to attribute `gm_inputs` on type `Self@__init__` with custom `__setattr__` method.
@ -930,7 +930,7 @@ torch/_dynamo/symbolic_convert.py:921:28: error[invalid-argument-type] Argument
torch/_dynamo/symbolic_convert.py:1004:9: error[unresolved-attribute] Unresolved attribute `dispatch_table` on type `type`.
torch/_dynamo/symbolic_convert.py:1292:17: error[missing-argument] No argument provided for required parameter `self` of function `is_non_empty_graph`
torch/_dynamo/symbolic_convert.py:1602:28: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `InstructionTranslatorBase`, found `Unknown | InstructionTranslatorBase | None`
torch/_dynamo/symbolic_convert.py:1654:42: error[unsupported-operator] Operator `in` is not supported for types `str` and `object`, in comparing `Literal["Data-dependent"]` with `object`
torch/_dynamo/symbolic_convert.py:1654:42: error[unsupported-operator] Operator `in` is not supported between objects of type `Literal["Data-dependent"]` and `object`
torch/_dynamo/symbolic_convert.py:1843:21: warning[possibly-missing-attribute] Submodule `package` may not be available as an attribute on module `torch`
torch/_dynamo/symbolic_convert.py:1988:17: error[invalid-argument-type] Argument is incorrect: Expected `str`, found `str | None`
torch/_dynamo/symbolic_convert.py:2228:60: error[invalid-argument-type] Argument to function `get_dynamo_observed_exception` is incorrect: Expected `type[Exception]`, found `Unknown | type`
@ -1004,7 +1004,6 @@ torch/_dynamo/utils.py:865:25: error[unresolved-attribute] Module `torch` has no
torch/_dynamo/utils.py:865:38: error[unresolved-attribute] Module `torch` has no member `short`
torch/_dynamo/utils.py:866:5: error[unresolved-attribute] Module `torch` has no member `BoolTensor`
torch/_dynamo/utils.py:866:24: error[unresolved-attribute] Module `torch` has no member `bool`
torch/_dynamo/utils.py:1038:68: error[invalid-type-arguments] Too many type arguments to class `tuple`: expected 1, got 2
torch/_dynamo/utils.py:1665:18: error[unresolved-import] Cannot resolve imported module `torch._inductor.fb.remote_cache`
torch/_dynamo/utils.py:1680:22: warning[possibly-missing-attribute] Submodule `_guards` may not be available as an attribute on module `torch`
torch/_dynamo/utils.py:1901:36: warning[possibly-missing-attribute] Submodule `_guards` may not be available as an attribute on module `torch`
@ -1708,12 +1707,12 @@ torch/_dynamo/variables/user_defined.py:1298:37: error[invalid-argument-type] Ar
torch/_dynamo/variables/user_defined.py:1317:14: warning[possibly-missing-attribute] Submodule `_dynamo` may not be available as an attribute on module `torch._C`
torch/_dynamo/variables/user_defined.py:1334:56: error[invalid-argument-type] Argument to bound method `__getattribute__` is incorrect: Expected `str`, found `object`
torch/_dynamo/variables/user_defined.py:1334:68: error[too-many-positional-arguments] Too many positional arguments to bound method `__getattribute__`: expected 2, got 3
torch/_dynamo/variables/user_defined.py:1402:25: error[unsupported-operator] Operator `not in` is not supported for types `Unknown` and `object`
torch/_dynamo/variables/user_defined.py:1402:25: error[unsupported-operator] Operator `not in` is not supported between objects of type `Unknown` and `object`
torch/_dynamo/variables/user_defined.py:1478:32: error[unresolved-attribute] Object of type `object` has no attribute `_parameters`
torch/_dynamo/variables/user_defined.py:1479:32: error[unresolved-attribute] Object of type `object` has no attribute `_buffers`
torch/_dynamo/variables/user_defined.py:1480:32: error[unresolved-attribute] Object of type `object` has no attribute `_modules`
torch/_dynamo/variables/user_defined.py:1504:40: error[unresolved-attribute] Object of type `Self@var_getattr` has no attribute `get_nn_module_stack_source`
torch/_dynamo/variables/user_defined.py:1532:17: error[unsupported-operator] Operator `not in` is not supported for types `Unknown` and `object`, in comparing `Unknown & ~Literal["__dict__"] & ~Literal["__class__"]` with `object`
torch/_dynamo/variables/user_defined.py:1532:17: error[unsupported-operator] Operator `not in` is not supported between objects of type `Unknown & ~Literal["__dict__"] & ~Literal["__class__"]` and `object`
torch/_dynamo/variables/user_defined.py:1551:20: warning[possibly-missing-attribute] Attribute `items` may be missing on object of type `Unknown | None | TupleVariable`
torch/_dynamo/variables/user_defined.py:1573:17: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `((...) -> Any) | None`, found `None | AttrSource`
torch/_dynamo/variables/user_defined.py:1689:57: error[invalid-argument-type] Argument is incorrect: Expected `Source`, found `Unknown | Source | None`
@ -2108,7 +2107,6 @@ torch/_export/serde/serialize.py:2558:29: warning[possibly-missing-attribute] Su
torch/_export/serde/serialize.py:3101:51: error[unresolved-attribute] Module `torch._C` has no member `_get_max_operator_version`
torch/_export/serde/serialize.py:3180:9: error[invalid-method-override] Invalid override of method `default`: Definition is incompatible with `JSONEncoder.default`
torch/_export/serde/serialize.py:3865:31: error[unresolved-attribute] Module `torch` has no member `FunctionSchema`
torch/_export/serde/union.py:49:12: error[call-non-callable] Object of type `<decorator produced by dataclass-like function>` is not callable
torch/_export/verifier.py:49:19: error[unresolved-attribute] Module `torch` has no member `memory_format`
torch/_export/verifier.py:49:40: error[unresolved-attribute] Module `torch` has no member `dtype`
torch/_export/verifier.py:49:53: error[unresolved-attribute] Module `torch` has no member `device`
@ -2175,7 +2173,7 @@ torch/_functorch/_aot_autograd/collect_metadata_analysis.py:842:37: error[unreso
torch/_functorch/_aot_autograd/frontend_utils.py:50:30: error[unresolved-attribute] Module `torch` has no member `ScriptObject`
torch/_functorch/_aot_autograd/frontend_utils.py:71:35: warning[possibly-missing-attribute] Submodule `_guards` may not be available as an attribute on module `torch`
torch/_functorch/_aot_autograd/frontend_utils.py:116:26: warning[possibly-missing-attribute] Submodule `_guards` may not be available as an attribute on module `torch`
torch/_functorch/_aot_autograd/frontend_utils.py:156:16: error[unsupported-operator] Operator `in` is not supported for types `str` and `Module`, in comparing `str` with `Tensor | Module`
torch/_functorch/_aot_autograd/frontend_utils.py:156:16: error[unsupported-operator] Operator `in` is not supported between objects of type `str` and `Tensor | Module`
torch/_functorch/_aot_autograd/frontend_utils.py:157:18: error[non-subscriptable] Cannot subscript object of type `Module` with no `__getitem__` method
torch/_functorch/_aot_autograd/functional_utils.py:75:12: error[unresolved-attribute] Module `torch` has no member `_from_functional_tensor`
torch/_functorch/_aot_autograd/functional_utils.py:119:16: error[unresolved-attribute] Module `torch` has no member `_functionalize_are_all_mutations_hidden_from_autograd`
@ -2623,10 +2621,10 @@ torch/_higher_order_ops/invoke_subgraph.py:536:28: error[invalid-assignment] Obj
torch/_higher_order_ops/local_map.py:16:22: error[unresolved-import] Module `torch._C` has no member `DispatchKey`
torch/_higher_order_ops/local_map.py:59:16: error[unresolved-attribute] Module `torch` has no member `empty_strided`
torch/_higher_order_ops/local_map.py:124:9: warning[possibly-missing-attribute] Submodule `tensor` may not be available as an attribute on module `torch.distributed`
torch/_higher_order_ops/local_map.py:135:12: error[invalid-return-type] Return type does not match returned value: expected `tuple[Tensor, int, SymInt, None]`, found `tuple[@Todo, @Todo]`
torch/_higher_order_ops/local_map.py:135:12: error[invalid-return-type] Return type does not match returned value: expected `tuple[Tensor, int, SymInt, None]`, found `tuple[@Todo(StarredExpression), @Todo(StarredExpression)]`
torch/_higher_order_ops/local_map.py:140:13: warning[possibly-missing-attribute] Submodule `tensor` may not be available as an attribute on module `torch.distributed`
torch/_higher_order_ops/local_map.py:156:9: warning[possibly-missing-attribute] Submodule `tensor` may not be available as an attribute on module `torch.distributed`
torch/_higher_order_ops/local_map.py:158:12: error[invalid-return-type] Return type does not match returned value: expected `tuple[Tensor, int, SymInt, None]`, found `tuple[@Todo, @Todo]`
torch/_higher_order_ops/local_map.py:158:12: error[invalid-return-type] Return type does not match returned value: expected `tuple[Tensor, int, SymInt, None]`, found `tuple[@Todo(StarredExpression), @Todo(StarredExpression)]`
torch/_higher_order_ops/local_map.py:172:9: warning[possibly-missing-attribute] Submodule `tensor` may not be available as an attribute on module `torch.distributed`
torch/_higher_order_ops/local_map.py:407:14: error[unresolved-attribute] Module `torch._C` has no member `_AutoDispatchBelowAutograd`
torch/_higher_order_ops/local_map.py:434:14: error[unresolved-attribute] Module `torch._C` has no member `_AutoDispatchBelowAutograd`
@ -2711,10 +2709,10 @@ torch/_higher_order_ops/triton_kernel_wrap.py:398:22: error[unresolved-import] C
torch/_higher_order_ops/triton_kernel_wrap.py:412:22: error[unresolved-import] Cannot resolve imported module `triton.runtime.jit`
torch/_higher_order_ops/triton_kernel_wrap.py:419:18: error[unresolved-import] Cannot resolve imported module `triton._utils`
torch/_higher_order_ops/triton_kernel_wrap.py:434:37: error[non-subscriptable] Cannot subscript object of type `(...) -> Unknown` with no `__getitem__` method
torch/_higher_order_ops/triton_kernel_wrap.py:790:13: error[invalid-assignment] Invalid subscript assignment with key of type `tuple[str, @Todo]` and value of type `None` on object of type `dict[tuple[Any], Any]`
torch/_higher_order_ops/triton_kernel_wrap.py:791:13: error[invalid-assignment] Invalid subscript assignment with key of type `tuple[str, @Todo]` and value of type `Any` on object of type `dict[tuple[Any], Any]`
torch/_higher_order_ops/triton_kernel_wrap.py:792:12: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[tuple[Any], Any].__getitem__(key: tuple[Any], /) -> Any` cannot be called with key of type `tuple[str, @Todo]` on object of type `dict[tuple[Any], Any]`
torch/_higher_order_ops/triton_kernel_wrap.py:794:16: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[tuple[Any], Any].__getitem__(key: tuple[Any], /) -> Any` cannot be called with key of type `tuple[str, @Todo]` on object of type `dict[tuple[Any], Any]`
torch/_higher_order_ops/triton_kernel_wrap.py:790:13: error[invalid-assignment] Invalid subscript assignment with key of type `tuple[str, @Todo(StarredExpression)]` and value of type `None` on object of type `dict[tuple[Any], Any]`
torch/_higher_order_ops/triton_kernel_wrap.py:791:13: error[invalid-assignment] Invalid subscript assignment with key of type `tuple[str, @Todo(StarredExpression)]` and value of type `Any` on object of type `dict[tuple[Any], Any]`
torch/_higher_order_ops/triton_kernel_wrap.py:792:12: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[tuple[Any], Any].__getitem__(key: tuple[Any], /) -> Any` cannot be called with key of type `tuple[str, @Todo(StarredExpression)]` on object of type `dict[tuple[Any], Any]`
torch/_higher_order_ops/triton_kernel_wrap.py:794:16: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[tuple[Any], Any].__getitem__(key: tuple[Any], /) -> Any` cannot be called with key of type `tuple[str, @Todo(StarredExpression)]` on object of type `dict[tuple[Any], Any]`
torch/_higher_order_ops/triton_kernel_wrap.py:973:16: warning[possibly-missing-attribute] Attribute `fn` may be missing on object of type `Unknown | Autotuner | JITFunction`
torch/_higher_order_ops/triton_kernel_wrap.py:1077:13: warning[possibly-missing-attribute] Attribute `fn` may be missing on object of type `Unknown | Autotuner | JITFunction`
torch/_higher_order_ops/triton_kernel_wrap.py:1079:13: warning[possibly-missing-attribute] Attribute `configs` may be missing on object of type `Unknown | Autotuner | JITFunction`
@ -2779,7 +2777,7 @@ torch/_higher_order_ops/while_loop.py:783:20: error[unresolved-attribute] Module
torch/_higher_order_ops/while_loop.py:783:42: error[unresolved-attribute] Module `torch` has no member `int64`
torch/_higher_order_ops/while_loop.py:786:13: error[unresolved-attribute] Module `torch` has no member `zeros_like`
torch/_higher_order_ops/while_loop.py:796:13: error[unresolved-attribute] Module `torch` has no member `cat`
torch/_higher_order_ops/while_loop.py:887:17: error[invalid-argument-type] Argument to bound method `__call__` is incorrect: Expected `tuple[Tensor | int | float]`, found `tuple[Unknown, @Todo, @Todo]`
torch/_higher_order_ops/while_loop.py:887:17: error[invalid-argument-type] Argument to bound method `__call__` is incorrect: Expected `tuple[Tensor | int | float]`, found `tuple[Unknown, @Todo(StarredExpression), @Todo(StarredExpression)]`
torch/_higher_order_ops/wrap.py:9:22: error[unresolved-import] Module `torch._C` has no member `DispatchKey`
torch/_higher_order_ops/wrap.py:88:20: error[unresolved-attribute] Module `torch` has no member `is_grad_enabled`
torch/_higher_order_ops/wrap.py:291:28: error[unresolved-attribute] Module `torch._C` has no member `DispatchKey`
@ -4283,7 +4281,7 @@ torch/_inductor/codegen/mps.py:52:5: error[unresolved-attribute] Module `torch`
torch/_inductor/codegen/mps.py:77:12: error[unresolved-attribute] Object of type `Expr` has no attribute `is_integer`
torch/_inductor/codegen/mps.py:86:16: error[unresolved-attribute] Object of type `Expr` has no attribute `is_integer`
torch/_inductor/codegen/mps.py:120:12: error[unresolved-attribute] Object of type `Basic` has no attribute `is_integer`
torch/_inductor/codegen/mps.py:122:20: error[unsupported-operator] Operator `<` is not supported for types `Basic` and `int`, in comparing `Basic` with `Literal[0]`
torch/_inductor/codegen/mps.py:122:20: error[unsupported-operator] Operator `<` is not supported between objects of type `Basic` and `Literal[0]`
torch/_inductor/codegen/mps.py:127:82: error[unsupported-operator] Unary operator `-` is unsupported for type `Basic`
torch/_inductor/codegen/mps.py:145:12: error[unresolved-attribute] Object of type `Expr` has no attribute `is_integer`
torch/_inductor/codegen/mps.py:177:16: error[unresolved-attribute] Module `torch` has no member `dtype`
@ -5875,11 +5873,11 @@ torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_9.py:203:84: error[u
torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_9.py:218:84: error[unresolved-attribute] Module `torch` has no member `contiguous_format`
torch/_inductor/fx_passes/split_cat.py:129:23: error[unresolved-attribute] Module `torch` has no member `unbind`
torch/_inductor/fx_passes/split_cat.py:268:25: error[unresolved-attribute] Module `torch` has no member `unbind`
torch/_inductor/fx_passes/split_cat.py:294:8: error[unsupported-operator] Operator `<` is not supported for types `Sequence[Divergent]` and `int`, in comparing `(Any & ~None) | Sequence[Divergent] | Mapping[str, Divergent] | ... omitted 12 union elements` with `Literal[0]`
torch/_inductor/fx_passes/split_cat.py:294:8: error[unsupported-operator] Operator `<` is not supported between objects of type `(Any & ~None) | Sequence[Divergent] | Mapping[str, Divergent] | ... omitted 12 union elements` and `Literal[0]`
torch/_inductor/fx_passes/split_cat.py:298:13: error[unresolved-attribute] Module `torch` has no member `unbind`
torch/_inductor/fx_passes/split_cat.py:309:26: error[unresolved-attribute] Module `torch` has no member `cat`
torch/_inductor/fx_passes/split_cat.py:309:37: error[unresolved-attribute] Module `torch` has no member `concat`
torch/_inductor/fx_passes/split_cat.py:344:8: error[unsupported-operator] Operator `<` is not supported for types `Sequence[Divergent]` and `int`, in comparing `(Any & ~None) | Sequence[Divergent] | Mapping[str, Divergent] | ... omitted 12 union elements` with `Literal[0]`
torch/_inductor/fx_passes/split_cat.py:344:8: error[unsupported-operator] Operator `<` is not supported between objects of type `(Any & ~None) | Sequence[Divergent] | Mapping[str, Divergent] | ... omitted 12 union elements` and `Literal[0]`
torch/_inductor/fx_passes/split_cat.py:353:32: error[unresolved-attribute] Module `torch` has no member `cat`
torch/_inductor/fx_passes/split_cat.py:359:13: error[unresolved-attribute] Module `torch` has no member `cat`
torch/_inductor/fx_passes/split_cat.py:370:25: error[unresolved-attribute] Module `torch` has no member `stack`
@ -5939,7 +5937,7 @@ torch/_inductor/fx_passes/split_cat.py:1502:9: error[unresolved-attribute] Modul
torch/_inductor/fx_passes/split_cat.py:1521:31: error[unresolved-attribute] Module `torch` has no member `cat`
torch/_inductor/fx_passes/split_cat.py:1609:9: error[unresolved-attribute] Module `torch` has no member `cat`
torch/_inductor/fx_passes/split_cat.py:1626:31: error[unresolved-attribute] Module `torch` has no member `cat`
torch/_inductor/fx_passes/split_cat.py:1974:8: error[unsupported-operator] Operator `<` is not supported for types `Sequence[Divergent]` and `int`, in comparing `(Any & ~None) | Sequence[Divergent] | Mapping[str, Divergent] | ... omitted 12 union elements` with `Literal[0]`
torch/_inductor/fx_passes/split_cat.py:1974:8: error[unsupported-operator] Operator `<` is not supported between objects of type `(Any & ~None) | Sequence[Divergent] | Mapping[str, Divergent] | ... omitted 12 union elements` and `Literal[0]`
torch/_inductor/fx_passes/split_cat.py:2142:16: error[unresolved-attribute] Module `torch` has no member `Size`
torch/_inductor/fx_passes/split_cat.py:2154:17: error[unresolved-attribute] Module `torch` has no member `permute`
torch/_inductor/fx_passes/split_cat.py:2157:50: error[unresolved-attribute] Module `torch` has no member `permute`
@ -6063,7 +6061,7 @@ torch/_inductor/index_propagation.py:156:23: error[unresolved-attribute] Module
torch/_inductor/index_propagation.py:174:23: error[unresolved-attribute] Module `torch` has no member `promote_types`
torch/_inductor/index_propagation.py:179:23: error[unresolved-attribute] Module `torch` has no member `promote_types`
torch/_inductor/index_propagation.py:234:57: error[unresolved-attribute] Module `torch` has no member `dtype`
torch/_inductor/index_propagation.py:336:70: error[invalid-argument-type] Argument to function `statically_known_true` is incorrect: Expected `tuple[tuple[Symbol, ValueRanges[Any]]] | None`, found `tuple[@Todo, @Todo]`
torch/_inductor/index_propagation.py:336:70: error[invalid-argument-type] Argument to function `statically_known_true` is incorrect: Expected `tuple[tuple[Symbol, ValueRanges[Any]]] | None`, found `tuple[@Todo(StarredExpression), @Todo(StarredExpression)]`
torch/_inductor/index_propagation.py:338:9: error[invalid-method-override] Invalid override of method `indirect_indexing`: Definition is incompatible with `OpsHandler.indirect_indexing`
torch/_inductor/inductor_prims.py:25:29: error[unresolved-attribute] Module `torch` has no member `Tag`
torch/_inductor/inductor_prims.py:59:12: error[unresolved-attribute] Module `torch` has no member `amax`
@ -6196,7 +6194,7 @@ torch/_inductor/ir.py:2418:16: error[invalid-return-type] Return type does not m
torch/_inductor/ir.py:2433:52: error[invalid-argument-type] Argument to function `extract_free_symbols` is incorrect: Expected `Sequence[Expr]`, found `Sequence[int | Expr]`
torch/_inductor/ir.py:2438:17: error[unresolved-attribute] Module `torch` has no member `device`
torch/_inductor/ir.py:2439:23: error[unresolved-attribute] Module `torch` has no member `dtype`
torch/_inductor/ir.py:2492:62: error[unsupported-operator] Operator `>=` is not supported for types `None` and `str`, in comparing `Unknown | None` with `Literal["3.3.0"]`
torch/_inductor/ir.py:2492:62: error[unsupported-operator] Operator `>=` is not supported between objects of type `Unknown | None` and `Literal["3.3.0"]`
torch/_inductor/ir.py:2537:17: error[unresolved-attribute] Module `torch` has no member `device`
torch/_inductor/ir.py:2538:16: error[unresolved-attribute] Module `torch` has no member `dtype`
torch/_inductor/ir.py:2577:19: error[unresolved-attribute] Module `torch` has no member `dtype`
@ -6671,10 +6669,10 @@ torch/_inductor/lowering.py:1739:43: error[unresolved-attribute] Module `torch`
torch/_inductor/lowering.py:1755:31: error[unresolved-attribute] Module `torch` has no member `int8`
torch/_inductor/lowering.py:1755:43: error[unresolved-attribute] Module `torch` has no member `uint8`
torch/_inductor/lowering.py:1883:5: warning[deprecated] The function `check` is deprecated: `torch._prims_common.check` is deprecated and will be removed in the future. Please use `torch._check*` functions instead.
torch/_inductor/lowering.py:2098:8: error[unsupported-operator] Operator `<` is not supported for types `Basic` and `int`, in comparing `Unknown | Basic` with `Literal[0]`
torch/_inductor/lowering.py:2098:8: error[unsupported-operator] Operator `<` is not supported between objects of type `Unknown | Basic` and `Literal[0]`
torch/_inductor/lowering.py:2099:9: error[unsupported-operator] Operator `+=` is unsupported between objects of type `Basic` and `Unknown | int`
torch/_inductor/lowering.py:2100:12: error[unsupported-operator] Operator `<=` is not supported for types `int` and `Basic`, in comparing `Literal[0]` with `Unknown | Basic`
torch/_inductor/lowering.py:2100:17: error[unsupported-operator] Operator `<` is not supported for types `Basic` and `int`, in comparing `Unknown | Basic` with `Unknown | int`
torch/_inductor/lowering.py:2100:12: error[unsupported-operator] Operator `<=` is not supported between objects of type `Literal[0]` and `Unknown | Basic`
torch/_inductor/lowering.py:2100:17: error[unsupported-operator] Operator `<` is not supported between objects of type `Unknown | Basic` and `Unknown | int`
torch/_inductor/lowering.py:2155:19: error[unresolved-attribute] Module `torch` has no member `float8_e8m0fnu`
torch/_inductor/lowering.py:2288:32: error[unresolved-attribute] Module `torch` has no member `int64`
torch/_inductor/lowering.py:2307:57: error[unresolved-attribute] Module `torch` has no member `int32`
@ -7227,9 +7225,9 @@ torch/_inductor/scheduler.py:3474:33: warning[possibly-missing-attribute] Submod
torch/_inductor/scheduler.py:3481:21: warning[possibly-missing-attribute] Submodule `ir` may not be available as an attribute on module `torch._inductor`
torch/_inductor/scheduler.py:3607:14: error[unresolved-import] Cannot resolve imported module `triton.compiler.errors`
torch/_inductor/scheduler.py:3667:33: warning[possibly-missing-attribute] Submodule `select_algorithm` may not be available as an attribute on module `torch._inductor`
torch/_inductor/scheduler.py:3672:29: error[invalid-argument-type] Argument to bound method `append` is incorrect: Expected `tuple[Any, LambdaFuture | None, ModuleType]`, found `tuple[ChoiceCaller & Unknown, @Todo]`
torch/_inductor/scheduler.py:3672:29: error[invalid-argument-type] Argument to bound method `append` is incorrect: Expected `tuple[Any, LambdaFuture | None, ModuleType]`, found `tuple[ChoiceCaller & Unknown, @Todo(StarredExpression)]`
torch/_inductor/scheduler.py:3722:43: warning[possibly-missing-attribute] Submodule `ir` may not be available as an attribute on module `torch._inductor`
torch/_inductor/scheduler.py:3745:43: error[invalid-argument-type] Argument to bound method `append` is incorrect: Expected `tuple[Any, LambdaFuture | None, ModuleType]`, found `tuple[ChoiceCaller & Unknown, @Todo]`
torch/_inductor/scheduler.py:3745:43: error[invalid-argument-type] Argument to bound method `append` is incorrect: Expected `tuple[Any, LambdaFuture | None, ModuleType]`, found `tuple[ChoiceCaller & Unknown, @Todo(StarredExpression)]`
torch/_inductor/scheduler.py:4203:49: error[invalid-argument-type] Argument to bound method `statically_known_gt` is incorrect: Expected `Expr`, found `int`
torch/_inductor/scheduler.py:4628:32: error[unresolved-attribute] Module `torch` has no member `dtype`
torch/_inductor/scheduler.py:5158:31: warning[possibly-missing-attribute] Attribute `data` may be missing on object of type `(TensorBox & ~TorchBindObject & ~GeneratorState) | (Expr & ~TorchBindObject & ~GeneratorState)`
@ -7678,10 +7676,10 @@ torch/_library/infer_schema.py:63:18: error[unresolved-attribute] Object of type
torch/_library/infer_schema.py:132:37: error[unresolved-attribute] Module `torch._C` has no member `ScriptObject`
torch/_library/infer_schema.py:185:50: error[unresolved-attribute] Module `torch` has no member `device`
torch/_library/infer_schema.py:187:44: error[unresolved-attribute] Module `torch` has no member `dtype`
torch/_library/infer_schema.py:222:80: error[invalid-assignment] Object of type `list[tuple[type | _SpecialForm | GenericAlias, str] | tuple[types.UnionType, str]]` is not assignable to `list[tuple[type | _SpecialForm | GenericAlias, str]]`
torch/_library/infer_schema.py:244:46: error[invalid-argument-type] Argument to function `derived_seq_types` is incorrect: Expected `type | _SpecialForm`, found `types.UnionType`
torch/_library/infer_schema.py:248:13: error[invalid-argument-type] Argument to bound method `extend` is incorrect: Expected `Iterable[tuple[type | _SpecialForm | GenericAlias, str]]`, found `GeneratorType[tuple[types.UnionType, str], None, None]`
torch/_library/infer_schema.py:256:82: error[invalid-assignment] Object of type `list[tuple[type | _SpecialForm, str, bool, bool, bool] | tuple[types.UnionType, str, bool, bool, bool] | tuple[<NewType pseudo-class 'OpaqueType'>, str, bool, bool, bool]]` is not assignable to `list[tuple[type | _SpecialForm, str, bool, bool, bool]]`
torch/_library/infer_schema.py:222:80: error[invalid-assignment] Object of type `list[tuple[type | _SpecialForm | GenericAlias, str] | tuple[<types.UnionType special form>, str]]` is not assignable to `list[tuple[type | _SpecialForm | GenericAlias, str]]`
torch/_library/infer_schema.py:244:46: error[invalid-argument-type] Argument to function `derived_seq_types` is incorrect: Expected `type | _SpecialForm`, found `<types.UnionType special form>`
torch/_library/infer_schema.py:248:13: error[invalid-argument-type] Argument to bound method `extend` is incorrect: Expected `Iterable[tuple[type | _SpecialForm | GenericAlias, str]]`, found `GeneratorType[tuple[<types.UnionType special form 'Unknown | None'>, str], None, None]`
torch/_library/infer_schema.py:256:82: error[invalid-assignment] Object of type `list[tuple[type | _SpecialForm, str, bool, bool, bool] | tuple[<types.UnionType special form 'int | float'>, str, bool, bool, bool] | tuple[<NewType pseudo-class 'OpaqueType'>, str, bool, bool, bool]]` is not assignable to `list[tuple[type | _SpecialForm, str, bool, bool, bool]]`
torch/_library/opaque_object.py:23:36: error[unresolved-attribute] Module `torch._C` has no member `ScriptObject`
torch/_library/opaque_object.py:26:41: error[unresolved-attribute] Module `torch._C` has no member `ScriptObject`
torch/_library/opaque_object.py:84:12: error[unresolved-attribute] Module `torch._C` has no member `_make_opaque_object`
@ -9892,10 +9890,10 @@ torch/_numpy/_funcs_impl.py:329:9: error[unresolved-attribute] Module `torch` ha
torch/_numpy/_funcs_impl.py:346:12: error[unresolved-attribute] Module `torch` has no member `logspace`
torch/_numpy/_funcs_impl.py:375:18: error[unresolved-attribute] Module `torch` has no member `float64`
torch/_numpy/_funcs_impl.py:375:35: warning[possibly-missing-attribute] Attribute `is_complex` may be missing on object of type `(DTypeLike@arange & ~None) | Divergent`
torch/_numpy/_funcs_impl.py:381:9: error[unsupported-operator] Operator `>` is not supported for types `typing.TypeVar` and `Literal[0]`, in comparing `typing.TypeVar | (int & ~Literal[0]) | float | complex | None` with `Literal[0]`
torch/_numpy/_funcs_impl.py:381:22: error[unsupported-operator] Operator `>` is not supported for types `typing.TypeVar` and `typing.TypeVar`, in comparing `typing.TypeVar | int | float | complex` with `typing.TypeVar | int | float | complex | None`
torch/_numpy/_funcs_impl.py:381:40: error[unsupported-operator] Operator `<` is not supported for types `typing.TypeVar` and `Literal[0]`, in comparing `typing.TypeVar | (int & ~Literal[0]) | float | complex | None` with `Literal[0]`
torch/_numpy/_funcs_impl.py:381:53: error[unsupported-operator] Operator `<` is not supported for types `typing.TypeVar` and `typing.TypeVar`, in comparing `typing.TypeVar | int | float | complex` with `typing.TypeVar | int | float | complex | None`
torch/_numpy/_funcs_impl.py:381:9: error[unsupported-operator] Operator `>` is not supported between objects of type `(Unknown & ~Literal[0]) | (int & ~Literal[0]) | float | complex | None` and `Literal[0]`
torch/_numpy/_funcs_impl.py:381:22: error[unsupported-operator] Operator `>` is not supported between objects of type `(Unknown & ~None) | int | float | complex` and `Unknown | int | float | complex | None`
torch/_numpy/_funcs_impl.py:381:40: error[unsupported-operator] Operator `<` is not supported between objects of type `(Unknown & ~Literal[0]) | (int & ~Literal[0]) | float | complex | None` and `Literal[0]`
torch/_numpy/_funcs_impl.py:381:53: error[unsupported-operator] Operator `<` is not supported between objects of type `(Unknown & ~None) | int | float | complex` and `Unknown | int | float | complex | None`
torch/_numpy/_funcs_impl.py:383:16: error[unresolved-attribute] Module `torch` has no member `empty`
torch/_numpy/_funcs_impl.py:385:14: error[unresolved-attribute] Module `torch` has no member `arange`
torch/_numpy/_funcs_impl.py:402:12: error[unresolved-attribute] Module `torch` has no member `empty`
@ -16236,8 +16234,6 @@ torch/distributed/_symmetric_memory/_nvshmem_triton.py:1206:38: warning[possibly
torch/distributed/_tools/fake_collectives.py:14:1: warning[possibly-missing-attribute] Member `batch_isend_irecv` may be missing on module `torch.distributed`
torch/distributed/_tools/fsdp2_mem_tracker.py:107:31: error[unresolved-attribute] Module `torch` has no member `device`
torch/distributed/_tools/fsdp2_mem_tracker.py:109:38: error[unresolved-attribute] Module `torch` has no member `device`
torch/distributed/_tools/fsdp2_mem_tracker.py:449:51: error[invalid-argument-type] Argument to bound method `register_step_pre_hook` is incorrect: Expected `(typing.Self, tuple[Any, ...], dict[str, Any], /) -> tuple[tuple[Any, ...], dict[str, Any]] | None`, found `def _opt_step_pre_hook(optimizer: Optimizer, args: Any, kwargs: Any) -> None`
torch/distributed/_tools/fsdp2_mem_tracker.py:450:52: error[invalid-argument-type] Argument to bound method `register_step_post_hook` is incorrect: Expected `(typing.Self, tuple[Any, ...], dict[str, Any], /) -> None`, found `def _opt_step_post_hook(optimizer: Optimizer, args: Any, kwargs: Any) -> None`
torch/distributed/_tools/fsdp2_mem_tracker.py:538:19: error[non-subscriptable] Cannot subscript object of type `EllipsisType` with no `__getitem__` method
torch/distributed/_tools/fsdp2_mem_tracker.py:555:29: error[non-subscriptable] Cannot subscript object of type `EllipsisType` with no `__getitem__` method
torch/distributed/_tools/fsdp2_mem_tracker.py:566:28: error[non-subscriptable] Cannot subscript object of type `EllipsisType` with no `__getitem__` method
@ -16463,7 +16459,7 @@ torch/distributed/checkpoint/_async_process_executor.py:262:17: warning[possibly
torch/distributed/checkpoint/_async_process_executor.py:262:49: warning[possibly-missing-attribute] Member `Backend` may be missing on module `torch.distributed`
torch/distributed/checkpoint/_async_process_executor.py:263:13: warning[possibly-missing-attribute] Member `barrier` may be missing on module `torch.distributed`
torch/distributed/checkpoint/_async_process_executor.py:333:33: warning[possibly-missing-attribute] Member `ProcessGroup` may be missing on module `torch.distributed`
torch/distributed/checkpoint/_async_process_executor.py:366:13: error[invalid-argument-type] Argument to bound method `save` is incorrect: Expected `dict[str, typing.TypeVar | Any]`, found `object`
torch/distributed/checkpoint/_async_process_executor.py:366:13: error[invalid-argument-type] Argument to bound method `save` is incorrect: Expected `dict[str, Unknown]`, found `object`
torch/distributed/checkpoint/_async_process_executor.py:381:33: warning[possibly-missing-attribute] Member `ProcessGroup` may be missing on module `torch.distributed`
torch/distributed/checkpoint/_async_thread_executor.py:20:29: warning[possibly-missing-attribute] Member `ProcessGroup` may be missing on module `torch.distributed`
torch/distributed/checkpoint/_async_thread_executor.py:55:33: warning[possibly-missing-attribute] Member `ProcessGroup` may be missing on module `torch.distributed`
@ -16547,7 +16543,6 @@ torch/distributed/checkpoint/examples/fsdp_checkpoint_example.py:50:30: warning[
torch/distributed/checkpoint/examples/fsdp_checkpoint_example.py:64:5: warning[possibly-missing-attribute] Member `init_process_group` may be missing on module `torch.distributed`
torch/distributed/checkpoint/examples/fsdp_checkpoint_example.py:77:17: warning[deprecated] The function `save_state_dict` is deprecated: `save_state_dict` is deprecated and will be removed in future versions.Please use `save` instead.
torch/distributed/checkpoint/examples/fsdp_checkpoint_example.py:96:17: warning[deprecated] The function `load_state_dict` is deprecated: `load_state_dict` is deprecated and will be removed in future versions. Please use `load` instead.
torch/distributed/checkpoint/examples/fsdp_checkpoint_example.py:109:31: error[invalid-argument-type] Argument to function `optim_state_dict_to_load` is incorrect: Expected `dict[str, Any]`, found `typing.TypeVar | Any`
torch/distributed/checkpoint/examples/fsdp_checkpoint_example.py:118:5: warning[possibly-missing-attribute] Member `destroy_process_group` may be missing on module `torch.distributed`
torch/distributed/checkpoint/examples/stateful_example.py:19:43: warning[possibly-missing-import] Member `init_device_mesh` of module `torch.distributed.device_mesh` may be missing
torch/distributed/checkpoint/examples/stateful_example.py:39:16: error[unresolved-attribute] Module `torch` has no member `rand`
@ -16558,7 +16553,6 @@ torch/distributed/checkpoint/filesystem.py:342:27: error[unresolved-attribute] M
torch/distributed/checkpoint/filesystem.py:390:35: error[unresolved-attribute] Module `torch._C` has no member `_get_privateuse1_backend_name`
torch/distributed/checkpoint/format_utils.py:106:29: warning[possibly-missing-attribute] Member `distributed_c10d` may be missing on module `torch.distributed`
torch/distributed/checkpoint/format_utils.py:108:26: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
torch/distributed/checkpoint/format_utils.py:108:26: warning[possibly-missing-attribute] Attribute `to` may be missing on object of type `Any | typing.TypeVar`
torch/distributed/checkpoint/format_utils.py:110:26: error[unresolved-attribute] Module `torch` has no member `empty_like`
torch/distributed/checkpoint/format_utils.py:112:13: warning[possibly-missing-attribute] Member `broadcast` may be missing on module `torch.distributed`
torch/distributed/checkpoint/format_utils.py:129:9: error[invalid-method-override] Invalid override of method `set_up_storage_reader`: Definition is incompatible with `StorageReader.set_up_storage_reader`
@ -16601,9 +16595,6 @@ torch/distributed/checkpoint/optimizer.py:108:18: error[unresolved-attribute] Mo
torch/distributed/checkpoint/optimizer.py:112:12: error[unresolved-attribute] Module `torch` has no member `empty`
torch/distributed/checkpoint/optimizer.py:124:43: warning[possibly-missing-attribute] Member `ProcessGroup` may be missing on module `torch.distributed`
torch/distributed/checkpoint/optimizer.py:136:21: warning[possibly-missing-attribute] Member `ProcessGroup` may be missing on module `torch.distributed`
torch/distributed/checkpoint/optimizer.py:138:29: warning[possibly-missing-attribute] Attribute `size` may be missing on object of type `typing.TypeVar | Any`
torch/distributed/checkpoint/optimizer.py:139:30: error[invalid-argument-type] Argument to function `_is_nested_tensor` is incorrect: Expected `Tensor`, found `typing.TypeVar | Any`
torch/distributed/checkpoint/optimizer.py:140:24: warning[possibly-missing-attribute] Attribute `local_shards` may be missing on object of type `typing.TypeVar | Any`
torch/distributed/checkpoint/optimizer.py:190:29: error[unresolved-attribute] Module `torch` has no member `Size`
torch/distributed/checkpoint/optimizer.py:193:27: error[unresolved-attribute] Module `torch` has no member `Size`
torch/distributed/checkpoint/optimizer.py:207:43: error[unresolved-attribute] Module `torch` has no member `Size`
@ -16863,14 +16854,14 @@ torch/distributed/elastic/rendezvous/api.py:14:31: warning[possibly-missing-impo
torch/distributed/elastic/rendezvous/c10d_rendezvous_backend.py:16:31: warning[possibly-missing-import] Member `FileStore` of module `torch.distributed` may be missing
torch/distributed/elastic/rendezvous/c10d_rendezvous_backend.py:16:42: warning[possibly-missing-import] Member `Store` of module `torch.distributed` may be missing
torch/distributed/elastic/rendezvous/c10d_rendezvous_backend.py:16:49: warning[possibly-missing-import] Member `TCPStore` of module `torch.distributed` may be missing
torch/distributed/elastic/rendezvous/c10d_rendezvous_backend.py:90:28: error[invalid-return-type] Return type does not match returned value: expected `tuple[bytes, Any, bool] | None`, found `tuple[@Todo, Literal[False]]`
torch/distributed/elastic/rendezvous/c10d_rendezvous_backend.py:90:28: error[invalid-return-type] Return type does not match returned value: expected `tuple[bytes, Any, bool] | None`, found `tuple[@Todo(StarredExpression), Literal[False]]`
torch/distributed/elastic/rendezvous/dynamic_rendezvous.py:24:31: warning[possibly-missing-import] Member `Store` of module `torch.distributed` may be missing
torch/distributed/elastic/rendezvous/dynamic_rendezvous.py:1105:49: warning[possibly-missing-attribute] Member `Store` may be missing on module `torch.distributed`
torch/distributed/elastic/rendezvous/dynamic_rendezvous.py:1126:69: warning[possibly-missing-attribute] Member `TCPStore` may be missing on module `torch.distributed`
torch/distributed/elastic/rendezvous/dynamic_rendezvous.py:1127:16: warning[possibly-missing-attribute] Member `TCPStore` may be missing on module `torch.distributed`
torch/distributed/elastic/rendezvous/dynamic_rendezvous.py:1373:16: warning[possibly-missing-attribute] Member `PrefixStore` may be missing on module `torch.distributed`
torch/distributed/elastic/rendezvous/etcd_rendezvous_backend.py:20:31: warning[possibly-missing-import] Member `Store` of module `torch.distributed` may be missing
torch/distributed/elastic/rendezvous/etcd_rendezvous_backend.py:126:16: error[invalid-return-type] Return type does not match returned value: expected `tuple[bytes, Any, bool] | None`, found `tuple[@Todo, Literal[True]]`
torch/distributed/elastic/rendezvous/etcd_rendezvous_backend.py:126:16: error[invalid-return-type] Return type does not match returned value: expected `tuple[bytes, Any, bool] | None`, found `tuple[@Todo(StarredExpression), Literal[True]]`
torch/distributed/elastic/rendezvous/etcd_rendezvous_backend.py:130:24: warning[possibly-missing-attribute] Attribute `value` may be missing on object of type `Unknown | EtcdResult`
torch/distributed/elastic/rendezvous/etcd_rendezvous_backend.py:140:23: warning[possibly-missing-attribute] Attribute `modifiedIndex` may be missing on object of type `Unknown | EtcdResult`
torch/distributed/elastic/rendezvous/etcd_store.py:15:31: warning[possibly-missing-import] Member `Store` of module `torch.distributed` may be missing
@ -18069,7 +18060,7 @@ torch/distributions/bernoulli.py:78:25: warning[possibly-missing-attribute] Attr
torch/distributions/bernoulli.py:81:26: warning[possibly-missing-attribute] Attribute `expand` may be missing on object of type `Unknown | lazy_property[Unknown, Unknown]`
torch/distributions/bernoulli.py:88:16: warning[possibly-missing-attribute] Attribute `new` may be missing on object of type `Unknown | lazy_property[Unknown, Unknown] | Tensor`
torch/distributions/bernoulli.py:92:16: error[invalid-return-type] Return type does not match returned value: expected `Tensor`, found `Unknown | lazy_property[Unknown, Unknown]`
torch/distributions/bernoulli.py:96:17: error[unsupported-operator] Operator `>=` is not supported for types `lazy_property[Unknown, Unknown]` and `float`, in comparing `Unknown | lazy_property[Unknown, Unknown]` with `float`
torch/distributions/bernoulli.py:96:17: error[unsupported-operator] Operator `>=` is not supported between objects of type `Unknown | lazy_property[Unknown, Unknown]` and `float`
torch/distributions/bernoulli.py:102:30: error[unsupported-operator] Operator `-` is unsupported between objects of type `Literal[1]` and `Unknown | lazy_property[Unknown, Unknown]`
torch/distributions/bernoulli.py:106:32: error[invalid-argument-type] Argument to function `probs_to_logits` is incorrect: Expected `Tensor`, found `Unknown | lazy_property[Unknown, Unknown]`
torch/distributions/bernoulli.py:110:32: error[invalid-argument-type] Argument to function `logits_to_probs` is incorrect: Expected `Tensor`, found `Unknown | lazy_property[Unknown, Unknown]`
@ -18354,7 +18345,7 @@ torch/distributions/generalized_pareto.py:139:15: error[unresolved-attribute] Mo
torch/distributions/generalized_pareto.py:140:16: error[unresolved-attribute] Module `torch` has no member `broadcast_to`
torch/distributions/generalized_pareto.py:150:17: error[unresolved-attribute] Module `torch` has no member `where`
torch/distributions/geometric.py:70:27: error[unresolved-attribute] Module `torch` has no member `Size`
torch/distributions/geometric.py:78:21: error[unsupported-operator] Operator `>` is not supported for types `lazy_property[Unknown, Unknown]` and `int`, in comparing `Unknown | lazy_property[Unknown, Unknown] | Tensor` with `Literal[0]`
torch/distributions/geometric.py:78:21: error[unsupported-operator] Operator `>` is not supported between objects of type `Unknown | lazy_property[Unknown, Unknown] | Tensor` and `Literal[0]`
torch/distributions/geometric.py:80:33: warning[possibly-missing-attribute] Attribute `data` may be missing on object of type `Unknown | lazy_property[Unknown, Unknown] | Tensor`
torch/distributions/geometric.py:83:63: warning[possibly-missing-attribute] Attribute `shape` may be missing on object of type `Unknown | lazy_property[Unknown, Unknown] | Tensor`
torch/distributions/geometric.py:90:23: error[unresolved-attribute] Module `torch` has no member `Size`
@ -19012,7 +19003,7 @@ torch/fx/experimental/recording.py:169:56: error[unresolved-attribute] Object of
torch/fx/experimental/recording.py:245:20: error[unresolved-attribute] Object of type `((...) -> Unknown) & (() -> object)` has no attribute `__name__`
torch/fx/experimental/schema_type_annotation.py:110:38: error[unresolved-attribute] Module `torch._C` has no member `_jit_try_infer_type`
torch/fx/experimental/shape_inference/infer_shape.py:53:30: error[unresolved-attribute] Module `torch` has no member `randn`
torch/fx/experimental/symbolic_shapes.py:253:9: error[invalid-return-type] Return type does not match returned value: expected `tuple[int, int | SymInt, int]`, found `tuple[Literal[1], Unknown, int] | tuple[Literal[0], @Todo]`
torch/fx/experimental/symbolic_shapes.py:253:9: error[invalid-return-type] Return type does not match returned value: expected `tuple[int, int | SymInt, int]`, found `tuple[Literal[1], Unknown, int] | tuple[Literal[0], @Todo(StarredExpression)]`
torch/fx/experimental/symbolic_shapes.py:253:13: warning[possibly-missing-attribute] Attribute `node` may be missing on object of type `int | SymInt`
torch/fx/experimental/symbolic_shapes.py:326:9: warning[possibly-missing-attribute] Submodule `experimental` may not be available as an attribute on module `torch.fx`
torch/fx/experimental/symbolic_shapes.py:327:9: warning[possibly-missing-attribute] Submodule `experimental` may not be available as an attribute on module `torch.fx`
@ -20255,6 +20246,15 @@ torch/nn/modules/flatten.py:48:9: error[unresolved-attribute] Cannot assign obje
torch/nn/modules/flatten.py:49:9: error[unresolved-attribute] Cannot assign object of type `int` to attribute `end_dim` on type `Self@__init__` with custom `__setattr__` method.
torch/nn/modules/flatten.py:127:9: error[unresolved-attribute] Cannot assign object of type `int | str` to attribute `dim` on type `Self@__init__` with custom `__setattr__` method.
torch/nn/modules/flatten.py:128:9: error[unresolved-attribute] Cannot assign object of type `Unknown | list[int] | tuple[int, ...] | tuple[tuple[str, int]]` to attribute `unflattened_size` on type `Self@__init__` with custom `__setattr__` method.
torch/nn/modules/fold.py:143:9: error[unresolved-attribute] Cannot assign object of type `int | tuple[int, ...]` to attribute `output_size` on type `Self@__init__` with custom `__setattr__` method.
torch/nn/modules/fold.py:144:9: error[unresolved-attribute] Cannot assign object of type `int | tuple[int, ...]` to attribute `kernel_size` on type `Self@__init__` with custom `__setattr__` method.
torch/nn/modules/fold.py:145:9: error[unresolved-attribute] Cannot assign object of type `int | tuple[int, ...]` to attribute `dilation` on type `Self@__init__` with custom `__setattr__` method.
torch/nn/modules/fold.py:146:9: error[unresolved-attribute] Cannot assign object of type `int | tuple[int, ...]` to attribute `padding` on type `Self@__init__` with custom `__setattr__` method.
torch/nn/modules/fold.py:147:9: error[unresolved-attribute] Cannot assign object of type `int | tuple[int, ...]` to attribute `stride` on type `Self@__init__` with custom `__setattr__` method.
torch/nn/modules/fold.py:315:9: error[unresolved-attribute] Cannot assign object of type `int | tuple[int, ...]` to attribute `kernel_size` on type `Self@__init__` with custom `__setattr__` method.
torch/nn/modules/fold.py:316:9: error[unresolved-attribute] Cannot assign object of type `int | tuple[int, ...]` to attribute `dilation` on type `Self@__init__` with custom `__setattr__` method.
torch/nn/modules/fold.py:317:9: error[unresolved-attribute] Cannot assign object of type `int | tuple[int, ...]` to attribute `padding` on type `Self@__init__` with custom `__setattr__` method.
torch/nn/modules/fold.py:318:9: error[unresolved-attribute] Cannot assign object of type `int | tuple[int, ...]` to attribute `stride` on type `Self@__init__` with custom `__setattr__` method.
torch/nn/modules/lazy.py:176:9: error[invalid-assignment] Cannot assign to read-only property `_load_hook` on object of type `_LazyProtocol`: Attempted assignment to `_LazyProtocol._load_hook` here
torch/nn/modules/lazy.py:178:9: error[invalid-assignment] Cannot assign to read-only property `_initialize_hook` on object of type `_LazyProtocol`: Attempted assignment to `_LazyProtocol._initialize_hook` here
torch/nn/modules/linear.py:106:9: error[unresolved-attribute] Cannot assign object of type `int` to attribute `in_features` on type `Self@__init__` with custom `__setattr__` method.
@ -20417,12 +20417,14 @@ torch/nn/modules/transformer.py:1071:72: error[invalid-argument-type] Argument t
torch/nn/modules/transformer.py:1078:13: error[unresolved-attribute] Cannot assign object of type `(Tensor, /) -> Tensor` to attribute `activation` on type `Self@__init__` with custom `__setattr__` method.
torch/nn/modules/transformer.py:1080:13: error[unresolved-attribute] Cannot assign object of type `((Tensor, /) -> Tensor) & ~str` to attribute `activation` on type `Self@__init__` with custom `__setattr__` method.
torch/nn/modules/upsampling.py:161:9: error[unresolved-attribute] Cannot assign object of type `str` to attribute `name` on type `Self@__init__` with custom `__setattr__` method.
torch/nn/modules/upsampling.py:162:9: error[unresolved-attribute] Cannot assign object of type `@Todo | None` to attribute `size` on type `Self@__init__` with custom `__setattr__` method.
torch/nn/modules/upsampling.py:162:9: error[unresolved-attribute] Cannot assign object of type `int | tuple[int, ...] | None` to attribute `size` on type `Self@__init__` with custom `__setattr__` method.
torch/nn/modules/upsampling.py:164:13: error[unresolved-attribute] Cannot assign object of type `tuple[float, ...]` to attribute `scale_factor` on type `Self@__init__` with custom `__setattr__` method.
torch/nn/modules/upsampling.py:166:13: error[unresolved-attribute] Cannot assign object of type `float | None` to attribute `scale_factor` on type `Self@__init__` with custom `__setattr__` method.
torch/nn/modules/upsampling.py:167:9: error[unresolved-attribute] Cannot assign object of type `str` to attribute `mode` on type `Self@__init__` with custom `__setattr__` method.
torch/nn/modules/upsampling.py:168:9: error[unresolved-attribute] Cannot assign object of type `bool | None` to attribute `align_corners` on type `Self@__init__` with custom `__setattr__` method.
torch/nn/modules/upsampling.py:169:9: error[unresolved-attribute] Cannot assign object of type `bool | None` to attribute `recompute_scale_factor` on type `Self@__init__` with custom `__setattr__` method.
torch/nn/modules/upsampling.py:177:13: error[invalid-argument-type] Argument to function `interpolate` is incorrect: Expected `int | None`, found `int | tuple[int, ...] | None`
torch/nn/modules/upsampling.py:178:13: error[invalid-argument-type] Argument to function `interpolate` is incorrect: Expected `list[int | float] | None`, found `int | float | tuple[int | float, ...] | None`
torch/nn/modules/utils.py:72:21: error[unresolved-attribute] Object of type `object` has no attribute `keys`
torch/nn/modules/utils.py:83:17: error[invalid-assignment] Cannot assign to a subscript on an object of type `object`
torch/nn/modules/utils.py:83:48: error[unresolved-attribute] Object of type `object` has no attribute `pop`
@ -22284,8 +22286,6 @@ torch/optim/optimizer.py:219:55: error[unresolved-attribute] Module `torch` has
torch/optim/optimizer.py:219:74: error[unresolved-attribute] Module `torch` has no member `float32`
torch/optim/optimizer.py:227:45: error[unresolved-attribute] Module `torch._C` has no member `_get_privateuse1_backend_name`
torch/optim/optimizer.py:381:9: error[unresolved-attribute] Module `torch._C` has no member `_log_api_usage_once`
torch/optim/optimizer.py:516:39: error[invalid-argument-type] Argument is incorrect: Expected `typing.Self`, found `Optimizer`
torch/optim/optimizer.py:534:31: error[invalid-argument-type] Argument is incorrect: Expected `typing.Self`, found `Optimizer`
torch/optim/optimizer.py:546:20: error[unresolved-attribute] Module `torch` has no member `device`
torch/optim/optimizer.py:546:34: error[unresolved-attribute] Module `torch` has no member `dtype`
torch/optim/optimizer.py:792:39: error[unresolved-attribute] Module `torch` has no member `float32`
@ -23440,19 +23440,19 @@ torch/utils/_pytree.py:812:12: error[invalid-return-type] Return type does not m
torch/utils/_pytree.py:865:12: error[invalid-return-type] Return type does not match returned value: expected `tuple[list[tuple[KeyEntry, T@_ordereddict_flatten_with_keys]], Any]`, found `tuple[list[tuple[MappingKey[Unknown, Unknown], Unknown] | Unknown], Any]`
torch/utils/_pytree.py:890:12: error[invalid-return-type] Return type does not match returned value: expected `tuple[list[tuple[KeyEntry, T@_defaultdict_flatten_with_keys]], Any]`, found `tuple[list[tuple[MappingKey[Unknown, Unknown], Unknown] | Unknown], Any]`
torch/utils/_pytree.py:949:12: error[invalid-return-type] Return type does not match returned value: expected `tuple[list[tuple[KeyEntry, T@_deque_flatten_with_keys]], Any]`, found `tuple[list[tuple[SequenceKey[Unknown], T@_deque_flatten_with_keys] | Unknown], Any]`
torch/utils/_pytree.py:1012:34: error[invalid-assignment] Object of type `frozenset[type | Unknown | ((typename: str, field_names: Iterable[str], *, rename: bool = Literal[False], module: str | None = None, defaults: Iterable[Any] | None = None) -> type[tuple[Unknown, ...]])]` is not assignable to `frozenset[type]`
torch/utils/_pytree.py:1119:30: error[unresolved-attribute] Object of type `typing.Self` has no attribute `num_nodes`
torch/utils/_pytree.py:1120:31: error[unresolved-attribute] Object of type `typing.Self` has no attribute `num_leaves`
torch/utils/_pytree.py:1012:34: error[invalid-assignment] Object of type `frozenset[type | Unknown | ((typename: str, field_names: Iterable[str], *, rename: bool = Literal[False], module: str | None = None, defaults: Iterable[Any] | None = None) -> type[tuple[Any, ...]])]` is not assignable to `frozenset[type]`
torch/utils/_pytree.py:1119:30: error[unresolved-attribute] Special form `typing.Self` has no attribute `num_nodes`
torch/utils/_pytree.py:1120:31: error[unresolved-attribute] Special form `typing.Self` has no attribute `num_leaves`
torch/utils/_pytree.py:1131:62: error[too-many-positional-arguments] Too many positional arguments to bound method `__repr__`: expected 1, got 2
torch/utils/_pytree.py:1135:58: error[too-many-positional-arguments] Too many positional arguments to bound method `__repr__`: expected 1, got 2
torch/utils/_pytree.py:1167:16: error[invalid-return-type] Return type does not match returned value: expected `list[Self@children_specs]`, found `list[typing.Self]`
torch/utils/_pytree.py:1173:16: error[invalid-return-type] Return type does not match returned value: expected `list[Self@children]`, found `list[typing.Self]`
torch/utils/_pytree.py:1176:16: error[invalid-return-type] Return type does not match returned value: expected `Self@child`, found `typing.Self`
torch/utils/_pytree.py:1280:20: error[unresolved-attribute] Object of type `typing.Self` has no attribute `num_leaves`
torch/utils/_pytree.py:1281:34: error[unresolved-attribute] Object of type `typing.Self` has no attribute `unflatten`
torch/utils/_pytree.py:1167:16: error[invalid-return-type] Return type does not match returned value: expected `list[Self@children_specs]`, found `list[<special form 'typing.Self'>]`
torch/utils/_pytree.py:1173:16: error[invalid-return-type] Return type does not match returned value: expected `list[Self@children]`, found `list[<special form 'typing.Self'>]`
torch/utils/_pytree.py:1176:16: error[invalid-return-type] Return type does not match returned value: expected `Self@child`, found `<special form 'typing.Self'>`
torch/utils/_pytree.py:1280:20: error[unresolved-attribute] Special form `typing.Self` has no attribute `num_leaves`
torch/utils/_pytree.py:1281:34: error[unresolved-attribute] Special form `typing.Self` has no attribute `unflatten`
torch/utils/_pytree.py:1341:18: warning[deprecated] The class `LeafSpec` is deprecated: `isinstance(treespec, LeafSpec)` is deprecated, use `isinstance(treespec, TreeSpec) and treespec.is_leaf()` instead.
torch/utils/_pytree.py:1344:24: warning[deprecated] The class `LeafSpec` is deprecated: `isinstance(treespec, LeafSpec)` is deprecated, use `isinstance(treespec, TreeSpec) and treespec.is_leaf()` instead.
torch/utils/_pytree.py:1917:40: error[invalid-argument-type] Argument to function `_treespec_to_json` is incorrect: Expected `TreeSpec`, found `typing.Self`
torch/utils/_pytree.py:1917:40: error[invalid-argument-type] Argument to function `_treespec_to_json` is incorrect: Expected `TreeSpec`, found `<special form 'typing.Self'>`
torch/utils/_stats.py:26:12: error[unresolved-attribute] Object of type `(...) -> _R@count` has no attribute `__qualname__`
torch/utils/_stats.py:27:33: error[unresolved-attribute] Object of type `(...) -> _R@count` has no attribute `__qualname__`
torch/utils/_stats.py:28:29: error[unresolved-attribute] Object of type `(...) -> _R@count` has no attribute `__qualname__`
@ -23523,7 +23523,7 @@ torch/utils/_sympy/printers.py:475:53: error[unresolved-attribute] Object of typ
torch/utils/_sympy/printers.py:481:53: error[unresolved-attribute] Object of type `Expr` has no attribute `is_integer`
torch/utils/_sympy/printers.py:487:53: error[unresolved-attribute] Object of type `Expr` has no attribute `is_integer`
torch/utils/_sympy/printers.py:573:12: error[unresolved-attribute] Object of type `Basic` has no attribute `is_integer`
torch/utils/_sympy/printers.py:575:16: error[unsupported-operator] Operator `>=` is not supported for types `Basic` and `int`, in comparing `Basic` with `Literal[0]`
torch/utils/_sympy/printers.py:575:16: error[unsupported-operator] Operator `>=` is not supported between objects of type `Basic` and `Literal[0]`
torch/utils/_sympy/printers.py:581:86: error[unsupported-operator] Unary operator `-` is unsupported for type `Basic`
torch/utils/_sympy/reference.py:114:21: error[unresolved-attribute] Module `torch` has no member `float64`
torch/utils/_sympy/reference.py:222:21: error[unresolved-attribute] Module `torch` has no member `int64`
@ -23811,6 +23811,7 @@ torch/utils/data/typing.ipynb:cell 10:2:27: error[invalid-return-type] Function
torch/utils/data/typing.ipynb:cell 12:6:27: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `Iterator[Unknown]`
torch/utils/data/typing.ipynb:cell 12:10:27: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `Iterator[T_co@__iter__]`
torch/utils/data/typing.ipynb:cell 14:2:27: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `Iterator[tuple[T_co@DP, str]]`
torch/utils/data/typing.ipynb:cell 14:8:9: error[invalid-method-override] Invalid override of method `__iter__`: Definition is incompatible with `IterDataPipe.__iter__`
torch/utils/data/typing.ipynb:cell 14:8:27: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `Iterator[tuple[int | str, str]]`
torch/utils/data/typing.ipynb:cell 17:2:27: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `Iterator[list[int]]`
torch/utils/data/typing.ipynb:cell 18:2:27: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `Iterator[Any]`
@ -23970,4 +23971,4 @@ torch/xpu/random.py:52:18: error[unresolved-attribute] Module `torch` has no mem
torch/xpu/random.py:54:18: error[unresolved-attribute] Module `torch` has no member `device`
torch/xpu/streams.py:14:14: error[unresolved-attribute] Module `torch._C` has no member `_XpuStreamBase`
torch/xpu/streams.py:103:13: error[unresolved-attribute] Module `torch._C` has no member `_XpuEventBase`
Found 23800 diagnostics
Found 23801 diagnostics

View File

@ -177,8 +177,8 @@ ALL: Final = [
Project(
name="homeassistant",
repository="https://github.com/home-assistant/core.git",
revision="10c12623bfc0b3a06ffaa88bf986f61818cfb8be",
python_version="3.13",
revision="7fd440c4a06777bc4cfd90a3c176ded80c87a8fd",
python_version="3.14",
include=["homeassistant"],
skip="Missing dependencies on Windows" if sys.platform == "win32" else None,
install_arguments=[

View File

@ -73,7 +73,7 @@ class Venv:
# our projects isn't unexpectedly broken by a change in the
# annotations of one of that project's dependencies
"--exclude-newer",
"2025-11-17T00:00:00Z",
"2025-12-06T00:00:00Z",
"mypy", # We need to install mypy into the virtual environment or it fails to load plugins.
*pip_install_args,
]

View File

@ -116,18 +116,18 @@ wheels = [
[[package]]
name = "pyrefly"
version = "0.43.1"
version = "0.44.1"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/58/2c/f318536b85546b9aadb8e3e264e05401000a70fa88957c2bd0e6034b63ac/pyrefly-0.43.1.tar.gz", hash = "sha256:f97b09a45cbff445025f2581bd7bc20ff904baef19b97d134262e11f88fb154e", size = 3884459, upload-time = "2025-11-24T18:51:50.302Z" }
sdist = { url = "https://files.pythonhosted.org/packages/da/d8/b2ae5bdb24be6d81728a5de6b7bf10d2e84f9dcbdc29d084aca724f87262/pyrefly-0.44.1.tar.gz", hash = "sha256:9ec70988588f39c20bab25827ffb706f6b985acc43ec5f6bad6d3bc1f6881def", size = 3942165, upload-time = "2025-12-04T00:08:04.103Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/cc/93/1d075912889258410e58fe774e22d2661acba8920e223466c333c7aad889/pyrefly-0.43.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:e60ada6bd3eb203e72457f3613d35e9997db1b378298c851301cfe84b58c3be9", size = 9790079, upload-time = "2025-11-24T18:51:32.751Z" },
{ url = "https://files.pythonhosted.org/packages/fc/c2/c235e5d24f3a12ece2102c7cfc68fce1ad8c89cedc23bfb1eb60421e0e31/pyrefly-0.43.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:488b5b77ab8c0998fe9fa48a0ac8c443b13a57a40ba2d998bf29296b5c674cab", size = 9396136, upload-time = "2025-11-24T18:51:35.152Z" },
{ url = "https://files.pythonhosted.org/packages/13/ef/658c8dfd1b2f32637a05bc99bfec32e130bcd948b72e9643661217615d16/pyrefly-0.43.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9e2af14499acce4382aec72d36fcf2807bf667f839bc528bacac83b75106643f", size = 9633606, upload-time = "2025-11-24T18:51:37.353Z" },
{ url = "https://files.pythonhosted.org/packages/d9/bc/3ad135f312106787d1c6951f93bac45cc9afeb6709458a90254794050a4b/pyrefly-0.43.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5cad0ffbed68e99cd072a8bbe1faa30a4a26efa485775e2a9d0e5426a84ef19f", size = 10483447, upload-time = "2025-11-24T18:51:39.441Z" },
{ url = "https://files.pythonhosted.org/packages/45/5c/6c2e6585f27eb57157141e2dd70087b7c9bc60ec3309ad1127d2f5ff1806/pyrefly-0.43.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dc79bdb599b377178457950c5cc4a61dfb82d8ab388758d1958accddfcef7f6b", size = 10087696, upload-time = "2025-11-24T18:51:41.763Z" },
{ url = "https://files.pythonhosted.org/packages/b7/d6/a0c4c33b238e52bce0f10d795dfb03e42498d67a68787baa4e8a394283c6/pyrefly-0.43.1-py3-none-win32.whl", hash = "sha256:e7253b185bb5e5149fb0698f909ccfe7f95d128fbc52fadada0ed539991bcc60", size = 9572615, upload-time = "2025-11-24T18:51:43.929Z" },
{ url = "https://files.pythonhosted.org/packages/a4/e2/fb48a560f15acc597e680f95744e988211f662ff68455f92b0e19fb8b23b/pyrefly-0.43.1-py3-none-win_amd64.whl", hash = "sha256:8befa8a7d529db11ed075e1cfec3e30607dffea4a6e4c7622cce50fcec2467cf", size = 10195087, upload-time = "2025-11-24T18:51:45.953Z" },
{ url = "https://files.pythonhosted.org/packages/e5/e7/18815ed07edbabc104d28e0fd3fae542c83e90ace322b85ef2f8e5a79feb/pyrefly-0.43.1-py3-none-win_arm64.whl", hash = "sha256:8359bb854f5a238c364346836291947ef084516329a50bb400fddf0dd8a9b461", size = 9799746, upload-time = "2025-11-24T18:51:47.958Z" },
{ url = "https://files.pythonhosted.org/packages/de/ed/87c2ecbf796dd8868db889e02f4bf7cd3e41c53ef7dbbf9a0803a093fbba/pyrefly-0.44.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:99e2e5d388eeeecf51c30d430563f04e40a5fc5352f3dab82a8f85aca1af2318", size = 9977353, upload-time = "2025-12-04T00:07:40.433Z" },
{ url = "https://files.pythonhosted.org/packages/0b/df/1923f02370b92d84ccc2634342f2c9635e6c5a4ff53d81fc0e1540a47753/pyrefly-0.44.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:89c9d503b040613da2a8ae7044c6530a1d8b8c6dbb13465617e1adb2c99b2e31", size = 9565577, upload-time = "2025-12-04T00:07:43.133Z" },
{ url = "https://files.pythonhosted.org/packages/08/8a/26e95330ba127d642a11026f5e926ba84daaa1f4930c6c546c57d6aa3aa5/pyrefly-0.44.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:64969d6b44018f70670b416d74c56d80b949933f2651c0673a89359a6816bdde", size = 9813767, upload-time = "2025-12-04T00:07:45.788Z" },
{ url = "https://files.pythonhosted.org/packages/73/c4/79625096a3fa4f3a2c043df4fdb842b65e37f5ff4df741229b9b7bcc4117/pyrefly-0.44.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82a90514f452912c5013162e0d00c5d3eac1265e77be69dd47a73530eced1cdc", size = 10654009, upload-time = "2025-12-04T00:07:49.43Z" },
{ url = "https://files.pythonhosted.org/packages/0c/b7/45c60666403606274715cc6c5e6112ca3f1377af7d23b1495f0ba24c4748/pyrefly-0.44.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:30b4fa577509f927cbcb2f7ad092307ca5a91bc137d74679671e1a6e4fb6f629", size = 10293339, upload-time = "2025-12-04T00:07:52.548Z" },
{ url = "https://files.pythonhosted.org/packages/26/6d/aa934774460a9f7ac8f4dbf0423e058901589d8afe3ad4dd1e1ae8eadab0/pyrefly-0.44.1-py3-none-win32.whl", hash = "sha256:d77d7b7f7df7edf40dfca16cc6e2de17ac5c377ba558c9b350d10484a807b04b", size = 9717767, upload-time = "2025-12-04T00:07:55.586Z" },
{ url = "https://files.pythonhosted.org/packages/47/4f/7705110ae44d42b0f006745c9f432a19090d2002daf25f5f356608b1112e/pyrefly-0.44.1-py3-none-win_amd64.whl", hash = "sha256:7c0ca181400fdd382b4eb24ade6a6f6787c513566b77acb8f79750f80e80133b", size = 10371240, upload-time = "2025-12-04T00:07:58.823Z" },
{ url = "https://files.pythonhosted.org/packages/88/ff/b3e20628f6477489a366f6ff98d0ec6c74de643913c58c82eb4d73b1ef1a/pyrefly-0.44.1-py3-none-win_arm64.whl", hash = "sha256:5e8cc66acd173e2612361c03ef7b45d7245c04b09cbd24042b27c6081f6cd809", size = 9946460, upload-time = "2025-12-04T00:08:01.8Z" },
]
[[package]]