facebook / facebook/pyrefly

Task: type-check sqlalchemy/test/typing/plain_files successfully

Open
#920 12 comments 3 reactions 0 assignees View on GitHub
sqlalchemy typechecking
Dominant language
Rust
Stars
7k
Forks
516
PR merge metrics
No merged PRs in 30d

Description

SQLAlchemy is a popular library that used to have a mypy plugin but, as of version 2.0, advertises itself as "fully pep-484 compliant" without the plugin. It has a typing test suite at https://github.com/sqlalchemy/sqlalchemy/tree/main/test/typing/plain_files. We should ensure we pass this test suite, so that Pyrefly is usable with SQLAlchemy.

I ran `pyrefly check ~/sqlalchemy/test/typing/plain_files/ --search-path ~/sqlalchemy/lib/ --count-errors=0` to see how many errors we generate today. Note that the `reveal-type` and `unknown-name` errors are due to the tests using `reveal_type` to assert expected types; we should probably create a fork that uses `assert_type` instead.

Error counts:
```
476 instances of reveal-type
476 instances of unknown-name
37 instances of missing-attribute
14 instances of bad-argument-type
10 instances of bad-context-manager
10 instances of bad-specialization
2 instances of missing-argument
2 instances of bad-return
2 instances of index-error
2 instances of no-matching-overload
1 instances of bad-assignment
1 instances of bad-override
INFO 557 errors
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.