Skip to content

feat: add type hints #130

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

Merged
merged 3 commits into from
Jul 5, 2023
Merged

feat: add type hints #130

merged 3 commits into from
Jul 5, 2023

Conversation

miketheman
Copy link
Member

  • (separate commit) Refactor to clean up type errors in linehaul/events/parser.py
  • Add type hint to the one public interface for user agent parsing.
  • Add testing step to CI
  • Include type marker in package
  • Set classifier metadata

Resolves #123

Signed-off-by: Mike Fiedler [email protected]

The camelCase functions have been marked as deprecated.
Replace with equivalent snake_case functions.

Move `set_name()` assignments to their parent `Word` when possible,
to address a type error since `set_results_name()` emits a `ParserElement`,
not a `Word`.

Signed-off-by: Mike Fiedler <[email protected]>
- Add type hint to the one public interface for user agent parsing.
- Add testing step to CI
- Include type marker in package
- Set classifier metadata

Signed-off-by: Mike Fiedler <[email protected]>
@di di merged commit 47ede61 into pypi:main Jul 5, 2023
@miketheman miketheman deleted the mypy branch July 6, 2023 14:01
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.

Feature request: Add type hints to parser (and library)
2 participants