Skip to content

Add type hints and PEP 561 compliance for improved IDE support#31

Open
HyperNaser wants to merge 3 commits into
serpapi:masterfrom
HyperNaser:feat/add-type-support
Open

Add type hints and PEP 561 compliance for improved IDE support#31
HyperNaser wants to merge 3 commits into
serpapi:masterfrom
HyperNaser:feat/add-type-support

Conversation

@HyperNaser

Copy link
Copy Markdown

Description

This PR introduces explicit static typing infrastructure to comply with PEP 561. It adds the missing py.typed marker file and comprehensive type annotations to allow modern IDE type checkers to correctly resolve types without throwing missing stub errors.

Changes

  • Added an empty py.typed marker file to the serpapi/ directory.
  • Updated pyproject.toml configuration to package the type markers.
  • Added type hints to core modules (http.py, models.py, core.py, textui.py, exceptions.py)
  • Refactored textui.py to use get_lexer_by_name("JSON")

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.

1 participant