2424def unique_prime_factors (n : int ) -> set :
2525 """
2626 Find unique prime factors of an integer.
27- Tests include sorting because only the set really matters,
27+ Tests include sorting because only the set matters,
2828 not the order in which it is produced.
2929 >>> sorted(set(unique_prime_factors(14)))
3030 [2, 7]
@@ -58,7 +58,7 @@ def upf_len(num: int) -> int:
5858
5959def equality (iterable : list ) -> bool :
6060 """
61- Check equality of ALL elements in an iterable
61+ Check the equality of ALL elements in an iterable
6262 >>> equality([1, 2, 3, 4])
6363 False
6464 >>> equality([2, 2, 2, 2])
@@ -69,23 +69,23 @@ def equality(iterable: list) -> bool:
6969 return len (set (iterable )) in (0 , 1 )
7070
7171
72- def run (n : int ) -> list :
72+ def run (n : int ) -> list [ int ] :
7373 """
7474 Runs core process to find problem solution.
7575 >>> run(3)
7676 [644, 645, 646]
7777 """
7878
7979 # Incrementor variable for our group list comprehension.
80- # This serves as the first number in each list of values
80+ # This is the first number in each list of values
8181 # to test.
8282 base = 2
8383
8484 while True :
8585 # Increment each value of a generated range
8686 group = [base + i for i in range (n )]
8787
88- # Run elements through out unique_prime_factors function
88+ # Run elements through the unique_prime_factors function
8989 # Append our target number to the end.
9090 checker = [upf_len (x ) for x in group ]
9191 checker .append (n )
@@ -98,7 +98,7 @@ def run(n: int) -> list:
9898 base += 1
9999
100100
101- def solution (n : int = 4 ) -> int :
101+ def solution (n : int = 4 ) -> int | None :
102102 """Return the first value of the first four consecutive integers to have four
103103 distinct prime factors each.
104104 >>> solution()
0 commit comments