Closed brifordwylie closed 3 years ago
Yeah writer
and fobj
are mocked in the unit test and injected into function globals.. hacky stuff
f.__globals__['writer'] = Writer(fobj, **self.kwargs.get('writer', {}))
f.__globals__['fobj'] = fobj
so obviously any statistical analysis tool will see them as undefined.
As for the basestring
it's undefined in Python3; dpkt catches a NameError.
try:
isinstance("", basestring)
except NameError:
...
We should be able to refactor this..
$ python2 -c "print(hasattr(__builtins__, 'basestring'))"
True
$ python3 -c "print(hasattr(__builtins__, 'basestring'))"
False
So by default Github Actions normally includes Flake8 F82 errors and will 'block' a PR. Obviously we have a lot of these.. I'll remove the F82 category for now, but we should circle back and revisit these at some point.