Skip to content

Commit e218d39

Browse files
authored
find_max.py: noqa: PLR1730
1 parent 3bdcba3 commit e218d39

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

maths/find_max.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ def find_max_iterative(nums: list[int | float]) -> int | float:
2020
raise ValueError("find_max_iterative() arg is an empty sequence")
2121
max_num = nums[0]
2222
for x in nums:
23-
max_num = max(max_num, x)
23+
if x > max_num: # noqa: PLR1730
24+
max_num = x
2425
return max_num
2526

2627

0 commit comments

Comments
 (0)