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

Add py.typed file to indicate type hints #8

Closed
simonw opened this issue Aug 28, 2023 · 4 comments
Closed

Add py.typed file to indicate type hints #8

simonw opened this issue Aug 28, 2023 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@simonw
Copy link
Owner

simonw commented Aug 28, 2023

I had to add this to mypy.ini in LLM:

[mypy-sqlite_migrate.*]
ignore_missing_imports = True
@simonw simonw added the enhancement New feature or request label Aug 28, 2023
@simonw
Copy link
Owner Author

simonw commented Mar 13, 2024

It has type hints, and mypy is running in CI:

- name: Run linters
run: |
mypy sqlite_migrate tests
black --check .
ruff .

I think it just needs a sqlite_migrate/py.typed empty file.

simonw added a commit that referenced this issue Mar 13, 2024
@simonw
Copy link
Owner Author

simonw commented Mar 13, 2024

I'm going to remove that ignore_missing_imports = True from the LLM mypy.ini file and see if everything passes both before and after this change.

@simonw
Copy link
Owner Author

simonw commented Mar 13, 2024

Huh, I can't recreate the original bug - even if I remove this from mypy.ini in LLM:

[mypy-sqlite_migrate.*]
ignore_missing_imports = True

I can run mypy llm without any errors.

@simonw
Copy link
Owner Author

simonw commented Mar 13, 2024

I added that to the mypy.ini file there in simonw/llm@77cf56e#diff-6f2d4ba9ca9a357d31014946667b7bed1bfdbc6d2530afc77778fa0a36bee457 on Aug 27, 2023 - depending directly on sqlite-migrate which at the time was on version 0.1a1 https://github.com/simonw/sqlite-migrate/releases/0.1a1

But even that version had the type annotations: https://github.com/simonw/sqlite-migrate/blob/0.1a1/sqlite_migrate/__init__.py - and very few changes relating to them since then: 0.1a1...9830fcd#diff-73f939eb448b54b735ba472874215bcb06c30756488c8210a9b64de7ac0bf92f

So I'm not able to replicate the reason I opened this issue.

I don't want to spend more time on this so I'll chalk it up to mystery and add the py.typed file and move on.

@simonw simonw closed this as completed Mar 13, 2024
@simonw simonw changed the title Add type hints Add py.typed file to indicate type hints Mar 13, 2024
@simonw simonw added this to the 0.1 milestone Mar 13, 2024
simonw added a commit to simonw/llm that referenced this issue Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant