-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Enable isort-style required-imports
enforcement
#1762
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Two more things here: (1) support straight imports ( |
charliermarsh
force-pushed
the
charlie/add-imports
branch
2 times, most recently
from
January 10, 2023 04:44
0762960
to
811dcaa
Compare
charliermarsh
force-pushed
the
charlie/add-imports
branch
from
January 10, 2023 22:48
811dcaa
to
359db7e
Compare
charliermarsh
force-pushed
the
charlie/add-imports
branch
from
January 10, 2023 22:55
359db7e
to
5a1dc78
Compare
renovate bot
referenced
this pull request
in ixm-one/pytest-cmake-presets
Jan 11, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ruff](https://github.com/charliermarsh/ruff) | `^0.0.217` -> `^0.0.218` | [![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.218/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.218/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.218/compatibility-slim/0.0.217)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.218/confidence-slim/0.0.217)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>charliermarsh/ruff</summary> ### [`v0.0.218`](https://github.com/charliermarsh/ruff/releases/tag/v0.0.218) [Compare Source](https://github.com/charliermarsh/ruff/compare/v0.0.217...v0.0.218) #### What's Changed - Implement flake8-simplify SIM112 by [@​messense](https://github.com/messense) in [https://github.com/charliermarsh/ruff/pull/1764](https://github.com/charliermarsh/ruff/pull/1764) - Do not autofix PT004 and PT005 by [@​harupy](https://github.com/harupy) in [https://github.com/charliermarsh/ruff/pull/1763](https://github.com/charliermarsh/ruff/pull/1763) - Disable release builds on CI by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1761](https://github.com/charliermarsh/ruff/pull/1761) - Move CONTRIBUTING.md to top-level by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1768](https://github.com/charliermarsh/ruff/pull/1768) - \[`flake8-bandit`] Add Rule for `S508` (snmp insecure version) & `S509` (snmp weak cryptography) by [@​saadmk11](https://github.com/saadmk11) in [https://github.com/charliermarsh/ruff/pull/1771](https://github.com/charliermarsh/ruff/pull/1771) - Generate RuleCode::origin() via macro by [@​not-my-profile](https://github.com/not-my-profile) in [https://github.com/charliermarsh/ruff/pull/1770](https://github.com/charliermarsh/ruff/pull/1770) - Disable doctests by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1772](https://github.com/charliermarsh/ruff/pull/1772) - Enable isort-style `required-imports` enforcement by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1762](https://github.com/charliermarsh/ruff/pull/1762) - Pyupgrade: Format specifiers by [@​colin99d](https://github.com/colin99d) in [https://github.com/charliermarsh/ruff/pull/1594](https://github.com/charliermarsh/ruff/pull/1594) - Avoid B023 false-positives for some common builtins by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1776](https://github.com/charliermarsh/ruff/pull/1776) **Full Changelog**: astral-sh/ruff@v0.0.217...v0.0.218 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/ixm-one/pytest-cmake-presets). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC45Ny4xIiwidXBkYXRlZEluVmVyIjoiMzQuOTcuMSJ9--> Signed-off-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Amazing timing @charliermarsh - I just went looking for this for Airflow |
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In isort, this is called
add-imports
, but I prefer the declarative name.The idea is that by adding the following to your
pyproject.toml
, you can ensure that the import is included in all files:I mostly reverse-engineered isort's logic for making decisions, though I made some slight tweaks that I think are preferable. A few comments:
__init__.py
).Resolves #1700.