-
Notifications
You must be signed in to change notification settings - Fork 297
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
Mark packages as typed #305
Comments
Yes, that should definitely be possible. Would you be up for setting up a PR? We could also add mypy checks in the same PR. |
# change advances #305 - replace `flake8` with `ruff` and install `pre-commit` - run linters as part of a separate job (to separate linting from testing) - add a draft of `mypy` setup but not try to fix stuff because it's a complicated procedure to fix everything - this PR already reformatted a lot of code --------- Co-authored-by: Balint Bartha <totallyzen@users.noreply.github.com> Co-authored-by: David Ankin <daveankin@gmail.com>
Does anyone know off hand whether this one was ever resolved? I'm kind of a Python noob and was trying to add type checking on a project's tests. I got almost all of it working, except for testcontainers:
Looking in the file I'm using, it is typed, but I think the problem is that it's not declaring itself as such. Fixing this might be as simple as adding a |
there is a pr here but its not a top priority: #504 - almost immediately after i opened there were two pr's with minor typing fixes that conflicted with it, and i did not rebase in time. at this point it would be not only harder to rebase but also there are new modules that need types/mypy checking. contributions would be accepted for it. |
Thanks. My Python skills are such that I'm already having enough trouble just wrangling types in one much smaller package so I don't think I'll try my hand at this yet, but it's good to know I'm not missing something. In case this helps anyone else, here's a block that can be placed in # testcontainers is typed, but it doesn't correctly declare itself as such.
# Hopefully it can be fixed one day:
#
# https://github.com/testcontainers/testcontainers-python/issues/305
[mypy-testcontainers.*]
ignore_missing_imports = True |
Lets try and continue the journey from #305 (the goal is to get core marked as typed) ``` poetry run mypy --config-file pyproject.toml core/tests/test_auth.py core/testcontainers/core/auth.py Success: no issues found in 2 source files ```
Describe the bug
Mypy is failing because the packages aren't marked as typed (missing
py.typed
file), but it seems that most of the packages have the type definitions.Could the packages be marked as typed ?
To Reproduce
The text was updated successfully, but these errors were encountered: