Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove TypeAlias import workaround #33

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ src = ["src"]
target-version = "py38"

[tool.ruff.lint]
typing-modules = ["_compat"]
typing-modules = ["jsonlogic._compat"]
preview = true
explicit-preview-rules = true
select = [
Expand Down
3 changes: 0 additions & 3 deletions src/jsonlogic/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
from .typing import JSON, JSONLogicPrimitive, JSONObject, OperatorArgument

if TYPE_CHECKING:
# This is a hack to make Pylance think `TypeAlias` comes from `typing`
from typing import TypeAlias

from .evaluation import EvaluationContext
from .registry import OperatorRegistry
from .typechecking import TypecheckContext
Expand Down
3 changes: 0 additions & 3 deletions src/jsonlogic/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
from ._compat import TypeAlias

if TYPE_CHECKING:
# This is a hack to make Pylance think `TypeAlias` comes from `typing`
from typing import TypeAlias

from jsonlogic.core import Operator

JSONPrimitive: TypeAlias = "str | int | float | bool | None"
Expand Down