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

feat: add mypy typing support #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dan-wilton
Copy link

@dan-wilton dan-wilton commented Sep 1, 2024

Hey, nice implementation of snowflake IDs! 🙌
Thought I'd throw in some mypy support.

  • Renamed the import of datetime to dt to fix datetime() property scope conflict
  • Added mypy dependency with types-requests
  • Enabled strict mypy rule
  • Excluded tests folder from mypy type-checking
  • Added py.typed file to indicate that typing is enabled on this project for consumers
  • Replaced pytest.ini with equivalent pyproject.toml rules

If this is useful, I'm also happy to add in some pre-commit hooks and GitHub workflows?
May also be a good idea to have some linting in place as well - I'm happy to set up ruff in a separate PR if interested?

@vd2org
Copy link
Owner

vd2org commented Sep 12, 2024

Nice work! Please give me some more time to review.

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

Successfully merging this pull request may close these issues.

2 participants