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

Remove multiple-statements-on-one-line-def (E704) #2773

Merged
merged 1 commit into from Feb 11, 2023
Merged

Conversation

charliermarsh
Copy link
Member

When I implemented this, I didn't realize that it's off-by-default in pycodestyle and Flake8, because they are "not rules unanimously accepted, and PEP 8 does not enforce them". Rather than opt-in to the complexity of maintaining an ignore list, I'd rather just omit those rules entirely.

See: https://pycodestyle.pycqa.org/en/latest/intro.html.

Closes #2763.

@charliermarsh charliermarsh added the breaking Breaking API change label Feb 11, 2023
@charliermarsh charliermarsh merged commit ffb4e89 into main Feb 11, 2023
@charliermarsh charliermarsh deleted the charlie/ignore branch February 11, 2023 17:34
@not-my-profile
Copy link
Contributor

not-my-profile commented Feb 11, 2023

You forgot to run cargo dev generate-all, see the CI failure on main.

messense added a commit to PyO3/maturin that referenced this pull request Feb 12, 2023
This reverts commit 8859eea.

The rule was removed from Ruff: astral-sh/ruff#2773
renovate bot added a commit to ixm-one/pytest-cmake-presets that referenced this pull request Feb 13, 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://togithub.com/charliermarsh/ruff) | `^0.0.245` ->
`^0.0.246` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.246/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.246/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.246/compatibility-slim/0.0.245)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.246/confidence-slim/0.0.245)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>charliermarsh/ruff</summary>

###
[`v0.0.246`](https://togithub.com/charliermarsh/ruff/releases/tag/v0.0.246)

[Compare
Source](https://togithub.com/charliermarsh/ruff/compare/v0.0.245...v0.0.246)

<!-- Release notes generated using configuration in .github/release.yml
at main -->

#### What's Changed

##### Breaking Changes

- Remove multiple-statements-on-one-line-def (E704) by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2773

##### Rules

- \[`flake8-pyi`]: add rules for unrecognized platform check (PYI007,
PYI008) by [@&#8203;SigureMo](https://togithub.com/SigureMo) in
[astral-sh/ruff#2805
- \[`flake8-simplify`]: combine-if-conditions by
[@&#8203;colin99d](https://togithub.com/colin99d) in
[astral-sh/ruff#2823
- \[`flake8-django`] Implemented flake8-django plugin rules by
[@&#8203;konysko](https://togithub.com/konysko) in
[astral-sh/ruff#2586

##### CLI

- Implement `config` subcommand by
[@&#8203;not-my-profile](https://togithub.com/not-my-profile) in
[astral-sh/ruff#2775
- Add rendering of rule markdown for terminal output by
[@&#8203;ngnpope](https://togithub.com/ngnpope) in
[astral-sh/ruff#2747
- Add `--show-fixes` flag to show applied fixes by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2707

##### Settings

- implemented option lines-between-types for isort by
[@&#8203;PushUpek](https://togithub.com/PushUpek) in
[astral-sh/ruff#2762

##### Autofix

- \[`pyflakes`] Support unused variable removal in multi-assignment
statements by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2786
- \[`flake8-comprehensions`] autofix C414 and C417 + bugfix by
[@&#8203;sbrugman](https://togithub.com/sbrugman) in
[astral-sh/ruff#2693
- \[`flake8-comprehensions`] bugfix for C413 autofix by
[@&#8203;sbrugman](https://togithub.com/sbrugman) in
[astral-sh/ruff#2804
- \[`flake8-simplify`] Use smarter inversion for comparison checks by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2831
- \[`flake8-comprehensions`] improve autofix for C401, C402 and C417 by
[@&#8203;sbrugman](https://togithub.com/sbrugman) in
[astral-sh/ruff#2806

##### Bug Fixes

- Ignore colon-after-lambda in compound statement rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2771
- Don't treat all future import accesses as non-runtime by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2774
- Avoid treating deferred string annotations as required-at-runtime by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2779
- Respect continuations in `noqa` enforcement by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2783
- Improve unused-variable autofixes for with statements by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2785
- Refactor generator to use Astor-derived precedence levels by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2798
- Allow private accesses on super calls by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2815
- Allow non-verbose raise when cause is present by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2816
- Avoid duplicates in if-with-same-arms by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2827
- Include package inference during --add-noqa command by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2832
- Allow compound statements of single ellipsis by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2837

#### New Contributors

- [@&#8203;trag1c](https://togithub.com/trag1c) made their first
contribution in
[astral-sh/ruff#2757
- [@&#8203;PushUpek](https://togithub.com/PushUpek) made their first
contribution in
[astral-sh/ruff#2762
- [@&#8203;konysko](https://togithub.com/konysko) made their first
contribution in
[astral-sh/ruff#2586
- [@&#8203;SigureMo](https://togithub.com/SigureMo) made their first
contribution in
[astral-sh/ruff#2805

**Full Changelog**:
astral-sh/ruff@v0.0.245...v0.0.246

</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:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMzMuMCIsInVwZGF0ZWRJblZlciI6IjM0LjEzMy4wIn0=-->

Signed-off-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot added a commit to allenporter/flux-local that referenced this pull request Feb 14, 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://togithub.com/charliermarsh/ruff) | `==0.0.245` ->
`==0.0.246` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.246/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.246/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.246/compatibility-slim/0.0.245)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.246/confidence-slim/0.0.245)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>charliermarsh/ruff</summary>

###
[`v0.0.246`](https://togithub.com/charliermarsh/ruff/releases/tag/v0.0.246)

[Compare
Source](https://togithub.com/charliermarsh/ruff/compare/v0.0.245...v0.0.246)

<!-- Release notes generated using configuration in .github/release.yml
at main -->

#### What's Changed

##### Breaking Changes

- Remove multiple-statements-on-one-line-def (E704) by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2773

##### Rules

- \[`flake8-pyi`]: add rules for unrecognized platform check (PYI007,
PYI008) by [@&#8203;SigureMo](https://togithub.com/SigureMo) in
[astral-sh/ruff#2805
- \[`flake8-simplify`]: combine-if-conditions by
[@&#8203;colin99d](https://togithub.com/colin99d) in
[astral-sh/ruff#2823
- \[`flake8-django`] Implemented flake8-django plugin rules by
[@&#8203;konysko](https://togithub.com/konysko) in
[astral-sh/ruff#2586

##### CLI

- Implement `config` subcommand by
[@&#8203;not-my-profile](https://togithub.com/not-my-profile) in
[astral-sh/ruff#2775
- Add rendering of rule markdown for terminal output by
[@&#8203;ngnpope](https://togithub.com/ngnpope) in
[astral-sh/ruff#2747
- Add `--show-fixes` flag to show applied fixes by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2707

##### Settings

- implemented option lines-between-types for isort by
[@&#8203;PushUpek](https://togithub.com/PushUpek) in
[astral-sh/ruff#2762

##### Autofix

- \[`pyflakes`] Support unused variable removal in multi-assignment
statements by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2786
- \[`flake8-comprehensions`] autofix C414 and C417 + bugfix by
[@&#8203;sbrugman](https://togithub.com/sbrugman) in
[astral-sh/ruff#2693
- \[`flake8-comprehensions`] bugfix for C413 autofix by
[@&#8203;sbrugman](https://togithub.com/sbrugman) in
[astral-sh/ruff#2804
- \[`flake8-simplify`] Use smarter inversion for comparison checks by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2831
- \[`flake8-comprehensions`] improve autofix for C401, C402 and C417 by
[@&#8203;sbrugman](https://togithub.com/sbrugman) in
[astral-sh/ruff#2806

##### Bug Fixes

- Ignore colon-after-lambda in compound statement rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2771
- Don't treat all future import accesses as non-runtime by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2774
- Avoid treating deferred string annotations as required-at-runtime by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2779
- Respect continuations in `noqa` enforcement by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2783
- Improve unused-variable autofixes for with statements by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2785
- Refactor generator to use Astor-derived precedence levels by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2798
- Allow private accesses on super calls by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2815
- Allow non-verbose raise when cause is present by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2816
- Avoid duplicates in if-with-same-arms by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2827
- Include package inference during --add-noqa command by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2832
- Allow compound statements of single ellipsis by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#2837

#### New Contributors

- [@&#8203;trag1c](https://togithub.com/trag1c) made their first
contribution in
[astral-sh/ruff#2757
- [@&#8203;PushUpek](https://togithub.com/PushUpek) made their first
contribution in
[astral-sh/ruff#2762
- [@&#8203;konysko](https://togithub.com/konysko) made their first
contribution in
[astral-sh/ruff#2586
- [@&#8203;SigureMo](https://togithub.com/SigureMo) made their first
contribution in
[astral-sh/ruff#2805

**Full Changelog**:
astral-sh/ruff@v0.0.245...v0.0.246

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, 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/allenporter/flux-local).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMzMuMCIsInVwZGF0ZWRJblZlciI6IjM0LjEzMy4wIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Synss added a commit to Synss/python-mbedtls that referenced this pull request Mar 7, 2023
Ruff completely removed the rule in 0.0.246.

See also:
  astral-sh/ruff#2773
Synss added a commit to Synss/python-mbedtls that referenced this pull request Mar 7, 2023
Ruff completely removed the rule in 0.0.246.

See also:
  astral-sh/ruff#2773
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking API change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ruff and black disagree on .pyi format for one line def
2 participants