Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conformance/conformance_status.csv
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ BSK-E0111|BSK-E0128,constructors_call_init.py,constructors,PASS,5,0,0
BSK-E0013|BSK-E0041,constructors_call_metaclass.py,constructors,PASS,2,0,1
BSK-E0013|BSK-E0074,constructors_call_new.py,constructors,PASS,2,0,2
BSK-E0144,constructors_call_type.py,constructors,PASS,8,0,0
,constructors_callable.py,constructors,FAIL,0,12,0
BSK-E0153,constructors_callable.py,constructors,PASS,12,0,0
,constructors_consistency.py,constructors,PASS,0,0,0
,dataclasses_descriptors.py,dataclasses,PASS,0,0,0
BSK-E0054,dataclasses_final.py,dataclasses,PASS,5,0,1
Expand Down
4 changes: 2 additions & 2 deletions coverage-thresholds.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}
},
"conformance": {
"_doc": "Minimum PEP conformance pass percentage (files passing / total files). Ratchet UP only. Current: 135/146 = 92.46% (pinned to python/typing@268d0c4e). 11 files still fail (missed required diagnostics): constructors_callable, dataclasses_transform_converter, generics_defaults_specialization, generics_paramspec_components, generics_paramspec_semantics, generics_paramspec_specialization, generics_typevartuple_args, generics_typevartuple_basic, protocols_definition, typeddicts_extra_items, typeddicts_readonly_inheritance.",
"threshold": 92
"_doc": "Minimum PEP conformance pass percentage (files passing / total files). Ratchet UP only. Current: 136/146 = 93.15% (pinned to python/typing@268d0c4e). 10 files still fail (missed required diagnostics): dataclasses_transform_converter, generics_defaults_specialization, generics_paramspec_components, generics_paramspec_semantics, generics_paramspec_specialization, generics_typevartuple_args, generics_typevartuple_basic, protocols_definition, typeddicts_extra_items, typeddicts_readonly_inheritance.",
"threshold": 93
}
}
10 changes: 1 addition & 9 deletions crates/basilisk-checker/src/rules/e0041.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,15 +313,7 @@ fn check_constructor_calls(module: &ResolvedModule, diagnostics: &mut Vec<Diagno
let class_map = super::shared::class_name_map(&module.classes);

// Build a map of (class_name, method_name) → FunctionInfo for methods.
let mut method_map: HashMap<(&str, &str), Vec<&FunctionInfo>> = HashMap::new();
for func in &module.functions {
if let Some(ref cls_name) = func.class_name {
method_map
.entry((cls_name.as_str(), func.name.as_str()))
.or_default()
.push(func);
}
}
let method_map = super::shared::method_name_map(&module.functions);

for call in &module.calls {
// Only process constructor calls (callee matches a class name)
Expand Down
11 changes: 1 addition & 10 deletions crates/basilisk-checker/src/rules/e0074.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,7 @@ impl Rule for ConstructorCallNewMismatch {
basilisk_resolver::name_lookup(&module.classes);

// Build method map: (class_name, method_name) -> Vec<&FunctionInfo>
let mut method_map: HashMap<(&str, &str), Vec<&basilisk_resolver::FunctionInfo>> =
HashMap::new();
for func in &module.functions {
if let Some(ref class_name) = func.class_name {
method_map
.entry((class_name.as_str(), func.name.as_str()))
.or_default()
.push(func);
}
}
let method_map = super::shared::method_name_map(&module.functions);

// Re-parse source to get AST for walking call expressions.
let Ok(parsed) = basilisk_parser::parse_source(source.clone(), path.clone()) else {
Expand Down
11 changes: 1 addition & 10 deletions crates/basilisk-checker/src/rules/e0111/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,7 @@ impl Rule for ConstructorCallError {
basilisk_resolver::name_lookup(&module.classes);

// Build method map: (class_name, method_name) -> Vec<&FunctionInfo>
let mut method_map: HashMap<(&str, &str), Vec<&basilisk_resolver::FunctionInfo>> =
HashMap::new();
for func in &module.functions {
if let Some(ref class_name) = func.class_name {
method_map
.entry((class_name.as_str(), func.name.as_str()))
.or_default()
.push(func);
}
}
let method_map = super::shared::method_name_map(&module.functions);

// Collect module-level TypeVar names for class-scoped TypeVar detection.
let typevar_names: Vec<&str> = basilisk_resolver::collect_names(&module.typevar_calls);
Expand Down
11 changes: 1 addition & 10 deletions crates/basilisk-checker/src/rules/e0144/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,7 @@ impl Rule for TypeCallConstructorViolation {
let class_map: HashMap<&str, &basilisk_resolver::ClassInfo> =
basilisk_resolver::name_lookup(&module.classes);

let mut method_map: HashMap<(&str, &str), Vec<&basilisk_resolver::FunctionInfo>> =
HashMap::new();
for func in &module.functions {
if let Some(ref class_name) = func.class_name {
method_map
.entry((class_name.as_str(), func.name.as_str()))
.or_default()
.push(func);
}
}
let method_map = super::shared::method_name_map(&module.functions);

// Collect TypeVar names (module-level).
let typevar_names: Vec<&str> = basilisk_resolver::collect_names(&module.typevar_calls);
Expand Down
Loading
Loading