Skip to content

Commit

Permalink
pass tests for 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
drkane committed Jul 9, 2023
1 parent 920d680 commit ada9674
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/ixbrlparse/components/_base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from copy import deepcopy
from datetime import date
from typing import List, Optional, Union
from typing import List, Optional, Tuple, Union


class ixbrlFormat: # noqa: N801
Expand All @@ -11,7 +11,7 @@ class ixbrlFormat: # noqa: N801
Attributes:
format_names: A tuple of format names that this class should be used for."""

format_names: tuple[str, ...] = ()
format_names: Tuple[str, ...] = ()

def __init__(
self,
Expand Down
4 changes: 2 additions & 2 deletions src/ixbrlparse/components/formats.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import datetime
import re
import warnings
from typing import Optional, Type, Union
from typing import Optional, Tuple, Type, Union

from ixbrlparse.components._base import ixbrlFormat
from ixbrlparse.hookspecs import hookimpl
Expand Down Expand Up @@ -118,7 +118,7 @@ class ixtNumDotDecimal(ixbrlFormat): # noqa: N801


class ixtDateFormat(ixbrlFormat): # noqa: N801
format_names = ()
format_names: Tuple[str, ...] = ()
date_format = "%Y-%m-%d"

def parse_value(self, value: Union[str, int, float]) -> Optional[datetime.date]:
Expand Down
2 changes: 1 addition & 1 deletion src/ixbrlparse/components/nonnumeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(
self.context = context
self.format: Optional[ixbrlFormat] = None
self.text: Optional[str] = value
self.value = value
self.value: Optional[int | float | date | None | str] = value
if isinstance(format_, str) and format_ != "" and self.text is not None:
try:
self.format = get_format(format_)(format_=format_)
Expand Down

0 comments on commit ada9674

Please sign in to comment.