is_even
is not used inside function all_primes
8
9
10def all_primes(nums):
11 def is_even(x):12 return x % 2 == 0
13
14 def is_prime(x):
This issue concerns that one or more nested classes/functions have been declared but are nowhere used in the function.
A class or function defined inside a function is only accessible inside its parent function scope. It is recommended either to remove the unused classes and functions as it is a dead code or refactor it to use them.
Note: DeepSource will remove all the unused nested definitions during Autofix.
def run():
def total_time():
return Something
class Runner:
def __init__(time):
pass
def run():
def total_time():
return Something
class Runner:
def __init__(time):
...
t = total_time()
bill = Runner(t)
...