You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #55 (opt-in typecheck step, pyrefly). While dogfooding pyrefly on forge's source we learned two things:
1. pyrefly's default basic preset is too weak to be useful
On basic it reported only 12 false positives (interrogate's attrs-generated InterrogateConfig.__init__) and missed a real bug (the tokenize.TokenizeError AttributeError, fixed separately). Enabling typecheck on forge needs a strict pyrefly.toml (untyped-def-behavior = "check-and-infer-return-type"), not the default.
2. Strict run surfaced real findings to triage
Excluding the 12 interrogate false positives, strict pyrefly reports (need individual verification — some may be guarded/false):
DocstringVerifier passes str | None where str expected ×3 (Optional not narrowed)
ast.get_docstring(AST) / jsonschema iter_errors arg types (may be stub-driven)
3. interrogate false positives need silencing
pyrefly can't see attrs-generated __init__ kwargs. A pyrefly.toml should ignore unexpected-keyword for the interrogate import (or treat interrogate as untyped) so the 12 FPs don't drown real signal.
Follow-up to #55 (opt-in
typecheckstep, pyrefly). While dogfooding pyrefly on forge's source we learned two things:1. pyrefly's default
basicpreset is too weak to be usefulOn
basicit reported only 12 false positives (interrogate's attrs-generatedInterrogateConfig.__init__) and missed a real bug (thetokenize.TokenizeErrorAttributeError, fixed separately). Enabling typecheck on forge needs a strictpyrefly.toml(untyped-def-behavior = "check-and-infer-return-type"), not the default.2. Strict run surfaced real findings to triage
Excluding the 12 interrogate false positives, strict pyrefly reports (need individual verification — some may be guarded/false):
DocstringVerifierpassesstr | Nonewherestrexpected ×3 (Optional not narrowed)CheckResult(detail=str | None)wherestrexpected-> boolfunction can returnlist[stmt]_bad_scan_paths(paths)receivesobjectfromcfg.get("paths")(precommit.py — new in feat(precommit): pluggable step framework + doctest/typecheck/doc-consistency steps #55; dynamic-config typing gap)ast.get_docstring(AST)/ jsonschemaiter_errorsarg types (may be stub-driven)3. interrogate false positives need silencing
pyrefly can't see attrs-generated
__init__kwargs. Apyrefly.tomlshould ignoreunexpected-keywordfor the interrogate import (or treat interrogate as untyped) so the 12 FPs don't drown real signal.Scope when picked up
pyrefly.tomldev/setup.sh→ install[dev](so forge's env has pyrefly) — may already land via feat(precommit): pluggable step framework + doctest/typecheck/doc-consistency steps #55[tool.forge.precommit] enable = ["typecheck"]on forge, non-blockingdocs/release-process-style notes if the gate becomes blocking laterRequires: #55 to merge first.