Skip to content

Commit 75ad2ae

Browse files
authored
style: Add missing period in docstrings (#359)
1 parent f677df5 commit 75ad2ae

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/torchjd/aggregation/_utils/str.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
def vector_to_str(vector: Tensor) -> str:
55
"""
66
Transforms a Tensor of the form `tensor([1.23456, 1.0, ...])` into a string of the form
7-
`1.23, 1., ...`
7+
`1.23, 1., ...`.
88
"""
99

1010
weights_str = ", ".join(["{:.2f}".format(value).rstrip("0") for value in vector])

tests/plots/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def combine_bounds(
236236
def coord_to_angle(x: float, y: float) -> tuple[float, float]:
237237
"""
238238
Converts an (x, y) pair into its angle from the (1, 0) vector, as a value in [0, 2pi[, and its
239-
length
239+
length.
240240
"""
241241

242242
r = np.sqrt(x**2 + y**2)

tests/unit/aggregation/test_cagrad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def test_non_differentiable(aggregator: CAGrad, matrix: Tensor):
2929

3030
@mark.parametrize(["aggregator", "matrix"], non_conflicting_pairs_1 + non_conflicting_pairs_2)
3131
def test_non_conflicting(aggregator: CAGrad, matrix: Tensor):
32-
"""Tests that CAGrad is non-conflicting when c >= 1 (it should not hold when c < 1)"""
32+
"""Tests that CAGrad is non-conflicting when c >= 1 (it should not hold when c < 1)."""
3333
assert_non_conflicting(aggregator, matrix)
3434

3535

tests/unit/autojac/test_backward.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
def test_check_create_transform():
13-
"""Tests that _create_transform creates a valid Transform"""
13+
"""Tests that _create_transform creates a valid Transform."""
1414

1515
a1 = torch.tensor([1.0, 2.0], requires_grad=True)
1616
a2 = torch.tensor([3.0, 4.0], requires_grad=True)

tests/unit/autojac/test_mtl_backward.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
def test_check_create_transform():
13-
"""Tests that _create_transform creates a valid Transform"""
13+
"""Tests that _create_transform creates a valid Transform."""
1414

1515
p0 = torch.tensor([1.0, 2.0], requires_grad=True)
1616
p1 = torch.tensor([1.0, 2.0], requires_grad=True)

0 commit comments

Comments
 (0)