mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
fix: no implicit optional (#7984)
This commit is contained in:
@@ -71,7 +71,7 @@ def sum_digit_factorials(n: int) -> int:
|
||||
return ret
|
||||
|
||||
|
||||
def chain_length(n: int, previous: set = None) -> int:
|
||||
def chain_length(n: int, previous: set | None = None) -> int:
|
||||
"""
|
||||
Calculate the length of the chain of non-repeating terms starting with n.
|
||||
Previous is a set containing the previous member of the chain.
|
||||
|
||||
Reference in New Issue
Block a user