Compare commits
8 commits
eae4e778de
...
f36fa32a81
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f36fa32a81 | ||
| 1f6dba6a59 | |||
| 9210edfd70 | |||
| 6027e274e8 | |||
| b405a2dcb9 | |||
| acdb968619 | |||
| 9c76dc1a33 | |||
| 10eb0e67d3 |
6 changed files with 17 additions and 19 deletions
15
.coveragerc
15
.coveragerc
|
|
@ -1,15 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2021-2024 Jeff Epler
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
[report]
|
||||
exclude_also =
|
||||
def __repr__
|
||||
if self.debug:
|
||||
if settings.DEBUG
|
||||
raise AssertionError
|
||||
raise NotImplementedError
|
||||
if 0:
|
||||
if __name__ == .__main__.:
|
||||
if TYPE_CHECKING:
|
||||
class .*\bProtocol\):
|
||||
@(abc\.)?abstractmethod
|
||||
|
|
@ -21,7 +21,7 @@ repos:
|
|||
- id: reuse
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
# Ruff version.
|
||||
rev: v0.12.4
|
||||
rev: v0.12.5
|
||||
hooks:
|
||||
# Run the linter.
|
||||
- id: ruff
|
||||
|
|
|
|||
|
|
@ -51,3 +51,5 @@ wwvbtk = "wwvb.wwvbtk:main"
|
|||
[[tool.mypy.overrides]]
|
||||
module = ["adafruit_datetime"]
|
||||
follow_untyped_imports = true
|
||||
[tool.coverage.report]
|
||||
exclude_also=["if TYPE_CHECKING:"]
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ adafruit-circuitpython-datetime
|
|||
beautifulsoup4
|
||||
build
|
||||
click
|
||||
coverage
|
||||
coverage >= 7.1.0
|
||||
mypy; implementation_name=="cpython"
|
||||
click>=8.1.5; implementation_name=="cpython"
|
||||
leapseconddata
|
||||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -14,6 +14,14 @@ import unittest
|
|||
from collections.abc import Sequence
|
||||
from typing import Any
|
||||
|
||||
# These imports must remain, even though the module contents are not used directly!
|
||||
import wwvb.dut1table
|
||||
import wwvb.gen
|
||||
|
||||
# The asserts below are to help prevent their removal by a linter.
|
||||
assert wwvb.dut1table.__name__ == "wwvb.dut1table"
|
||||
assert wwvb.gen.__name__ == "wwvb.gen"
|
||||
|
||||
coverage_add = ("-m", "coverage", "run", "--branch", "-p") if "COVERAGE_RUN" in os.environ else ()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue