Skip to content
New issue

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

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

Already on GitHub? # 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.

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

Successfully merging this pull request may close these issues.

3 participants