Skip to content

Commit

Permalink
Adds py.typed marker. Makes translation protocol more lenient.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daverball committed Dec 27, 2023
1 parent 5595c1f commit 83fc1af
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ def run_tests(self):
packages=find_packages('src'),
package_dir={'': 'src'},
include_package_data=True,
package_data={
'chameleon': [
'py.typed',
],
},
python_requires='>=3.9',
install_requires=install_requires,
extras_require={
Expand Down
Empty file added src/chameleon/py.typed
Empty file.
5 changes: 2 additions & 3 deletions src/chameleon/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
if TYPE_CHECKING:
from collections.abc import Callable
from collections.abc import Collection
from collections.abc import Mapping

from typing_extensions import TypeAlias

Expand Down Expand Up @@ -41,7 +40,7 @@ def __call__(
msgid: str,
*,
domain: str | None = None,
mapping: Mapping[str, object] | None = None,
mapping: dict[str, Any] | None = None,
default: str | None = None,
context: str | None = None
) -> str: ...
Expand All @@ -53,7 +52,7 @@ def __call__(
msgid: str,
*,
domain: str | None = None,
mapping: Mapping[str, object] | None = None,
mapping: dict[str, Any] | None = None,
default: str | None = None,
context: str | None = None,
target_language: str | None = None
Expand Down

0 comments on commit 83fc1af

Please sign in to comment.