Repository navigation
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Milestone
Description
Describe the Bug
I am trying to set up a maximally strict pyrefly config. For that i use this:
[tool.pyrefly]
project-includes = ["src"]
project-excludes = ["tests"]
preset = "strict"
infer-with-first-use = true
[tool.pyrefly.errors]
implicit-abstract-class = "error"
missing-source = "error"
not-required-key-access = "error"
open-unpacking = "error"
unannotated-return = "error"
deprecated = "error"
implicit-import = "error"
non-exhaustive-match = "error"
redundant-cast = "error"
redundant-condition = "error"
unnecessary-comparison = "error"
unnecessary-type-conversion = "error"
unreachable = "error"
unreachable-match-case = "error"
unresolvable-dunder-all = "error"
untyped-import = "error"
variance-mismatch = "error"
However when i run pyrefly check i get this error
$ pyrefly check
WARN Config at `.../pyproject.toml` failed to parse, checking with default configuration
ERROR .../pyproject.toml: TOML parse error at line 197, column 1
|
197 | [tool.pyrefly]
| ^^^^^^^^^^^^^^
unknown variant `unreachable-match-case`, expected one of `abstract-method-call`, `annotation-mismatch`, `assert-type`, `bad-argument-count`, `bad-argument-type`, `bad-assignment`, `bad-class-definition`, `bad-context-manager`, `bad-dunder-all`, `bad-function-definition`, `bad-index`, `bad-instantiation`, `bad-keyword-argument`, `bad-match`, `bad-override`, `bad-override-mutable-attribute`, `bad-override-param-name`, `bad-param-name-override`, `bad-raise`, `bad-return`, `bad-specialization`, `bad-typed-dict`, `bad-typed-dict-key`, `bad-unpacking`, `deprecated`, `division-by-zero`, `implicit-abstract-class`, `implicit-any`, `implicit-any-attribute`, `implicit-any-empty-container`, `implicit-any-parameter`, `implicit-any-type-argument`, `implicit-import`, `implicitly-defined-attribute`, `incompatible-overload-residual`, `inconsistent-inheritance`, `inconsistent-overload`, `inconsistent-overload-default`, `internal-error`, `invalid-annotation`, `invalid-argument`, `invalid-decorator`, `invalid-inheritance`, `invalid-literal`, `invalid-overload`, `invalid-param-spec`, `invalid-pattern`, `invalid-self-type`, `invalid-super-call`, `invalid-syntax`, `invalid-type-alias`, `invalid-type-var`, `invalid-type-var-tuple`, `invalid-variance`, `invalid-yield`, `missing-argument`, `missing-attribute`, `missing-import`, `missing-module-attribute`, `missing-override-decorator`, `missing-source`, `missing-source-for-stubs`, `name-mismatch`, `no-access`, `no-matching-overload`, `non-convergent-recursion`, `non-exhaustive-match`, `not-a-type`, `not-async`, `not-callable`, `not-iterable`, `not-required-key-access`, `open-unpacking`, `parse-error`, `protocol-implicitly-defined-attribute`, `read-only`, `redefinition`, `redundant-cast`, `redundant-condition`, `reveal-type`, `unannotated-attribute`, `unannotated-parameter`, `unannotated-protocol-member`, `unannotated-return`, `unbound-name`, `unexpected-keyword`, `unexpected-positional-argument`, `unimported-directive`, `unknown-name`, `unnecessary-comparison`, `unnecessary-type-conversion`, `unreachable`, `unresolvable-dunder-all`, `unsafe-overlap`, `unsupported`, `unsupported-delete`, `unsupported-operation`, `untyped-import`, `unused-coroutine`, `unused-ignore`, `variance-mismatch`
Fatal configuration error
Despite the docs clearly mentioning this confirugation option: https://pyrefly.org/en/docs/error-kinds/#unreachable-match-case
I am on version 1.0.0
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response
Reacted by DetachHead and SpacedOut64
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Activity
rchen152 commentedon May 15, 2026
Thanks for the report! Looks like what happened is that the commit splitting
unreachable-match-caseout ofunreachablejust barely didn't make it into 1.0.0 (6aa1e50), and the docs are ahead of the release. For now, just usingunreachable = "error"in your config is sufficient.JanEricNitschke commentedon May 15, 2026
Thanks for the reply, thats what i had assumed. I think the same happend with "pyrefly report" which was renamed just after the release to "pyrefly coverage report".
rchen152 commentedon May 19, 2026
Thanks! I corrected the documentation for
unreachable-match-case; I'll fix uppyrefly coverage reportas well.Mark `unreachable-match-case` as not yet available in the current pyr…