unrecognized type basestring
Bug #1636146 reported by
Matěj Cepl
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pyflakes |
Invalid
|
Undecided
|
Unassigned |
Bug Description
These two lines of the code:
if isinstance(
will be honored by pyflakes (and flake8) with
libs/
which is just wrong. `basestring` is perfectly defined type and this seems like a quite canonical way how to check (in Py2k) whether the variable is either unicode or str.
To post a comment you must log in.
You seem to be running PyFlakes and Flake8 under python 3. You can verify this by doing `flake8 --version`. basestring is actually *not* defined on Python 3, so if you're writing code for Python 2 (that isn't going to run on Python 3) you should install Flake8 for Python 2 and run it that way too, e.g.,
``` /bootstrap. pypa.io/ get-pip. py
curl -O https:/
python2.7 get-pip.py
python2.7 -m pip install flake8
python2.7 -m flake8 libs/proc.py
```