Skip to content
Closed
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
14 changes: 1 addition & 13 deletions conformance/third_party/conformance.exp
Original file line number Diff line number Diff line change
Expand Up @@ -600,19 +600,7 @@
"stop_line": 65
}
],
"aliases_recursive.py": [
{
"code": -2,
"column": 45,
"concise_description": "Expected a type form, got instance of `Literal['RecursiveMapping']`",
"description": "Expected a type form, got instance of `Literal['RecursiveMapping']`",
"line": 42,
"name": "not-a-type",
"severity": "error",
"stop_column": 63,
"stop_line": 42
}
],
"aliases_recursive.py": [],
"aliases_type_statement.py": [
{
"code": -2,
Expand Down
3 changes: 1 addition & 2 deletions conformance/third_party/conformance.result
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"Line 63: Expected 1 errors",
"Line 69: Expected 1 errors",
"Line 72: Expected 1 errors",
"Line 75: Expected 1 errors",
"Line 42: Unexpected errors [\"Expected a type form, got instance of `Literal['RecursiveMapping']`\"]"
"Line 75: Expected 1 errors"
],
"aliases_type_statement.py": [
"Line 82: Expected 1 errors",
Expand Down
4 changes: 2 additions & 2 deletions conformance/third_party/results.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"pass": 106,
"fail": 32,
"pass_rate": 0.77,
"differences": 132,
"differences": 131,
"passing": [
"aliases_explicit.py",
"aliases_newtype.py",
Expand Down Expand Up @@ -114,7 +114,7 @@
],
"failing": {
"aliases_implicit.py": 5,
"aliases_recursive.py": 12,
"aliases_recursive.py": 11,
"aliases_type_statement.py": 4,
"aliases_typealiastype.py": 4,
"aliases_variance.py": 4,
Expand Down
1 change: 1 addition & 0 deletions pyrefly/lib/binding/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ impl<'a> BindingsBuilder<'a> {
| SpecialExport::TypingTuple
| SpecialExport::BuiltinsType
| SpecialExport::TypingType
| SpecialExport::TypingMapping
)
),
Expr::BinOp(ExprBinOp {
Expand Down
5 changes: 4 additions & 1 deletion pyrefly/lib/export/special.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ pub enum SpecialExport {
BuiltinsFrozenset,
BuiltinsFloat,
Deprecated,
TypingMapping,
}

impl SpecialExport {
Expand Down Expand Up @@ -129,6 +130,7 @@ impl SpecialExport {
"frozenset" => Some(Self::BuiltinsFrozenset),
"float" => Some(Self::BuiltinsFloat),
"deprecated" => Some(Self::Deprecated),
"Mapping" => Some(Self::TypingMapping),
_ => None,
}
}
Expand Down Expand Up @@ -158,7 +160,8 @@ impl SpecialExport {
| Self::TypingType
| Self::TypingDict
| Self::TypingList
| Self::TypingTuple => {
| Self::TypingTuple
| Self::TypingMapping => {
matches!(m.as_str(), "typing" | "typing_extensions")
}
Self::CollectionsNamedTuple => matches!(m.as_str(), "collections"),
Expand Down
Loading