Skip to content

Commit

Permalink
Fix some typing import & Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
MrThearMan committed Jan 13, 2024
1 parent 3b17b0b commit 1691d03
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ body:
If you are not using the latest version, please try to also reproduce the bug
on the latest version before opening the issue.
options:
- "0.1.2"
- "0.1.1"
- "0.1.0"
- "0.0.9"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "graphene-django-query-optimizer"
version = "0.1.1"
version = "0.1.2"
description = "Automatically optimize SQL queries in Graphene-Django schemas."
authors = [
"Matti Lamppu <[email protected]>",
Expand Down
8 changes: 4 additions & 4 deletions query_optimizer/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
from typing_extensions import TypeAlias, TypeGuard


from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation
from django.core.handlers.wsgi import WSGIRequest
from django.db.models import (
Field,
Expand All @@ -41,6 +40,7 @@

if TYPE_CHECKING:
from django.contrib.auth.models import AnonymousUser, User
from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation

__all__ = [
"Any",
Expand Down Expand Up @@ -72,9 +72,9 @@
StoreStr: TypeAlias = str
PK: TypeAlias = Any
QueryCache: TypeAlias = dict[TableName, dict[StoreStr, dict[PK, TModel]]]
ModelField: TypeAlias = Union[Field, ForeignObjectRel, GenericForeignKey]
ToManyField: TypeAlias = Union[GenericRelation, ManyToManyField, ManyToOneRel, ManyToManyRel]
ToOneField: TypeAlias = Union[GenericRelation, ForeignObject, ForeignKey, OneToOneField]
ModelField: TypeAlias = Union[Field, ForeignObjectRel, "GenericForeignKey"]
ToManyField: TypeAlias = Union["GenericRelation", ManyToManyField, ManyToOneRel, ManyToManyRel]
ToOneField: TypeAlias = Union["GenericRelation", ForeignObject, ForeignKey, OneToOneField]
TypeOptions: TypeAlias = Union[DjangoObjectTypeOptions, ConnectionOptions]
AnyUser: TypeAlias = Union["User", "AnonymousUser"]

Expand Down

0 comments on commit 1691d03

Please sign in to comment.