Skip to content

Commit 5ed3c56

Browse files
committed
linter
1 parent cfba099 commit 5ed3c56

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

requirements/collect_env_details.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def nice_print(details: dict, level: int = 0) -> list:
7070
lines += [level * LEVEL_OFFSET + key]
7171
lines += [(level + 1) * LEVEL_OFFSET + "- " + v for v in details[k]]
7272
else:
73-
template = "{:%is} {}" % KEY_PADDING
73+
template = "{:%is} {}" % KEY_PADDING # noqa: UP031
7474
key_val = template.format(key, details[k])
7575
lines += [(level * LEVEL_OFFSET) + key_val]
7676
return lines

src/lightning/pytorch/loggers/utilities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def _log_hyperparams(trainer: "pl.Trainer") -> None:
7474
continue
7575
lm_val, dm_val = lightning_hparams[key], datamodule_hparams[key]
7676
if (
77-
type(lm_val) != type(dm_val)
77+
type(lm_val) != type(dm_val) # noqa: E721
7878
or (isinstance(lm_val, Tensor) and id(lm_val) != id(dm_val))
7979
or lm_val != dm_val
8080
):

tests/tests_fabric/utilities/test_load.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def test_lazy_load_tensor(tmp_path):
5656
for t0, t1 in zip(expected.values(), loaded.values()):
5757
assert isinstance(t1, _NotYetLoadedTensor)
5858
t1_materialized = _materialize_tensors(t1)
59-
assert type(t0) == type(t1_materialized)
59+
assert type(t0) == type(t1_materialized) # noqa: E721
6060
assert torch.equal(t0, t1_materialized)
6161

6262

@@ -92,7 +92,7 @@ def test_materialize_tensors(tmp_path):
9292
loaded = _lazy_load(tmp_path / "tensor.pt")
9393
materialized = _materialize_tensors(loaded)
9494
assert torch.equal(materialized, tensor)
95-
assert type(tensor) == type(materialized)
95+
assert type(tensor) == type(materialized) # noqa: E721
9696

9797
# Collection of tensors
9898
collection = {

0 commit comments

Comments
 (0)