Carreau/velin

velin . --check throws an undefined variable error

ianhi opened this issue · 0 comments

ianhi commented

This needs_changes is never defined:

velin/velin/ref.py

Lines 760 to 767 in 203568d

f.write(new)
if args.check:
if need_changes:
sys.exit(
"Some files/functions need updates:\n - " + "\n - ".join(need_changes)
)
else:
sys.exit(0)

which causes velin . --check to fail:

Traceback (most recent call last):
  File "/home/ian/mambaforge/envs/micro/bin/velin", line 8, in <module>
    sys.exit(main())
  File "/home/ian/mambaforge/envs/micro/lib/python3.8/site-packages/velin/ref.py", line 762, in main
    if need_changes:
NameError: name 'need_changes' is not defined

though there is a commented out definition a few lines above

# need_changes = []