Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyi mode #11

Open
DetachHead opened this issue Mar 21, 2024 · 3 comments
Open

pyi mode #11

DetachHead opened this issue Mar 21, 2024 · 3 comments

Comments

@DetachHead
Copy link
Owner

No description provided.

@jorenham jorenham mentioned this issue Oct 27, 2024
@jorenham
Copy link

this is a repost from #29


it can be quite a bit easier to experiment with typing stuff in .pyi stubs than in .py modules, because

future.annotations or stringified annotations aren't needed at all (and illegal according to flake8-pyi in ruff)
typing_extensions and _typeshed are always available
in the same way, you could "install libraries" by putting their stubs in the custom typeshed/stdlib
reveal_locals can be used
in the same way, you could easily add you own builtins (e.g. from basedtyping or optype)
it's could be more obvious for newcomers that there isn't a runtime
locally I've been playing around in .pyi files this way for quite a bit, and I can't think of any downsides

so I think it could be helpful to either completly switch to .pyi, or leave that choice up to the user (url-based might be an easy solution)

@jorenham
Copy link

jorenham commented Oct 27, 2024

I'm guessing that this is the relevant code then

const fileName = 'Untitled.py'

@DetachHead
Copy link
Owner Author

DetachHead commented Oct 27, 2024

yeah i think so, shouldn't be too hard to implement assuming all we need to do is add an option that changes that filename

@DetachHead DetachHead marked this as a duplicate of #32 Feb 1, 2025
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

No branches or pull requests

2 participants