Skip to content

Check in stubs folder. Closes #46.#66

Merged
erikrose merged 2 commits into
mainfrom
erik/commit-stubs
Apr 1, 2026
Merged

Check in stubs folder. Closes #46.#66
erikrose merged 2 commits into
mainfrom
erik/commit-stubs

Conversation

@erikrose
Copy link
Copy Markdown
Member

I figure putting this in testing/ suggests what it's supposed to be used for. And we'll document it, of course.

It not being an importable package, it won't inflate any built components.

I figure putting this in `testing/` suggests what it's supposed to be used for. And we'll document it, of course.
@erikrose erikrose requested a review from posborne March 31, 2026 20:35
Copy link
Copy Markdown
Member

@posborne posborne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Including the stubs make sense to me; I lean toward including them at fastly_compute/stubs if it doesn't cause issues since use of stubs may not strictly be a testing concern.

The stubs/ directory within a package is a somewhat convention within mypy: https://mypy.readthedocs.io/en/stable/stubs.html. I need to read up on PEP 561 in some more details. https://peps.python.org/pep-0561/

It's easy enough to move the directory if we change our mind after reading a bit more, so I'm OK with moving this forward as-is.

@erikrose
Copy link
Copy Markdown
Member Author

erikrose commented Apr 1, 2026

PEP 561 and the mypy page refer to old-style stubs, which externally supplied type info to libs that didn't ship with their own annotations. They had .pyi extensions.

But yeah, anywhere reasonable within the package is fine with me. We don't really have to solidify the decision until beta. Thanks for the quick review!

@erikrose erikrose merged commit 4cfa94f into main Apr 1, 2026
4 checks passed
@erikrose erikrose deleted the erik/commit-stubs branch April 1, 2026 00:34
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.

2 participants