-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
STYLE: run pre-commit filters on the repo #27915
Conversation
537079a
to
65cc38f
Compare
Hello @basnijholt! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2019-08-19 13:43:32 UTC |
e2f3e8c
to
476870a
Compare
Can you say a bit more about why this is needed / what it does? I'm not familiar with it. |
are you sure that you have merged the latest master. these should not be necessary. |
@jreback, yes I have just rebased on the latest master. |
@TomAugspurger, |
Thanks for the explanation.
Have you checked why the CI is failing? Seems there's an import issue.
…On Thu, Aug 15, 2019 at 8:41 AM Bas Nijholt ***@***.***> wrote:
@TomAugspurger <https://github.com/TomAugspurger>, seed-isort-config
statically populates the known_third_party
<https://github.com/pandas-dev/pandas/pull/27915/files#diff-380c6a8ebbbce17d55d50ef17d3cf906R119>
field, such that isort works correctly. Previously hypothesis wasn't
correctly sorted, even though it was already listed. seed-isort-config
ensures that all third party libs are there, now isort works as expected.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#27915?email_source=notifications&email_token=AAKAOIUQSR2HKLYQJXU4GJLQEVMIFA5CNFSM4ILS7FI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4L2WQY#issuecomment-521644867>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKAOITK6N6VTWFR46A7Y53QEVMIFANCNFSM4ILS7FIQ>
.
|
@TomAugspurger there seems to be some kind of circular import. I will fix it! 👍 |
I think I fixed it. For some reason This is probably a bug too, I've added a comment for now. Also, I've done an interactive rebase on top of master and made the commits into logical separate changes. |
Thanks. Looks like a black issue on our CI: https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=16280. |
Also I removed the files for which I have fixed the problems.
All passes now 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
I'll merge later today to give others another chance to review.
hooks: | ||
- id: isort | ||
language: python_venv | ||
- repo: https://github.com/asottile/seed-isort-config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gave the README a quick glance on this but can you explain what this is doing here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @sbalk! |
* add isort:skip to "from .pandas_vb_common import setup" * add isort:skip to noqa: E402 marked lines * run black * add noqa: E402 isort:skip where needed * run pre-commit filters on asv_bench/benchmarks/ * parse the isort config when using pre-commit * run isort on pandas/core/api.py * run pre-commit filters and commit trivial import sorting changes * specify flake8 errors in pandas/io/msgpack/__init__.py * fix imports for doc/source/conf.py * fix the [isort] skip entry in setup.cfg Also I removed the files for which I have fixed the problems.
* add isort:skip to "from .pandas_vb_common import setup" * add isort:skip to noqa: E402 marked lines * run black * add noqa: E402 isort:skip where needed * run pre-commit filters on asv_bench/benchmarks/ * parse the isort config when using pre-commit * run isort on pandas/core/api.py * run pre-commit filters and commit trivial import sorting changes * specify flake8 errors in pandas/io/msgpack/__init__.py * fix imports for doc/source/conf.py * fix the [isort] skip entry in setup.cfg Also I removed the files for which I have fixed the problems.
* add isort:skip to "from .pandas_vb_common import setup" * add isort:skip to noqa: E402 marked lines * run black * add noqa: E402 isort:skip where needed * run pre-commit filters on asv_bench/benchmarks/ * parse the isort config when using pre-commit * run isort on pandas/core/api.py * run pre-commit filters and commit trivial import sorting changes * specify flake8 errors in pandas/io/msgpack/__init__.py * fix imports for doc/source/conf.py * fix the [isort] skip entry in setup.cfg Also I removed the files for which I have fixed the problems.
I noticed that
pre-commit
is used and ranpre-commit run --all-files
which results in massive diffs, mostly because ofisort
.I have added the correct
noqa
andisort:skip
flags to the lines which needed it to function correctly with the current.pre-commit-config.yaml
, such that the imports are correctly sorted now.I also added
seed-isort-config
such thatsetup.cfg
is parsed forpre-commit
and fixed the formatting of.pre-commit-config.yaml
.Finally, there ispandas/__init__.py
that is touched bypre-commit run --all-files
, however, this has less trivial changes and might result in something breaking, so I don't dare to touch it.It was because the
skip
entry in[isort]
insetup.cfg
is somehow ignored when running pre-commit and I can't figure out why (I will open an issue in theisort
repo when it's clear that this will be merged). I have also deleted the other ignored files because I fixed the problems there.pandas/core/api.py
needs to stay inskip
becauseisort
andblack
make conflicting edits.