I came across a similar issue like in comment #1, where flake8/pyflakes on python3 reports "F821: undefined name 'unicode'" , but the code path is not triggered for Python3:
if sys.version_info < (3, 0): def __unicode__(self): return self.url
def __add__(self, other): return unicode(self) + other else: def __str__(self): return self.url
def __add__(self, other): return str(self) + other
I came across a similar issue like in comment #1, where flake8/pyflakes on python3 reports "F821: undefined name 'unicode'" , but the code path is not triggered for Python3:
if sys.version_info < (3, 0):
def __unicode__(self):
return self.url
def __add__(self, other):
return unicode(self) + other
else:
def __str__(self):
return self.url
def __add__(self, other):
return str(self) + other