Skip to content
Commit 1eae8485 authored by George Hickman's avatar George Hickman
Browse files

Avoid truncating module names without a period

When sorting a file with a third party library that is similarly named to a
standard library module  in this case) the `index` variable was set to `-1`
which evaluates to `True` in the conditional thus truncating the last
character from the moduleName. In the case of times [1] you end up with
firstPart being `time`, a standard library module.

Tested with these imports:

    import times

    import datetime

    import requests

Running isort 3.7.0 on python 2.7.6.

1: https://pypi.python.org/pypi/times
parent 371d5f91
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment