diff --git a/pyproject.toml b/pyproject.toml index 39b18f23104..5a0b55ee930 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -158,6 +158,7 @@ translations = [ ] types = [ "mypy==1.15.0", + "pyrefly", "pyright==1.1.400", { include-group = "type-stubs" }, ] diff --git a/pyrefly.toml b/pyrefly.toml new file mode 100644 index 00000000000..88ccae4d84c --- /dev/null +++ b/pyrefly.toml @@ -0,0 +1,27 @@ +# Configuration file for Pyrefly_. +# n.b. Pyrefly is early in development. +# Sphinx's current primary/reference type-checker is mypy. +# +# .. _Pyrefly: https://pyrefly.org/en/docs/configuration/ + +project_includes = [ + "doc/conf.py", + "doc/development/tutorials/examples/autodoc_intenum.py", + "doc/development/tutorials/examples/helloworld.py", + "sphinx", + "tests", + "utils", +] +project_excludes = [ + "**/tests/roots*", +] +python_version = "3.11" +replace_imports_with_any = [ + "imagesize", + "pyximport", + "snowballstemmer", +] + +# https://pyrefly.org/en/docs/error-kinds/ +[errors] +implicitly-defined-attribute = false # many false positives