mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-30 16:31:08 +00:00
noqa to silence flake8 on Python 3 only syntax
This commit is contained in:
parent
b3873be7b5
commit
cc5102ab01
|
@ -7,14 +7,14 @@ import sys
|
||||||
|
|
||||||
|
|
||||||
# returns F(n)
|
# returns F(n)
|
||||||
def fibonacci(n: int):
|
def fibonacci(n: int): # noqa: F821 This syntax is Python 3 only
|
||||||
if n < 0:
|
if n < 0:
|
||||||
raise ValueError("Negative arguments are not supported")
|
raise ValueError("Negative arguments are not supported")
|
||||||
return _fib(n)[0]
|
return _fib(n)[0]
|
||||||
|
|
||||||
|
|
||||||
# returns (F(n), F(n-1))
|
# returns (F(n), F(n-1))
|
||||||
def _fib(n: int):
|
def _fib(n: int): # noqa: F821 This syntax is Python 3 only
|
||||||
if n == 0:
|
if n == 0:
|
||||||
# (F(0), F(1))
|
# (F(0), F(1))
|
||||||
return (0, 1)
|
return (0, 1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user