Skip to content

Commit

Permalink
Replace numbers.Number with Union[int, float]
Browse files Browse the repository at this point in the history
  • Loading branch information
Fatal1ty committed Apr 14, 2023
1 parent b54c092 commit 1f68e7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions mashumaro/jsonschema/annotations.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from dataclasses import dataclass
from numbers import Number
from typing import Dict, Set

from mashumaro.jsonschema.models import JSONSchema
from mashumaro.jsonschema.models import JSONSchema, Number


class Annotation:
Expand Down
6 changes: 4 additions & 2 deletions mashumaro/jsonschema/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
import ipaddress
from dataclasses import MISSING, dataclass, field
from enum import Enum
from numbers import Number
from typing import Any, Dict, List, Optional, Set, Union
from typing import Any, Dict, List, Optional, Set, TypeAlias, Union

from mashumaro.config import BaseConfig
from mashumaro.helper import pass_through
Expand All @@ -17,6 +16,9 @@
from mashumaro.mixins.json import DataClassJSONMixin # type: ignore


# https://github.com/python/mypy/issues/3186
Number: TypeAlias = Union[int, float]

Null = object()


Expand Down

0 comments on commit 1f68e7d

Please sign in to comment.