Skip to content

[Python] Generate idiomatic except clauses for typed exception patterns #2476

[Python] Generate idiomatic except clauses for typed exception patterns

[Python] Generate idiomatic except clauses for typed exception patterns #2476

Triggered via pull request December 14, 2025 23:19
Status Success
Total duration 7m 51s
Artifacts

build.yml

on: pull_request
verify-linting
26s
verify-linting
Check that solution can be restored
20s
Check that solution can be restored
build-typescript
2m 32s
build-typescript
build-integration
3m 29s
build-integration
build-standalone
5m 27s
build-standalone
build-dart
2m 16s
build-dart
Matrix: analyzers
Matrix: build-javascript
Matrix: build-python
Matrix: build-rust
Fit to window
Zoom out
Zoom in

Annotations

105 warnings
analyzers (src/Fable.AST/Fable.AST.fsproj): tests/Js/Main/ApplicativeTests.fs#L1086
The instantiation of the generic type 'Const' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. 'Const<_,_>'.
analyzers (src/Fable.AST/Fable.AST.fsproj): tests/Js/Main/ApplicativeTests.fs#L1084
This construct causes code to be less generic than indicated by the type annotations. The type variable 'T has been constrained to be type 'Result<'a,int>'.
analyzers (src/Fable.AST/Fable.AST.fsproj): tests/Python/TestApplicative.fs#L1653
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Functor has been constrained to be type 'Functor'.
analyzers (src/Fable.AST/Fable.AST.fsproj): tests/Python/TestApplicative.fs#L1090
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Applicative<'T> has been constrained to be type 'Const<'a,Result<'b,int>>'.
analyzers (src/Fable.AST/Fable.AST.fsproj): tests/Python/TestApplicative.fs#L1090
The instantiation of the generic type 'Const' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. 'Const<_,_>'.
analyzers (src/Fable.AST/Fable.AST.fsproj): tests/Python/TestApplicative.fs#L1088
This construct causes code to be less generic than indicated by the type annotations. The type variable 'T has been constrained to be type 'Result<'a,int>'.
analyzers (src/Fable.AST/Fable.AST.fsproj): src/quicktest-dart/QuickTest.fs#L41
Main module of program is empty: nothing will happen when it is run
analyzers (src/Fable.AST/Fable.AST.fsproj): tests/React/SpreadSheet.fs#L248
This construct is deprecated. event.keyCode is deprecated see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode for more information
analyzers (src/Fable.AST/Fable.AST.fsproj): tests/React/SpreadSheet.fs#L248
This construct is deprecated. event.keyCode is deprecated see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode for more information
analyzers (src/Fable.AST/Fable.AST.fsproj): tests/React/SpreadSheet.fs#L248
This construct is deprecated. event.keyCode is deprecated see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode for more information
analyzers (src/Fable.Transforms/Rust/AST/Rust.AST.fsproj): tests/Js/Main/ApplicativeTests.fs#L1086
The instantiation of the generic type 'Const' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. 'Const<_,_>'.
analyzers (src/Fable.Transforms/Rust/AST/Rust.AST.fsproj): tests/Js/Main/ApplicativeTests.fs#L1084
This construct causes code to be less generic than indicated by the type annotations. The type variable 'T has been constrained to be type 'Result<'a,int>'.
analyzers (src/Fable.Transforms/Rust/AST/Rust.AST.fsproj): tests/Python/TestApplicative.fs#L1090
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Applicative<'T> has been constrained to be type 'Const<'a,Result<'b,int>>'.
analyzers (src/Fable.Transforms/Rust/AST/Rust.AST.fsproj): tests/Python/TestApplicative.fs#L1090
The instantiation of the generic type 'Const' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. 'Const<_,_>'.
analyzers (src/Fable.Transforms/Rust/AST/Rust.AST.fsproj): tests/Python/TestApplicative.fs#L1088
This construct causes code to be less generic than indicated by the type annotations. The type variable 'T has been constrained to be type 'Result<'a,int>'.
analyzers (src/Fable.Transforms/Rust/AST/Rust.AST.fsproj): tests/Rust/tests/src/ApplicativeTests.fs#L1735
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Functor has been constrained to be type 'Functor'.
analyzers (src/Fable.Transforms/Rust/AST/Rust.AST.fsproj): src/quicktest-dart/QuickTest.fs#L41
Main module of program is empty: nothing will happen when it is run
analyzers (src/Fable.Transforms/Rust/AST/Rust.AST.fsproj): tests/React/SpreadSheet.fs#L248
This construct is deprecated. event.keyCode is deprecated see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode for more information
analyzers (src/Fable.Transforms/Rust/AST/Rust.AST.fsproj): tests/React/SpreadSheet.fs#L248
This construct is deprecated. event.keyCode is deprecated see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode for more information
analyzers (src/Fable.Transforms/Rust/AST/Rust.AST.fsproj): tests/React/SpreadSheet.fs#L248
This construct is deprecated. event.keyCode is deprecated see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode for more information
analyzers (src/Fable.Compiler/Fable.Compiler.fsproj): tests/Js/Main/ApplicativeTests.fs#L1084
This construct causes code to be less generic than indicated by the type annotations. The type variable 'T has been constrained to be type 'Result<'a,int>'.
analyzers (src/Fable.Compiler/Fable.Compiler.fsproj): tests/Python/TestApplicative.fs#L1653
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Functor has been constrained to be type 'Functor'.
analyzers (src/Fable.Compiler/Fable.Compiler.fsproj): tests/Python/TestApplicative.fs#L1090
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Applicative<'T> has been constrained to be type 'Const<'a,Result<'b,int>>'.
analyzers (src/Fable.Compiler/Fable.Compiler.fsproj): tests/Python/TestApplicative.fs#L1090
The instantiation of the generic type 'Const' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. 'Const<_,_>'.
analyzers (src/Fable.Compiler/Fable.Compiler.fsproj): tests/Python/TestApplicative.fs#L1088
This construct causes code to be less generic than indicated by the type annotations. The type variable 'T has been constrained to be type 'Result<'a,int>'.
analyzers (src/Fable.Compiler/Fable.Compiler.fsproj): src/quicktest-dart/QuickTest.fs#L41
Main module of program is empty: nothing will happen when it is run
analyzers (src/Fable.Compiler/Fable.Compiler.fsproj): tests/Rust/tests/src/ApplicativeTests.fs#L1735
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Functor has been constrained to be type 'Functor'.
analyzers (src/Fable.Compiler/Fable.Compiler.fsproj): tests/React/SpreadSheet.fs#L248
This construct is deprecated. event.keyCode is deprecated see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode for more information
analyzers (src/Fable.Compiler/Fable.Compiler.fsproj): tests/React/SpreadSheet.fs#L248
This construct is deprecated. event.keyCode is deprecated see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode for more information
analyzers (src/Fable.Compiler/Fable.Compiler.fsproj): tests/React/SpreadSheet.fs#L248
This construct is deprecated. event.keyCode is deprecated see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode for more information
build-rust (default): tests/Rust/tests/src/TypeTests.fs#L498
An indexed property's getter and setter must have the same type. Property 'Item' has getter of type 'int' but setter of type 'string'.
build-rust (default): tests/Rust/tests/src/MiscTests.fs#L1237
This rule will never be matched
build-rust (default): tests/Rust/tests/src/ApplicativeTests.fs#L1735
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Functor has been constrained to be type 'Functor'.
build-rust (no_std): tests/Rust/tests/src/TypeTests.fs#L498
An indexed property's getter and setter must have the same type. Property 'Item' has getter of type 'int' but setter of type 'string'.
build-rust (no_std): tests/Rust/tests/src/MiscTests.fs#L1237
This rule will never be matched
build-rust (no_std): tests/Rust/tests/src/ApplicativeTests.fs#L1735
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Functor has been constrained to be type 'Functor'.
build-rust (threaded): tests/Rust/tests/src/TypeTests.fs#L498
An indexed property's getter and setter must have the same type. Property 'Item' has getter of type 'int' but setter of type 'string'.
build-rust (threaded): tests/Rust/tests/src/MiscTests.fs#L1237
This rule will never be matched
build-rust (threaded): tests/Rust/tests/src/ApplicativeTests.fs#L1735
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Functor has been constrained to be type 'Functor'.
build-javascript (ubuntu-latest): tests/Js/Main/NestedAndRecursivePatternTests.fs#L92
Pattern discard is not allowed for union case that takes no data.
build-javascript (ubuntu-latest): tests/Js/Main/NestedAndRecursivePatternTests.fs#L91
Pattern discard is not allowed for union case that takes no data.
build-javascript (ubuntu-latest): tests/Js/Main/NestedAndRecursivePatternTests.fs#L90
Pattern discard is not allowed for union case that takes no data.
build-javascript (ubuntu-latest): tests/Js/Main/MiscTests.fs#L1160
This rule will never be matched
build-javascript (ubuntu-latest): tests/Js/Main/MiscTests.fs#L382
This and other recursive references to the object(s) being defined will be checked for initialization-soundness at runtime through the use of a delayed reference. This is because you are defining one or more recursive objects, rather than recursive functions. This warning may be suppressed by using '#nowarn "40"' or '--nowarn:40'.
build-javascript (ubuntu-latest): tests/Js/Main/ComparisonTests.fs#L758
This construct causes code to be less generic than indicated by the type annotations. The type variable 'T has been constrained to be type 'int'.
build-javascript (ubuntu-latest): tests/Js/Main/ApplicativeTests.fs#L1703
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Functor has been constrained to be type 'Functor'.
build-javascript (ubuntu-latest): tests/Js/Main/ApplicativeTests.fs#L1086
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Applicative<'T> has been constrained to be type 'Const<'a,Result<'b,int>>'.
build-javascript (ubuntu-latest): tests/Js/Main/ApplicativeTests.fs#L1086
The instantiation of the generic type 'Const' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. 'Const<_,_>'.
build-javascript (ubuntu-latest): tests/Js/Main/ApplicativeTests.fs#L1084
This construct causes code to be less generic than indicated by the type annotations. The type variable 'T has been constrained to be type 'Result<'a,int>'.
analyzers (src/Fable.Transforms/Fable.Transforms.fsproj): tests/Js/Main/ApplicativeTests.fs#L1084
This construct causes code to be less generic than indicated by the type annotations. The type variable 'T has been constrained to be type 'Result<'a,int>'.
analyzers (src/Fable.Transforms/Fable.Transforms.fsproj): tests/Rust/tests/src/ApplicativeTests.fs#L1735
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Functor has been constrained to be type 'Functor'.
analyzers (src/Fable.Transforms/Fable.Transforms.fsproj): tests/Python/TestApplicative.fs#L1653
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Functor has been constrained to be type 'Functor'.
analyzers (src/Fable.Transforms/Fable.Transforms.fsproj): tests/Python/TestApplicative.fs#L1090
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Applicative<'T> has been constrained to be type 'Const<'a,Result<'b,int>>'.
analyzers (src/Fable.Transforms/Fable.Transforms.fsproj): tests/Python/TestApplicative.fs#L1090
The instantiation of the generic type 'Const' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. 'Const<_,_>'.
analyzers (src/Fable.Transforms/Fable.Transforms.fsproj): tests/Python/TestApplicative.fs#L1088
This construct causes code to be less generic than indicated by the type annotations. The type variable 'T has been constrained to be type 'Result<'a,int>'.
analyzers (src/Fable.Transforms/Fable.Transforms.fsproj): src/quicktest-dart/QuickTest.fs#L41
Main module of program is empty: nothing will happen when it is run
analyzers (src/Fable.Transforms/Fable.Transforms.fsproj): tests/React/SpreadSheet.fs#L248
This construct is deprecated. event.keyCode is deprecated see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode for more information
analyzers (src/Fable.Transforms/Fable.Transforms.fsproj): tests/React/SpreadSheet.fs#L248
This construct is deprecated. event.keyCode is deprecated see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode for more information
analyzers (src/Fable.Transforms/Fable.Transforms.fsproj): tests/React/SpreadSheet.fs#L248
This construct is deprecated. event.keyCode is deprecated see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode for more information
build-python (ubuntu-latest, 3.13): tests/Python/TestType.fs#L573
An indexed property's getter and setter must have the same type. Property 'Item' has getter of type 'int' but setter of type 'string'.
build-python (ubuntu-latest, 3.13): tests/Python/TestMisc.fs#L1140
This rule will never be matched
build-python (ubuntu-latest, 3.13): tests/Python/TestApplicative.fs#L1653
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Functor has been constrained to be type 'Functor'.
build-python (ubuntu-latest, 3.13): tests/Python/TestApplicative.fs#L1090
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Applicative<'T> has been constrained to be type 'Const<'a,Result<'b,int>>'.
build-python (ubuntu-latest, 3.13): tests/Python/TestApplicative.fs#L1090
The instantiation of the generic type 'Const' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. 'Const<_,_>'.
build-python (ubuntu-latest, 3.13): tests/Python/TestApplicative.fs#L1088
This construct causes code to be less generic than indicated by the type annotations. The type variable 'T has been constrained to be type 'Result<'a,int>'.
build-python (ubuntu-latest, 3.12): tests/Python/TestType.fs#L573
An indexed property's getter and setter must have the same type. Property 'Item' has getter of type 'int' but setter of type 'string'.
build-python (ubuntu-latest, 3.12): tests/Python/TestMisc.fs#L1140
This rule will never be matched
build-python (ubuntu-latest, 3.12): tests/Python/TestApplicative.fs#L1653
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Functor has been constrained to be type 'Functor'.
build-python (ubuntu-latest, 3.12): tests/Python/TestApplicative.fs#L1090
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Applicative<'T> has been constrained to be type 'Const<'a,Result<'b,int>>'.
build-python (ubuntu-latest, 3.12): tests/Python/TestApplicative.fs#L1090
The instantiation of the generic type 'Const' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. 'Const<_,_>'.
build-python (ubuntu-latest, 3.12): tests/Python/TestApplicative.fs#L1088
This construct causes code to be less generic than indicated by the type annotations. The type variable 'T has been constrained to be type 'Result<'a,int>'.
build-python (ubuntu-latest, 3.14): tests/Python/TestType.fs#L573
An indexed property's getter and setter must have the same type. Property 'Item' has getter of type 'int' but setter of type 'string'.
build-python (ubuntu-latest, 3.14): tests/Python/TestMisc.fs#L1140
This rule will never be matched
build-python (ubuntu-latest, 3.14): tests/Python/TestApplicative.fs#L1653
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Functor has been constrained to be type 'Functor'.
build-python (ubuntu-latest, 3.14): tests/Python/TestApplicative.fs#L1090
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Applicative<'T> has been constrained to be type 'Const<'a,Result<'b,int>>'.
build-python (ubuntu-latest, 3.14): tests/Python/TestApplicative.fs#L1090
The instantiation of the generic type 'Const' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. 'Const<_,_>'.
build-python (ubuntu-latest, 3.14): tests/Python/TestApplicative.fs#L1088
This construct causes code to be less generic than indicated by the type annotations. The type variable 'T has been constrained to be type 'Result<'a,int>'.
build-javascript (windows-latest): tests/Js/Main/NestedAndRecursivePatternTests.fs#L92
Pattern discard is not allowed for union case that takes no data.
build-javascript (windows-latest): tests/Js/Main/NestedAndRecursivePatternTests.fs#L91
Pattern discard is not allowed for union case that takes no data.
build-javascript (windows-latest): tests/Js/Main/NestedAndRecursivePatternTests.fs#L90
Pattern discard is not allowed for union case that takes no data.
build-javascript (windows-latest): tests/Js/Main/MiscTests.fs#L1160
This rule will never be matched
build-javascript (windows-latest): tests/Js/Main/MiscTests.fs#L382
This and other recursive references to the object(s) being defined will be checked for initialization-soundness at runtime through the use of a delayed reference. This is because you are defining one or more recursive objects, rather than recursive functions. This warning may be suppressed by using '#nowarn "40"' or '--nowarn:40'.
build-javascript (windows-latest): tests/Js/Main/ComparisonTests.fs#L758
This construct causes code to be less generic than indicated by the type annotations. The type variable 'T has been constrained to be type 'int'.
build-javascript (windows-latest): tests/Js/Main/ApplicativeTests.fs#L1703
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Functor has been constrained to be type 'Functor'.
build-javascript (windows-latest): tests/Js/Main/ApplicativeTests.fs#L1086
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Applicative<'T> has been constrained to be type 'Const<'a,Result<'b,int>>'.
build-javascript (windows-latest): tests/Js/Main/ApplicativeTests.fs#L1086
The instantiation of the generic type 'Const' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. 'Const<_,_>'.
build-javascript (windows-latest): tests/Js/Main/ApplicativeTests.fs#L1084
This construct causes code to be less generic than indicated by the type annotations. The type variable 'T has been constrained to be type 'Result<'a,int>'.
build-python (windows-latest, 3.13): tests/Python/TestType.fs#L573
An indexed property's getter and setter must have the same type. Property 'Item' has getter of type 'int' but setter of type 'string'.
build-python (windows-latest, 3.13): tests/Python/TestMisc.fs#L1140
This rule will never be matched
build-python (windows-latest, 3.13): tests/Python/TestApplicative.fs#L1653
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Functor has been constrained to be type 'Functor'.
build-python (windows-latest, 3.13): tests/Python/TestApplicative.fs#L1090
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Applicative<'T> has been constrained to be type 'Const<'a,Result<'b,int>>'.
build-python (windows-latest, 3.13): tests/Python/TestApplicative.fs#L1090
The instantiation of the generic type 'Const' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. 'Const<_,_>'.
build-python (windows-latest, 3.13): tests/Python/TestApplicative.fs#L1088
This construct causes code to be less generic than indicated by the type annotations. The type variable 'T has been constrained to be type 'Result<'a,int>'.
build-python (windows-latest, 3.12): tests/Python/TestType.fs#L573
An indexed property's getter and setter must have the same type. Property 'Item' has getter of type 'int' but setter of type 'string'.
build-python (windows-latest, 3.12): tests/Python/TestMisc.fs#L1140
This rule will never be matched
build-python (windows-latest, 3.12): tests/Python/TestApplicative.fs#L1653
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Functor has been constrained to be type 'Functor'.
build-python (windows-latest, 3.12): tests/Python/TestApplicative.fs#L1090
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Applicative<'T> has been constrained to be type 'Const<'a,Result<'b,int>>'.
build-python (windows-latest, 3.12): tests/Python/TestApplicative.fs#L1090
The instantiation of the generic type 'Const' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. 'Const<_,_>'.
build-python (windows-latest, 3.12): tests/Python/TestApplicative.fs#L1088
This construct causes code to be less generic than indicated by the type annotations. The type variable 'T has been constrained to be type 'Result<'a,int>'.
build-python (windows-latest, 3.14): tests/Python/TestType.fs#L573
An indexed property's getter and setter must have the same type. Property 'Item' has getter of type 'int' but setter of type 'string'.
build-python (windows-latest, 3.14): tests/Python/TestMisc.fs#L1140
This rule will never be matched
build-python (windows-latest, 3.14): tests/Python/TestApplicative.fs#L1653
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Functor has been constrained to be type 'Functor'.
build-python (windows-latest, 3.14): tests/Python/TestApplicative.fs#L1090
This construct causes code to be less generic than indicated by the type annotations. The type variable 'Applicative<'T> has been constrained to be type 'Const<'a,Result<'b,int>>'.
build-python (windows-latest, 3.14): tests/Python/TestApplicative.fs#L1090
The instantiation of the generic type 'Const' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. 'Const<_,_>'.
build-python (windows-latest, 3.14): tests/Python/TestApplicative.fs#L1088
This construct causes code to be less generic than indicated by the type annotations. The type variable 'T has been constrained to be type 'Result<'a,int>'.