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 --max-complexity from the CLI #1877

Merged
merged 1 commit into from
Jan 14, 2023
Merged

Conversation

charliermarsh
Copy link
Member

No description provided.

@charliermarsh charliermarsh merged commit a01edad into main Jan 14, 2023
@charliermarsh charliermarsh deleted the charlie/cli-options branch January 14, 2023 23:27
@not-my-profile
Copy link
Contributor

Should this be documented in BREAKING_CHANGES.md?

@charliermarsh
Copy link
Member Author

Yeah, it should. I'll add it.

bruxisma referenced this pull request in ixm-one/pytest-cmake-presets Jan 15, 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.221` ->
`^0.0.222` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.222/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.222/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.222/compatibility-slim/0.0.221)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.222/confidence-slim/0.0.221)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

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

[Compare
Source](https://github.com/charliermarsh/ruff/compare/v0.0.221...v0.0.222)

#### What's Changed

- Add support for namespace packages by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/1859](https://github.com/charliermarsh/ruff/pull/1859)
- Improve `SIM117` by [@&#8203;harupy](https://github.com/harupy) in
[https://github.com/charliermarsh/ruff/pull/1867](https://github.com/charliermarsh/ruff/pull/1867)
- Bump RustPython by [@&#8203;bluetech](https://github.com/bluetech)
in
[https://github.com/charliermarsh/ruff/pull/1836](https://github.com/charliermarsh/ruff/pull/1836)
- Split up the table corresponding to the pylint rules by
[@&#8203;thomkeh](https://github.com/thomkeh) in
[https://github.com/charliermarsh/ruff/pull/1868](https://github.com/charliermarsh/ruff/pull/1868)
- Reduce APIs and add top-level doc comments by
[@&#8203;not-my-profile](https://github.com/not-my-profile) in
[https://github.com/charliermarsh/ruff/pull/1866](https://github.com/charliermarsh/ruff/pull/1866)
- Add Dagster and SnowCLI by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/1870](https://github.com/charliermarsh/ruff/pull/1870)
- Introduce ruff::rules module by
[@&#8203;not-my-profile](https://github.com/not-my-profile) in
[https://github.com/charliermarsh/ruff/pull/1865](https://github.com/charliermarsh/ruff/pull/1865)
- Make some internal APIs private by
[@&#8203;not-my-profile](https://github.com/not-my-profile) in
[https://github.com/charliermarsh/ruff/pull/1874](https://github.com/charliermarsh/ruff/pull/1874)
- Remove --max-complexity from the CLI by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/1877](https://github.com/charliermarsh/ruff/pull/1877)
- Fix range of SIM201, 202, and 208 by
[@&#8203;harupy](https://github.com/harupy) in
[https://github.com/charliermarsh/ruff/pull/1880](https://github.com/charliermarsh/ruff/pull/1880)
- Make the CI check for broken links in the Rust docs by
[@&#8203;not-my-profile](https://github.com/not-my-profile) in
[https://github.com/charliermarsh/ruff/pull/1883](https://github.com/charliermarsh/ruff/pull/1883)
- Turn doc references into links by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/1878](https://github.com/charliermarsh/ruff/pull/1878)

#### New Contributors

- [@&#8203;thomkeh](https://github.com/thomkeh) made their first
contribution in
[https://github.com/charliermarsh/ruff/pull/1868](https://github.com/charliermarsh/ruff/pull/1868)

**Full Changelog**:
astral-sh/ruff@v0.0.221...v0.0.222

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

Signed-off-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@cclauss
Copy link
Contributor

cclauss commented Feb 24, 2023

Not a fan of this choice... It is quite helpful when building up a new config to be able to test on the command line before writing the complete config into pyproject.toml.

@not-my-profile
Copy link
Contributor

I think the change makes sense ... mccabe.max-complexity isn't more important than any other rule-specific settings and we certainly don't want to introduce a dedicated command-line option for each of our rule-specific settings.

What we could do is introduce a more generic mechanism such as --config <KEY>=<VALUE>.

@cclauss
Copy link
Contributor

cclauss commented Mar 5, 2023

The error message is misleading because (at least on my Mac) I cannot figure out how to make -- --x escaping work.

% ruff --max-complexity=10 .

error: unexpected argument '--max-complexity' found

  note: to pass '--max-complexity' as a value, use '-- --max-complexity'

% ruff --mccabe.max-complexity=10 .

error: unexpected argument '--mccabe.max-complexity' found

  note: to pass '--max-complexity' as a value, use '-- --mccabe.max-complexity'

@charliermarsh
Copy link
Member Author

It's correct though, --max-complexity is not a supported flag. IIUC, that's a generic message telling you that if you intended it to be interpreted as a value (e.g., if you had a file named --max-complexity), you'd pass it after a double dash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants