Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 88d2e0c

Browse files
committedSep 19, 2024·
fix Literal import and typos
1 parent 73768b3 commit 88d2e0c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎ninja/orm/metaclass.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import warnings
22
from dataclasses import asdict
3-
from typing import Any, List, Literal, Optional, Type, Union, no_type_check
3+
from typing import Any, List, Optional, Type, Union, no_type_check
44

55
from django.db.models import Model as DjangoModel
66
from pydantic.dataclasses import dataclass
7+
from typing_extensions import Literal
78

89
from ninja.errors import ConfigError
910
from ninja.orm.factory import factory
@@ -13,7 +14,7 @@
1314
@dataclass
1415
class MetaConf:
1516
"""
16-
Mirros the relevant arguments for create_schema
17+
Mirrors the relevant arguments for create_schema
1718
1819
model: Django model being used to create the Schema
1920
fields: List of field names in the model to use. Defaults to '__all__' which includes all fields
@@ -80,7 +81,6 @@ def from_class_namepace(cls, name: str, namespace: dict) -> Union["MetaConf", No
8081

8182
@staticmethod
8283
def from_config(config: Any) -> Union["MetaConf", None]:
83-
# FIXME: deprecate usage of Config to pass ORM options?
8484
confdict = {
8585
"model": getattr(config, "model", None),
8686
"fields": getattr(config, "model_fields", None),

0 commit comments

Comments
 (0)
Please sign in to comment.