Skip to content
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
1 change: 0 additions & 1 deletion examples/runner.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import sys
import typing


if sys.version_info[:3] < (3, 12, 0):
print("examples require at least Python 3.12")
sys.exit(1)
Expand Down
1 change: 0 additions & 1 deletion examples/type_statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from serde import serde


type Baz = tuple[float, float]
type Bar = tuple[Baz, ...]

Expand Down
10 changes: 2 additions & 8 deletions tests/test_toml.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,15 @@ class Foo:
b: int | None

f = Foo(10, 100)
assert (
to_toml(f)
== """\
assert to_toml(f) == """\
a = 10
b = 100
"""
)

f = Foo(10, None)
assert (
to_toml(f)
== """\
assert to_toml(f) == """\
a = 10
"""
)


def test_skip_none_container_not_supported_yet() -> None:
Expand Down
1 change: 0 additions & 1 deletion tests/test_type_alias.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from serde import serde, from_dict, to_dict


try:
from typing import TypeAliasType
except ImportError: # pragma: no cover
Expand Down
10 changes: 2 additions & 8 deletions tests/test_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,15 @@ class Foo:
b: int | None

f = Foo(10, 100)
assert (
to_yaml(f, skip_none=True)
== """\
assert to_yaml(f, skip_none=True) == """\
a: 10
b: 100
"""
)

f = Foo(10, None)
assert (
to_yaml(f, skip_none=True)
== """\
assert to_yaml(f, skip_none=True) == """\
a: 10
"""
)


def test_coerce_numbers_yaml() -> None:
Expand Down