asottile / classify-imports

Utilities for refactoring imports in python-like syntax.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

py3, windows, classify_import('ConfigParser') => erroneously "BUILTIN"

asottile opened this issue · comments

something something case insensitive filesystem something

Fixed via #30

IEUser@MSEDGEWIN10 MINGW64 ~
$ winpty python
Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from aspy.refactor_imports.classify import *
>>> classify_import('ConfigParser')
'THIRD_PARTY'

This'll still have issues in that python 2.x will identify configparser as builtin, but I don't care to rewrite imp.find_module from scratch so I'm ok with that being ~slightly wrong in a ever-slimming demographic (windows, python2.x)