Skip to content

Conversation

@audy
Copy link
Contributor

@audy audy commented Jan 15, 2026

Adds NeedletailError to the type stub file so static analyzers can find it:

# asdf.py
import needletail

raise needletail.NeedletailError

before

$ty check asdf.py
WARN ty is pre-release software and not ready for production use. Expect to encounter bugs, missing features, and fatal errors.
error[unresolved-attribute]: Type `<module 'needletail'>` has no attribute `NeedletailError`
 --> asdf.py:4:7
  |
2 | import needletail
3 |
4 | raise needletail.NeedletailError
  |       ^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
info: rule `unresolved-attribute` is enabled by default

after

ty check asdf.py
WARN ty is pre-release software and not ready for production use. Expect to encounter bugs, missing features, and fatal errors.
All checks passed!

@audy audy merged commit b30764f into master Jan 15, 2026
34 checks passed
@audy audy deleted the audy/add-needletail-error-to-pyi branch January 15, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants