Skip to content

Commit

Permalink
fix: 3.10 incompatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravencentric committed Feb 3, 2025
1 parent 251466d commit ed6b365
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/nzb/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,23 @@
from datetime import datetime
from functools import cached_property
from os.path import splitext
from typing import dataclass_transform
from typing import TYPE_CHECKING

from msgspec import Struct

from nzb._utils import name_is_par2, name_is_rar, stem_is_obfuscated

if TYPE_CHECKING:
from typing_extensions import dataclass_transform

# https://github.com/jcrist/msgspec/issues/657
@dataclass_transform(frozen_default=True)
class Base(Struct, frozen=True, eq=True, cache_hash=True, dict=True):
pass
# https://github.com/jcrist/msgspec/issues/657
@dataclass_transform(frozen_default=True)
class Base(Struct, frozen=True, eq=True, cache_hash=True, dict=True):
pass
else:

class Base(Struct, frozen=True, eq=True, cache_hash=True, dict=True):
pass


class Meta(Base, kw_only=True):
Expand Down

0 comments on commit ed6b365

Please sign in to comment.