Merge pull request #149 from jepler/dunder_new_typing
WWVBMinute: correct typing of __new__ method
This commit is contained in:
commit
1f6dba6a59
2 changed files with 5 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue