WWVBMinute: correct typing of __new__ method

This commit is contained in:
Jeff Epler 2025-07-26 14:08:13 -05:00
parent acdb968619
commit 9210edfd70
2 changed files with 5 additions and 2 deletions

View file

@ -22,5 +22,6 @@ twine; implementation_name=="cpython"
types-beautifulsoup4; implementation_name=="cpython"
types-python-dateutil; implementation_name=="cpython"
types-requests; implementation_name=="cpython"
typing-extensions; implementation_name=="cpython"
tzdata
wheel

View file

@ -21,6 +21,8 @@ import json
import warnings
from typing import TYPE_CHECKING, Any, NamedTuple, TextIO, TypeVar
from typing_extensions import Self
from . import iersdata
from .tz import Mountain
@ -376,7 +378,7 @@ class WWVBMinute(_WWVBMinute):
epoch: int = 1970
def __new__( # noqa: PYI034
def __new__(
cls,
year: int,
days: int,
@ -387,7 +389,7 @@ class WWVBMinute(_WWVBMinute):
*,
ls: bool | None = None,
ly: bool | None = None,
) -> WWVBMinute:
) -> Self:
"""Construct a WWVBMinute
:param year: The 2- or 4-digit year. This parameter is converted by the `full_year` method.