Describe the Bug
I copied some config over from mypy into my pyproject.toml and wrote python_version instead of the python-version that pyrefly expects. The key was silently ignored, so I spent a while confused about why my Python version setting had no effect. A warning would have caught it immediately.
I think this would also make pyrefly more internally consistent: an unknown error kind already fails to parse (e.g. unknown variant 'unreachable-match-case'), but an unknown top-level key is silently dropped. It looks like the top-level config struct doesn't reject unknown fields the way the error-kinds enum does.
I'd suggest a warning rather than a hard error — that catches typos without breaking configs shared across pyrefly versions (e.g. a newer key being read by an older binary).
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response
Describe the Bug
I copied some config over from mypy into my
pyproject.tomland wrotepython_versioninstead of thepython-versionthat pyrefly expects. The key was silently ignored, so I spent a while confused about why my Python version setting had no effect. A warning would have caught it immediately.I think this would also make pyrefly more internally consistent: an unknown error kind already fails to parse (e.g.
unknown variant 'unreachable-match-case'), but an unknown top-level key is silently dropped. It looks like the top-level config struct doesn't reject unknown fields the way the error-kinds enum does.I'd suggest a warning rather than a hard error — that catches typos without breaking configs shared across pyrefly versions (e.g. a newer key being read by an older binary).
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response