Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ucodery committed May 9, 2019
2 parents 683077a + 346464f commit 277377e
Show file tree
Hide file tree
Showing 28 changed files with 1,161 additions and 407 deletions.
12 changes: 12 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[run]
include =
isort/*
test_*.py
.tox/*/lib/python*/site-packages/isort/*
.tox\*\Lib\site-packages\isort\*
branch = 1

[paths]
source = isort/
.tox/*/lib/python*/site-packages/isort/
.tox\*\Lib\site-packages\isort\
13 changes: 7 additions & 6 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fi
export PROJECT_NAME=$OPEN_PROJECT_NAME
export PROJECT_DIR="$PWD"

if [ ! -d "venv" ]; then
if [ ! -d ".venv" ]; then
if ! hash pyvenv 2>/dev/null; then
function pyvenv()
{
Expand All @@ -31,13 +31,13 @@ if [ ! -d "venv" ]; then
fi

echo "Making venv for $PROJECT_NAME"
pyvenv venv
. venv/bin/activate
pyvenv .venv
. .venv/bin/activate
python setup.py install
pip install -r requirements.txt
fi

. venv/bin/activate
. .venv/bin/activate

# Let's make sure this is a hubflow enabled repo
yes | git hf init >/dev/null 2>/dev/null
Expand All @@ -57,8 +57,9 @@ function _distribute()
{
(root
rm -rf build dist __pycache__ isort.egg-info
python setup.py sdist upload
python setup.py bdist_wheel upload)
python setup.py sdist
python setup.py bdist_wheel
twine upload --repository-url https://test.pypi.org/legacy/ dist/*)
}


Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ atlassian-ide-plugin.xml
pip-selfcheck.json

# Python3 Venv Files
venv/
.venv/
pyvenv.cfg

# mypy
Expand Down
6 changes: 6 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- id: isort
name: isort
entry: isort
require_serial: true
language: python
types: [python]
54 changes: 42 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,56 @@
dist: xenial
sudo: false
language: python
cache: pip
env:
- global:
- PYTEST_ADDOPTS=-vv
python: 3.7
matrix:
include:
- python: 3.7
env: TOXENV=isort-check
- python: 3.7
env: TOXENV=lint
- python: 3.7
env: TOXENV=mypy
- env: TOXENV=isort-check
- env: TOXENV=lint
- env: TOXENV=mypy
- python: 3.4
env: TOXENV=py34
env: TOXENV=py34-coverage
- python: 3.5
env: TOXENV=py35
env: TOXENV=py35-coverage
- python: 3.6
env: TOXENV=py36
env: TOXENV=py36-coverage
- python: 3.7
env: TOXENV=py37
env: TOXENV=py37-coverage
- python: pypy3.5-6.0
env: TOXENV=pypy3
- os: osx
language: generic
env: TOXENV=py36

before_install:
- "./scripts/before_install.sh"
install:
- pip install tox
- pip install tox
script:
- tox
after_success:
- |
# Report coverage for TOXENV=*-coverage.
if [[ "${TOXENV%-coverage}" != "$TOXENV" ]]; then
set -e
# Add last TOXENV to $PATH.
PATH="$PWD/.tox/${TOXENV##*,}/bin:$PATH"
coverage xml
coverage report -m
bash <(curl -s https://codecov.io/bash) -Z -X gcov -X coveragepy -X search -X xcode -X gcovout -X fix -f coverage.xml -n $TOXENV
set +e
fi
deploy:
provider: pypi
user: timothycrosley
distributions: sdist bdist_wheel
skip_existing: true
on:
tags: false
branch: master
condition: "$TOXENV = py37"
password:
secure: SSFcjBL3dhWvSbo21icmnHQFV7mXfv/eDzxrefHUDMk37MWrvtNKchH8zz7wjAsf2PH1VYL1zkEFwnzuzHgs2aFCK7HDUwAaDSIcvPmJg9Oty+o2WQw16m7UnUac9MIZGmBHQaZuUTw0VJpm3GuPSXtdFJwFq3Tk3TIyUipEwg8=
1 change: 1 addition & 0 deletions ACKNOWLEDGEMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ Code Contributors
- John Chadwick (@jchv)
- Jon Dufresne (@jdufresne)
- Brian F. Baron (@briabar)
-Madison Caldwell (@madirey)


Documenters
Expand Down
75 changes: 71 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,77 @@
Changelog
=========

### 4.4.0 UNRELEASED
- **Breaking changes:**
- isort now requires Python 3.4+ to run but continues to support formating
### 5.0.0 UNRELEASED
**Breaking changes:**
- isort now requires Python 3.5+ to run but continues to support formatting
Python 2 code.
- isort deprecates official support for Python 3.4, removing modules only in this release from known_standard_library:
- user
Internal:
- isort now utilizes mypy and typing to filter out typing related issues before deployment

Planned:
- profile support for common project types (black, django, google, etc)

### 4.3.18 - May 1, 2019 - hot fix release
- Fixed an issue with parsing files that contain unicode characters in Python 2
- Fixed issue #924 - Pulling in pip internals causes depreciation warning
- Fixed issue #938 - Providing a way to filter explicitly passed in files via configuration settings (`--filter-files`)
- Improved interoperability with toml configuration files

### 4.3.17 - April 7, 2019 - hot fix release
- Fixed issue #905 & #919: Import section headers behaving strangely

### 4.3.16 - March 23, 2019 - hot fix release
- Fixed issue #909 - skip and skip-glob are not enforced when using settings-path.
- Fixed issue #907 - appdirs optional requirement does not correctly specify version
- Fixed issue #902 - Too broad warning about missing toml package
- Fixed issue #778 - remove `user` from known standard library as it's no longer in any supported Python version.

### 4.3.15 - March 10, 2019 - hot fix release
- Fixed a regression with handling streaming input from pipes (Issue #895)
- Fixed handling of \x0c whitespace character (Issue #811)
- Improved CLI documentation

### 4.3.14 - March 9, 2019 - hot fix release
- Fixed a regression with */directory/*.py style patterns

### 4.3.13 - March 8, 2019 - hot fix release
- Fixed the inability to accurately determine import section when a mix of conda and virtual environments are used.
- Fixed some output being printed even when --quiet mode is enabled.
- Fixed issue #890 interoperability with PyCharm by allowing case sensitive non type grouped sorting.
- Fixed issue #889 under some circumstances isort will incorrectly add a new line at the beginning of a file.
- Fixed issue #885 many files not being skipped according to set skip settings.
- Fixed issue #842 streaming encoding improvements.

### 4.3.12 - March 6, 2019 - hot fix release
- Fix error caused when virtual environment not detected

### 4.3.11 - March 6, 2019 - hot fix release
- Fixed issue #876: confused by symlinks pointing to virtualenv gives FIRSTPARTY not THIRDPARTY
- Fixed issue #873: current version skips every file on travis
- Additional caching to reduce performance regression introduced in 4.3.5

### 4.3.10 - March 2, 2019 - hot fix release
- Fixed Windows incompatibilities (Issue #835)
- Fixed relative import sorting bug (Issue #417)
- Fixed "no_lines_before" to also be respected from previous empty sections.
- Fixed slow-down introduced by finders mechanism by adding a LRU cache (issue #848)
- Fixed issue #842 default encoding not-set in Python2
- Restored Windows automated testing
- Added Mac automated testing

### 4.3.9 - February 25, 2019 - hot fix release
- Fixed a bug that led to an incompatibility with black: #831

### 4.3.8 - February 25, 2019 - hot fix release
- Fixed a bug that led to the recursive option not always been available from the command line.

### 4.3.7 - February 25, 2019 - hot fix release
- Expands the finder failsafe to occur on the creation of the finder objects.

### 4.3.6 - February 24, 2019 - hot fix release
- Fixes a fatal error that occurs if a single finder throws an exception. Important as we add more finders that utilize third party libraries.

### 4.3.5 - February 24, 2019 - last Python 2.7 Maintenance Release

Expand All @@ -28,7 +95,7 @@ New:

Fixes:
- Improved black compatibility.
- Isort will no detect files in the CWD as first-party.
- Isort will now detect files in the CWD as first-party.
- Fixed several cases where '-ns' or 'not_skip' was being incorrectly ignored.
- Fixed sorting of relative path imports ('.', '..', '...', etc).
- Fixed bugs caused by a failure to maintain order when loading iterables from config files.
Expand Down
Empty file modified LICENSE
100755 → 100644
Empty file.
13 changes: 8 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
:target: https://travis-ci.org/timothycrosley/isort
:alt: Build Status


.. image:: https://coveralls.io/repos/timothycrosley/isort/badge.svg?branch=release%2F2.6.0&service=github
:target: https://coveralls.io/github/timothycrosley/isort?branch=release%2F2.6.0
:alt: Coverage
.. image:: https://codecov.io/gh/timothycrosley/isort/branch/develop/graph/badge.svg
:target: https://codecov.io/gh/timothycrosley/isort
:alt: Code coverage Status

.. image:: https://img.shields.io/github/license/mashape/apistatus.svg
:target: https://pypi.org/project/hug/
Expand All @@ -24,6 +23,9 @@
:alt: Join the chat at https://gitter.im/timothycrosley/isort
:target: https://gitter.im/timothycrosley/isort?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge

.. image:: https://pepy.tech/badge/isort
:alt: Downloads
:target: https://pepy.tech/project/isort

isort your python imports for you so you don't have to.

Expand Down Expand Up @@ -329,7 +331,7 @@ past the line_length limit and has 6 possible settings:
In Mode 5 isort leaves a single extra space to maintain consistency of output when a comma is added at the end.
Mode 6 is the same - except that no extra space is maintained leading to the possibility of lines one character longer.
You can enforce a trailing comma by using this in conjunction with `-tc` or `trailing_comma: True`.
You can enforce a trailing comma by using this in conjunction with ``-tc`` or ``include_trailing_comma: True``.
.. code-block:: python
Expand All @@ -355,6 +357,7 @@ own line:
...
Note: to change the how constant indents appear - simply change the indent property with the following accepted formats:
* Number of spaces you would like. For example: 4 would cause standard 4 space indentation.
* Tab
* A verbatim string with quotes around it.
Expand Down
26 changes: 23 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
init:
- "SET PATH=C:\\Python27\\Scripts;%PATH%"
- "SET PATH=C:\\Python37\\Scripts;%PATH%"
- "SET PYTEST_ADDOPTS=-vv"
- "ECHO PATH=%PATH%"
- python --version

build: off

environment:
matrix:
- TOXENV: "isort-check"
- TOXENV: "lint"
- TOXENV: "mypy"
- TOXENV: "py34-coverage"
- TOXENV: "py35-coverage"
- TOXENV: "py36-coverage"
- TOXENV: "py37-coverage"

install:
- pip install tox

test_script:
- tox -e isort-check,py34,py35,py36,py37
- tox

on_success:
# Add tox environment to PATH.
- "SET PATH=%CD%\\.tox\\%TOXENV%\\scripts;%PATH%"
- IF NOT "x%TOXENV:-coverage=%"=="x%TOXENV%" (
pip install codecov &&
coverage xml &&
coverage report -m &&
codecov --required -X gcov pycov search -f coverage.xml -n %TOXENV%-windows
)
10 changes: 10 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
coverage:
status:
project: yes
patch: yes
changes: yes

comment:
layout: "header, diff"
behavior: default
require_changes: no
4 changes: 2 additions & 2 deletions isort/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"""
from . import settings # noqa: F401
from .isort import SortImports # noqa: F401
from .compat import SortImports # noqa: F401

__version__ = "4.3.5"
__version__ = "4.3.18"
Loading

0 comments on commit 277377e

Please sign in to comment.