Skip to content

Modernize type hints to use Python 3.9+ syntax#136

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/daily-code-improvements-a2d3
Draft

Modernize type hints to use Python 3.9+ syntax#136
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/daily-code-improvements-a2d3

Conversation

@cursor
Copy link
Copy Markdown
Contributor

@cursor cursor Bot commented May 9, 2026

This PR modernizes the codebase to use Python 3.9+ built-in generic types instead of the typing module:

Changes:

  • Replace List[T] with list[T] in utils.py
  • Replace Optional[T] with T | None in linkedin.py
  • Remove unused imports from the typing module

Benefits:

  • Cleaner, more readable code
  • Uses built-in generic types (available since Python 3.9)
  • Reduces dependency on the typing module
  • Aligns with modern Python best practices

The Dockerfile already uses Python 3.11, so this change is compatible with the project's requirements.

Open in Web View Automation 

- Replace List[T] with list[T] in utils.py
- Replace Optional[T] with T | None in linkedin.py
- Remove unused imports from typing module
- Improves code readability and uses built-in generic types

Co-authored-by: Ongun Demirag <ongun@ongundemirag.com>
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