Skip to content

Commit

Permalink
fix Literal import and typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Ksauder committed Sep 19, 2024
1 parent 73768b3 commit 88d2e0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ninja/orm/metaclass.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import warnings
from dataclasses import asdict
from typing import Any, List, Literal, Optional, Type, Union, no_type_check
from typing import Any, List, Optional, Type, Union, no_type_check

from django.db.models import Model as DjangoModel
from pydantic.dataclasses import dataclass
from typing_extensions import Literal

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

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

0 comments on commit 88d2e0c

Please sign in to comment.