Skip to content

Commit

Permalink
workaround false-positive stubtest errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenham committed Nov 23, 2024
1 parent 200bd49 commit af2c458
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scipy-stubs/io/arff/_arffread.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ArffError(OSError): ...
class ParseArffError(ArffError): ...

class Attribute(Generic[_T_co], metaclass=abc.ABCMeta):
type_name: ClassVar[str]
type_name: ClassVar[str | None]
dtype: Any
range: Any

Expand All @@ -41,7 +41,7 @@ class Attribute(Generic[_T_co], metaclass=abc.ABCMeta):
def parse_data(self, /, data_str: str) -> _T_co: ...

class NominalAttribute(Attribute[str]):
type_name: ClassVar[str] = "nominal"
type_name: ClassVar[str | None] = "nominal"
dtype: tuple[type[np.bytes_], ...]
range: Sequence[str]

Expand All @@ -50,17 +50,17 @@ class NominalAttribute(Attribute[str]):
def __init__(self, /, name: str, values: Sequence[str]) -> None: ...

class NumericAttribute(Attribute[float]):
type_name: ClassVar[str] = "numeric"
type_name: ClassVar[str | None] = "numeric"
dtype: type[np.float64]
range: None

class StringAttribute(Attribute[None]):
type_name: ClassVar[str] = "string"
type_name: ClassVar[str | None] = "string"
dtype: type[np.object_]
range: None

class DateAttribute(Attribute[np.datetime64]):
type_name: ClassVar[str] = "date"
type_name: ClassVar[str | None] = "date"
dtype: np.datetime64
range: str

Expand All @@ -70,7 +70,7 @@ class DateAttribute(Attribute[np.datetime64]):
def __init__(self, /, name: str, date_format: str, datetime_unit: str) -> None: ...

class RelationalAttribute(Attribute[np.ndarray[tuple[int], np.dtype[np.void]]]):
type_name: ClassVar[str] = "relational"
type_name: ClassVar[str | None] = "relational"
dtype: type[np.object_]
range: None

Expand Down

0 comments on commit af2c458

Please sign in to comment.