Skip to content

Use modern typing (PEP 585/604) for annotations#194

Open
Rotzbua wants to merge 1 commit intoweb-push-libs:mainfrom
Rotzbua:feat_modern_typing
Open

Use modern typing (PEP 585/604) for annotations#194
Rotzbua wants to merge 1 commit intoweb-push-libs:mainfrom
Rotzbua:feat_modern_typing

Conversation

@Rotzbua
Copy link
Contributor

@Rotzbua Rotzbua commented Feb 8, 2026

Description

Migrate old typing to modern. E.g. Dict to dict.

Testing

Run test.

Issue(s)

related to #27

Copilot AI review requested due to automatic review settings February 8, 2026 14:32
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes type annotations across pywebpush to use PEP 585 (dict[...]) and PEP 604 (X | Y) syntax, aligning the codebase with the project’s Python >= 3.10 requirement.

Changes:

  • Replaced legacy typing.Dict/typing.Union annotations with built-in generics and | unions in library code.
  • Updated similar claim typing in tests to match modern annotation style.
  • Minor docstring whitespace cleanup.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
pywebpush/__init__.py Migrates public API and internal method annotations to modern typing syntax.
pywebpush/tests/test_webpush.py Updates test typing for VAPID claim dictionaries to modern syntax.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Rotzbua Rotzbua force-pushed the feat_modern_typing branch from 951c5c5 to bca56fb Compare February 8, 2026 14:42
@Rotzbua Rotzbua force-pushed the feat_modern_typing branch from bca56fb to 2cb3de0 Compare February 8, 2026 14:48
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