Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-latest, macos-latest]
pyv: ["3.8", "3.9"]
include:
- os: ubuntu-20.04
pyv: 3.10.6
nox_pyv: 3.10
- os: windows-latest
pyv: 3.10.6
nox_pyv: 3.10
- os: macos-latest
pyv: 3.10.6
nox_pyv: 3.10
pyv: ["3.8", "3.9", "3.10"]

steps:
- name: Check out the repository
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ warn_redundant_casts = true
warn_unreachable = true
ignore_missing_imports = true
files = ["src", "tests"]
enable_recursive_aliases = true

[tool.pylint.message_control]
enable = ["c-extension-no-member", "no-else-return"]
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ tests =
pytest-mock==3.8.2
pylint==2.15.0
pylint-plugin-utils>=0.6
mypy==0.971
mypy==0.981
dev =
%(tests)s
%(all)s
Expand Down
4 changes: 2 additions & 2 deletions src/dvclive/keras.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
from typing import Optional
from typing import Dict, Optional

from tensorflow.keras.callbacks import ( # noqa pylint: disable=import-error, no-name-in-module
Callback,
Expand Down Expand Up @@ -41,7 +41,7 @@ def on_train_begin(self, logs=None): # pylint: disable=unused-argument
)

def on_epoch_end(
self, epoch: int, logs: dict = None
self, epoch: int, logs: Optional[Dict] = None
): # pylint: disable=unused-argument
logs = logs or {}
for metric, value in logs.items():
Expand Down
8 changes: 3 additions & 5 deletions src/dvclive/live.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@
logger = logging.getLogger("dvclive")
logger.setLevel(os.getenv(env.DVCLIVE_LOGLEVEL, "INFO").upper())


# Recursive type aliases are not yet supported by mypy (as of 0.971),
# so we set type: ignore for ParamLike.
# See https://github.com/python/mypy/issues/731#issuecomment-1213482527
ParamLike = Union[int, float, str, bool, List["ParamLike"], Dict[str, "ParamLike"]] # type: ignore # noqa
ParamLike = Union[
int, float, str, bool, List["ParamLike"], Dict[str, "ParamLike"]
]


class Live:
Expand Down