diff options
author | Timothy Crosley <timothy.crosley@gmail.com> | 2015-02-05 17:08:07 -0500 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2015-02-05 17:08:07 -0500 |
commit | e80d5ab7710ac8d1dd13e7fe6401ec9ffa78a1c4 (patch) | |
tree | fba7f3f5bb2eab5318f1f4a025c977c37a8f02cd | |
parent | c3d2b350957f6c9aa96289eac09a29c4ce66b0c2 (diff) | |
parent | beede2435eb1b19e44e9b2010ea89ef1faa31efb (diff) | |
download | isort-e80d5ab7710ac8d1dd13e7fe6401ec9ffa78a1c4.tar.gz |
Merge tag '3.9.5' into develop
3.9.5
-rw-r--r-- | isort/__init__.py | 2 | ||||
-rw-r--r-- | isort/isort.py | 11 | ||||
-rwxr-xr-x | setup.py | 4 |
3 files changed, 12 insertions, 5 deletions
diff --git a/isort/__init__.py b/isort/__init__.py index 377a8634..585c81a0 100644 --- a/isort/__init__.py +++ b/isort/__init__.py @@ -25,4 +25,4 @@ from __future__ import absolute_import, division, print_function, unicode_litera from . import settings from .isort import SECTION_NAMES, SECTIONS, SortImports -__version__ = "3.9.4" +__version__ = "3.9.5" diff --git a/isort/isort.py b/isort/isort.py index 12d1156d..f08dbc05 100644 --- a/isort/isort.py +++ b/isort/isort.py @@ -31,6 +31,7 @@ import copy import itertools import os from collections import namedtuple +from datetime import datetime from difflib import unified_diff from sys import path as PYTHONPATH from sys import stderr, stdout @@ -160,8 +161,14 @@ class SortImports(object): output_file.write(self.output) def _show_diff(self, file_contents): - for line in unified_diff(file_contents.splitlines(1), self.output.splitlines(1), - fromfile=self.file_path + ':before', tofile=self.file_path + ':after'): + for line in unified_diff( + file_contents.splitlines(1), + self.output.splitlines(1), + fromfile=self.file_path + ':before', + tofile=self.file_path + ':after', + fromfiledate=datetime.fromtimestamp(os.path.getmtime(self.file_path)), + tofiledate=datetime.now() + ): stdout.write(line) @staticmethod @@ -42,13 +42,13 @@ except (IOError, ImportError, OSError, RuntimeError): readme = '' setup(name='isort', - version='3.9.4', + version='3.9.5', description='A Python utility / library to sort Python imports.', long_description=readme, author='Timothy Crosley', author_email='timothy.crosley@gmail.com', url='https://github.com/timothycrosley/isort', - download_url='https://github.com/timothycrosley/isort/archive/3.9.4.tar.gz', + download_url='https://github.com/timothycrosley/isort/archive/3.9.5.tar.gz', license="MIT", entry_points={ 'console_scripts': [ |