remove methods that don't apply
This commit is contained in:
parent
ddd733282a
commit
5ff5dc3415
@ -3,7 +3,6 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import dataclasses
|
import dataclasses
|
||||||
import json
|
|
||||||
import sys
|
import sys
|
||||||
from datetime import date, datetime
|
from datetime import date, datetime
|
||||||
from typing import Any, NoReturn, TypeVar, Union, overload
|
from typing import Any, NoReturn, TypeVar, Union, overload
|
||||||
@ -201,22 +200,6 @@ class LiteralDatetimeVar(LiteralVar, DateTimeVar):
|
|||||||
|
|
||||||
_var_value: datetime | date = dataclasses.field(default=datetime.now())
|
_var_value: datetime | date = dataclasses.field(default=datetime.now())
|
||||||
|
|
||||||
def json(self) -> str:
|
|
||||||
"""Return the JSON representation of the datetime.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
The JSON representation of the datetime.
|
|
||||||
"""
|
|
||||||
return json.dumps(self._var_value)
|
|
||||||
|
|
||||||
def __hash__(self) -> int:
|
|
||||||
"""Calculate the hash value of the object.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
int: The hash value of the object.
|
|
||||||
"""
|
|
||||||
return hash((self.__class__.__name__, self._var_value))
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(cls, value: datetime | date, _var_data: VarData | None = None):
|
def create(cls, value: datetime | date, _var_data: VarData | None = None):
|
||||||
"""Create a new instance of the class.
|
"""Create a new instance of the class.
|
||||||
|
Loading…
Reference in New Issue
Block a user