Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove --max-complexity from the CLI - #1877

Merged
charliermarsh merged 1 commit into
mainfrom
charlie/cli-options
Jan 14, 2023
Merged

Remove --max-complexity from the CLI#1877
charliermarsh merged 1 commit into
mainfrom
charlie/cli-options

Conversation

@charliermarsh

Copy link
Copy Markdown
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
Copy Markdown
Contributor

Should this be documented in BREAKING_CHANGES.md?

@charliermarsh

Copy link
Copy Markdown
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://togithub.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://togithub.com/charliermarsh/ruff/releases/tag/v0.0.222)

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

#### What's Changed

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

#### New Contributors

- [@&#8203;thomkeh](https://togithub.com/thomkeh) made their first
contribution in
[https://github.com/charliermarsh/ruff/pull/1868](https://togithub.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 <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@cclauss

cclauss commented Feb 24, 2023

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

cclauss commented Mar 5, 2023

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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.

AlexWaygood pushed a commit that referenced this pull request Jan 11, 2026
Analyze mypy's test suite to identify diagnostics that mypy emits
but ty currently does not. Key findings include:

- 2,159 diagnostic gaps identified across 1,748 test cases
- 5 new diagnostic categories not currently tracked:
  - Cannot assign to method/type (88 occurrences)
  - Needs type annotation hints (28 occurrences)
  - Missing return statement (21 occurrences)
  - Invalid self argument (12 occurrences)
  - Cannot redefine as Final (10 occurrences)

Many existing gaps are already tracked (e.g., abstract class
instantiation in #1877) or are deliberate behavior differences.
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