ignore =
E203,E305,E402,E501,E721,E741,F401,F403,F405,F821,F841,F999,W503,W504,C408,
# ignores below are temporary, fix them and remove please!
- B005,B006,B007,B008,B902,B903
+ B006,B007,B008,B902,B903
exclude = docs/src,venv,third_party,caffe2,scripts,docs/caffe2,tools/amd_build/pyHIPIFY,torch/lib/include,torch/lib/tmp_install,build,torch/include
generic_functions = []
for l, c in lines:
if l.startswith('TH_API void THNN_'):
- fn_name = l.lstrip('TH_API void THNN_')
+ fn_name = l[len('TH_API void THNN_'):]
if fn_name[0] == '(' and fn_name[-2] == ')':
fn_name = fn_name[1:-2]
else:
fn_name = fn_name[:-1]
generic_functions.append(Function(fn_name))
elif l.startswith('THC_API void THNN_'):
- fn_name = l.lstrip('THC_API void THNN_')
+ fn_name = l[len('THC_API void THNN_'):]
if fn_name[0] == '(' and fn_name[-2] == ')':
fn_name = fn_name[1:-2]
else:
generic_functions = []
for l, c in lines:
if l.startswith('TH_API void THNN_'):
- fn_name = l.lstrip('TH_API void THNN_')
+ fn_name = l[len('TH_API void THNN_'):]
if fn_name[0] == '(' and fn_name[-2] == ')':
fn_name = fn_name[1:-2]
else:
fn_name = fn_name[:-1]
generic_functions.append(Function(fn_name))
elif l.startswith('THC_API void THNN_'):
- fn_name = l.lstrip('THC_API void THNN_')
+ fn_name = l[len('THC_API void THNN_'):]
if fn_name[0] == '(' and fn_name[-2] == ')':
fn_name = fn_name[1:-2]
else: