You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flake8 reported F821 undefined name errors in following scripts:
ezid/ezidapp/stats.py:62:36: F821 undefined name 'lastM'
ezid/templates/doc/ezid.py:116:1: F821 undefined name 'django'
ezid/templates/doc/ezid.py:169:41: F821 undefined name 'django'
ezid/templates/doc/ezid.py:239:1: F821 undefined name 'django'
ezid/templates/doc/ezid.py:251:28: F821 undefined name 'django'
ezid/tools/dashboard.py:138:40: F821 undefined name 'lastMonth'
The ezid/templates/doc/ezid.py script is not used and can be ignored. The errors on the 'lastM' and 'lastMonth' are from two very similar next month calculation routines.
Define the 'lastM' and 'lastMonth' variables to 'None' before these routines should fix the issue.
for m in months:
if m != months[0]:
# noinspection PyUnboundLocalVariable,PyUnboundLocalVariable
nextM = incrementMonth(lastM)
while nextM != m:
table.append((nextM, {}))
nextM = incrementMonth(nextM)
table.append((m, counts[m]))
lastM = m
for month in months:
if month != months[0]:
# noinspection PyUnboundLocalVariable
nextMonth = incrementMonth(lastMonth)
while nextMonth not in months:
counters[nextMonth] = Counter()
nextMonth = incrementMonth(nextMonth)
lastMonth = month
The text was updated successfully, but these errors were encountered:
Flake8 reported
F821 undefined name
errors in following scripts:ezid/ezidapp/stats.py:62:36: F821 undefined name 'lastM'
ezid/templates/doc/ezid.py:116:1: F821 undefined name 'django'
ezid/templates/doc/ezid.py:169:41: F821 undefined name 'django'
ezid/templates/doc/ezid.py:239:1: F821 undefined name 'django'
ezid/templates/doc/ezid.py:251:28: F821 undefined name 'django'
ezid/tools/dashboard.py:138:40: F821 undefined name 'lastMonth'
The
ezid/templates/doc/ezid.py
script is not used and can be ignored. The errors on the 'lastM' and 'lastMonth' are from two very similar next month calculation routines.Define the 'lastM' and 'lastMonth' variables to 'None' before these routines should fix the issue.
The text was updated successfully, but these errors were encountered: