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

Request: type hints (e.g. for mypy) #1276

Closed
jamesbraza opened this issue Nov 8, 2023 · 3 comments
Closed

Request: type hints (e.g. for mypy) #1276

jamesbraza opened this issue Nov 8, 2023 · 3 comments

Comments

@jamesbraza
Copy link

Is your feature request related to a problem? Please describe.

I run mypy on my code, and it's throwing errors for not being typed:

a.py:19:1: error: Skipping analyzing "socketio": module is installed, but missing library stubs or py.typed marker  [import-untyped]
    from socketio import Client
    ^

Describe the solution you'd like

Type hints to be added to the repo, or alternately a type stub package to be installable.

Describe alternatives you've considered

Disabling mypy for python-socketio like the below pyproject.toml config:

[[tool.mypy.overrides]]
# Suppresses error messages about imports that cannot be resolved.
ignore_missing_imports = true
# Per-module configuration options
module = ["socketio.*"]
@miguelgrinberg
Copy link
Owner

Unfortunately I do not have the time to maintain type hints on all my packages at this time. Once the typing solution in Python becomes more manageable I will consider doing it, but for now my suggestion is that you contribute a stub package to typeshed.

@miguelgrinberg miguelgrinberg closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2023
@andy-takker
Copy link

@miguelgrinberg Hello, can I create PR with adding typehints for this project?

@miguelgrinberg
Copy link
Owner

miguelgrinberg commented Feb 3, 2024

My answer hasn't changed. You are welcome to contribute type hints for this package to typeshed.

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

3 participants