--- title: Flask extension and isinstance conflict date: 2014-10-25 10:47:08.154305 UTC --- The way of [importing Flask extensions](http://flask.pocoo.org/docs/dev/extensions/#using-extensions) is so annoying: ``` from flask.ext.foo import Bar ``` It is annoying because most of the Python IDEs (Komodo and PyCharm) cannot parse it to provide code navigation or autocompletion. One workaround is to change the import line to ``` from flask_foo import Bar ``` However, the problem does not stop there. The `isinstance` function cannot know that `flask.ext.foo.Parent` and `flask_foo.Parent` are the same and thus it fail, like the case I encountered [here](https://github.com/mrjoes/flask-admin/issues/668#issuecomment-60490158).