Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: add __init__.py to isort skip list #25455

Merged
merged 2 commits into from
Feb 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ci/deps/azure-27-compat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ dependencies:
- pytest
- pytest-xdist
- pytest-mock
- isort
- pip:
- html5lib==1.0b2
- beautifulsoup4==4.2.1
Expand Down
1 change: 1 addition & 0 deletions ci/deps/azure-27-locale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ dependencies:
- pytest-xdist
- pytest-mock
- hypothesis>=3.58.0
- isort
- pip:
- html5lib==1.0b2
- beautifulsoup4==4.2.1
1 change: 1 addition & 0 deletions ci/deps/azure-36-locale_slow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ dependencies:
- pytest-xdist
- pytest-mock
- moto
- isort
- pip:
- hypothesis>=3.58.0
1 change: 1 addition & 0 deletions ci/deps/azure-37-locale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dependencies:
- pytest
- pytest-xdist
- pytest-mock
- isort
- pip:
- hypothesis>=3.58.0
- moto # latest moto in conda-forge fails with 3.7, move to conda dependencies when this is fixed
1 change: 1 addition & 0 deletions ci/deps/azure-37-numpydev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dependencies:
- pytest-xdist
- pytest-mock
- hypothesis>=3.58.0
- isort
- pip:
- "git+git://github.com/dateutil/dateutil.git"
- "-f https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com"
Expand Down
1 change: 1 addition & 0 deletions ci/deps/azure-macos-35.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ dependencies:
- pytest
- pytest-xdist
- pytest-mock
- isort
- pip:
- python-dateutil==2.5.3
- hypothesis>=3.58.0
1 change: 1 addition & 0 deletions ci/deps/azure-windows-27.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ dependencies:
- pytest-mock
- moto
- hypothesis>=3.58.0
- isort
1 change: 1 addition & 0 deletions ci/deps/azure-windows-36.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ dependencies:
- pytest-xdist
- pytest-mock
- hypothesis>=3.58.0
- isort
1 change: 1 addition & 0 deletions ci/deps/travis-27.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ dependencies:
- pytest-mock
- moto==1.3.4
- hypothesis>=3.58.0
- isort
- pip:
- backports.lzma
- pandas-gbq
Expand Down
1 change: 1 addition & 0 deletions ci/deps/travis-36-doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ dependencies:
# universal
- pytest
- pytest-xdist
- isort
1 change: 1 addition & 0 deletions ci/deps/travis-36-locale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ dependencies:
- pytest-xdist
- pytest-mock
- moto
- isort
- pip:
- hypothesis>=3.58.0
1 change: 1 addition & 0 deletions ci/deps/travis-36-slow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ dependencies:
- pytest-mock
- moto
- hypothesis>=3.58.0
- isort
1 change: 1 addition & 0 deletions ci/deps/travis-36.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ dependencies:
- pytest-cov
- pytest-mock
- hypothesis>=3.58.0
- isort
- pip:
- brotlipy
- coverage
Expand Down
1 change: 1 addition & 0 deletions ci/deps/travis-37.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ dependencies:
- pytest-mock
- hypothesis>=3.58.0
- s3fs
- isort
- pip:
- moto
20 changes: 20 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,23 @@ skip=
asv_bench/benchmarks/dtypes.py
asv_bench/benchmarks/strings.py
asv_bench/benchmarks/period.py
pandas/__init__.py
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what i mean is, can you just run isort on these?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

o i guess could be a followup

Copy link
Member Author

@simonjayhawkins simonjayhawkins Feb 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

running isort on all the __init__.py files gives..

ImportError while loading conftest 'C:\Users\simon\OneDrive\code\pandas-simonjayhawkins\pandas\conftest.py'.
pandas\__init__.py:29: in <module>
    import pandas.arrays
pandas\arrays\__init__.py:6: in <module>
    from pandas.core.arrays import (
pandas\core\arrays\__init__.py:4: in <module>
    from .categorical import Categorical  # noqa
pandas\core\arrays\categorical.py:33: in <module>
    from pandas.core.base import NoNewAttributesMixin, PandasObject, _shared_docs
pandas\core\base.py:27: in <module>
    import pandas.core.nanops as nanops
pandas\core\nanops.py:54: in <module>
    set_use_bottleneck(get_option('compute.use_bottleneck'))
pandas\core\config.py:227: in __call__
    return self.__func__(*args, **kwds)
pandas\core\config.py:97: in _get_option
    key = _get_single_key(pat, silent)
pandas\core\config.py:83: in _get_single_key
    raise OptionError('No such keys(s): {pat!r}'.format(pat=pat))
E   pandas.core.config.OptionError: "No such keys(s): 'compute.use_bottleneck'"

so some work required to do this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotcha ok then

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also i'm on Windows and not able to run isort 4.3.8 because of PyCQA/isort#835, so struggling to make progress on this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, can you post an issue about this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need a separate issue? #23334 is still open. add to that?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add to that one.

pandas/plotting/__init__.py
pandas/tests/extension/decimal/__init__.py
pandas/tests/extension/base/__init__.py
pandas/io/msgpack/__init__.py
pandas/io/json/__init__.py
pandas/io/clipboard/__init__.py
pandas/io/excel/__init__.py
pandas/compat/__init__.py
pandas/compat/numpy/__init__.py
pandas/core/arrays/__init__.py
pandas/core/groupby/__init__.py
pandas/core/internals/__init__.py
pandas/api/__init__.py
pandas/api/extensions/__init__.py
pandas/api/types/__init__.py
pandas/_libs/__init__.py
pandas/_libs/tslibs/__init__.py
pandas/util/__init__.py
pandas/arrays/__init__.py