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

tooling: generate some type stubs #709

Merged
merged 1 commit into from
Aug 25, 2024
Merged

tooling: generate some type stubs #709

merged 1 commit into from
Aug 25, 2024

Conversation

dbarnett
Copy link
Collaborator

Use mypy stubgen tool
(https://mypy.readthedocs.io/en/stable/stubgen.html) to generate a few stubs for types used in the project in place of "# type: ignore" overrides.

General approach:

  1. run stubgen -o stubs -m some.module
  2. check for errors by running tox -e type
  3. curate pyi files to fix errors (delete conflicting types, etc)

Use mypy stubgen tool
(https://mypy.readthedocs.io/en/stable/stubgen.html) to generate a few
stubs for types used in the project in place of "# type: ignore"
overrides.

General approach:
  1. run `stubgen -o stubs -m some.module`
  2. check for errors by running `tox -e type`
  3. curate pyi files to fix errors (delete conflicting types, etc)
@dbarnett dbarnett added the development Internal issues that mostly affect maintainers vs. end users label Aug 25, 2024
@@ -40,6 +40,9 @@ Repository = "https://github.com/insanum/gcalcli"
[project.optional-dependencies]
vobject = ["vobject"]

[tool.setuptools]
packages = ["gcalcli"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

FYI this is needed because package paths are ambiguous after adding a top-level stubs/ dir.

@dbarnett dbarnett merged commit af1c1f3 into master Aug 25, 2024
16 checks passed
@dbarnett dbarnett deleted the stubs branch August 25, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Internal issues that mostly affect maintainers vs. end users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant