I have defined a function in __init__.py
.
While running pylint on __init__.py
, it gives a warning about unused_variable
on the function_name.
I don't want to disable this warning in general (for actual unused variables, etc.) but obviously I don't want a warning for the function definition. Sample __init__.py
:
import os
test_enabled = True
run_all_tests = False ## Raises 'unused_variable' warning, expected and want to keep such warnings
def is_test_enabled(): ## Raises 'unused_variable' warning, unexpected and want to disable
return <test_object> if test_enabled else None