danielfm / pybreaker

Python implementation of the Circuit Breaker pattern.
BSD 3-Clause "New" or "Revised" License
508 stars 74 forks source link

Add py.typed file (PEP 561) #86

Closed martijnthe closed 8 months ago

martijnthe commented 8 months ago

Summary

Mypy only considers the type annotations of packages that contain the py.typed marker file, even if they are fully type-annotated (like pybreaker). See https://peps.python.org/pep-0561/

This PR adds said file.

I had to move pybreaker into a module instead of a single .py file, because there is no support for py.typed files for single .py file packages yet (see https://github.com/python/typing/issues/1333).

This solves https://github.com/danielfm/pybreaker/issues/84

Test Plan

danielfm commented 8 months ago

Hey, thanks for the contribution!