Skip to content

Disallow --unique alongside --ignore-cases in file-contents-sorter#1095

Merged
asottile merged 1 commit into
pre-commit:mainfrom
nemacysts:file-contents-sorter-mutex
Oct 26, 2024
Merged

Disallow --unique alongside --ignore-cases in file-contents-sorter#1095
asottile merged 1 commit into
pre-commit:mainfrom
nemacysts:file-contents-sorter-mutex

Conversation

@nemacysts

Copy link
Copy Markdown
Contributor

Closes #794: using these flags at the same time results in undefined behavior - the final ordering is not guaranteed as --unique breaks sorting due to passing the contents through a set.

NOTE: I added a newline before and after the mutex group to be consistent with other usages of mutex groups (e.g., check_builtin_literals.py) in this repo.

@nemacysts nemacysts marked this pull request as ready for review October 7, 2024 02:03
Closes #794: using these flags at the same time results in undefined
behavior - the final ordering is not guaranteed as --unique breaks
sorting due to passing the contents through a set.

NOTE: I added a newline before and after the mutex group to be
consistent with other usages of mutex groups (e.g.,
check_builtin_literals.py) in this repo.

@asottile asottile left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asottile asottile enabled auto-merge October 26, 2024 19:06
@asottile asottile merged commit 0beaecb into pre-commit:main Oct 26, 2024
apricote pushed a commit to hetznercloud/fleeting-plugin-hetzner that referenced this pull request Aug 11, 2025
… (hetznercloud/fleeting-plugin-hetzner!264)

This MR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [pre-commit/pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks) | repository | major | `v5.0.0` -> `v6.0.0` |

Note: The `pre-commit` manager in Renovate is not supported by the `pre-commit` maintainers or community. Please do not report any problems there, instead [create a Discussion in the Renovate repository](https://github.com/renovatebot/renovate/discussions/new) if you have any questions.

---

### Release Notes

<details>
<summary>pre-commit/pre-commit-hooks (pre-commit/pre-commit-hooks)</summary>

### [`v6.0.0`](https://github.com/pre-commit/pre-commit-hooks/releases/tag/v6.0.0): pre-commit-hooks v6.0.0

[Compare Source](pre-commit/pre-commit-hooks@v5.0.0...v6.0.0)

#### Fixes

- `check-shebang-scripts-are-executable`: improve error message.
  - [#&#8203;1115](pre-commit/pre-commit-hooks#1115) MR by [@&#8203;homebysix](https://github.com/homebysix).

#### Migrating

- now requires python >= 3.9.
  - [#&#8203;1098](pre-commit/pre-commit-hooks#1098) MR by [@&#8203;asottile](https://github.com/asottile).
- `file-contents-sorter`: disallow `--unique` and `--ignore-case` at the same
  time.
  - [#&#8203;1095](pre-commit/pre-commit-hooks#1095) MR by [@&#8203;nemacysts](https://github.com/nemacysts).
  - [#&#8203;794](pre-commit/pre-commit-hooks#794) issue by [@&#8203;teksturi](https://github.com/teksturi).
- Removed `check-byte-order-marker` and `fix-encoding-pragma`.
  - `check-byte-order-marker`: migrate to `fix-byte-order-marker`.
  - `fix-encoding-pragma`: migrate to `pyupgrade`.
  - [#&#8203;1034](pre-commit/pre-commit-hooks#1034) MR by [@&#8203;mxr](https://github.com/mxr).
  - [#&#8203;1032](pre-commit/pre-commit-hooks#1032) issue by [@&#8203;mxr](https://github.com/mxr).
  - [#&#8203;522](pre-commit/pre-commit-hooks#522) MR by [@&#8203;jgowdy](https://github.com/jgowdy).

</details>

---

### Configuration

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

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS42MS4xIiwidXBkYXRlZEluVmVyIjoiNDEuNjEuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
pat-s pushed a commit to devxygmbh/ansible-data-science-core that referenced this pull request Jan 22, 2026
… (#72)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [pre-commit/pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks) | repository | major | `v5.0.0` -> `v6.0.0` |

Note: The `pre-commit` manager in Renovate is not supported by the `pre-commit` maintainers or community. Please do not report any problems there, instead [create a Discussion in the Renovate repository](https://github.com/renovatebot/renovate/discussions/new) if you have any questions.

---

### Release Notes

<details>
<summary>pre-commit/pre-commit-hooks (pre-commit/pre-commit-hooks)</summary>

### [`v6.0.0`](https://github.com/pre-commit/pre-commit-hooks/releases/tag/v6.0.0): pre-commit-hooks v6.0.0

[Compare Source](pre-commit/pre-commit-hooks@v5.0.0...v6.0.0)

#### Fixes

- `check-shebang-scripts-are-executable`: improve error message.
  - [#&#8203;1115](pre-commit/pre-commit-hooks#1115) PR by [@&#8203;homebysix](https://github.com/homebysix).

#### Migrating

- now requires python >= 3.9.
  - [#&#8203;1098](pre-commit/pre-commit-hooks#1098) PR by [@&#8203;asottile](https://github.com/asottile).
- `file-contents-sorter`: disallow `--unique` and `--ignore-case` at the same
  time.
  - [#&#8203;1095](pre-commit/pre-commit-hooks#1095) PR by [@&#8203;nemacysts](https://github.com/nemacysts).
  - [#&#8203;794](pre-commit/pre-commit-hooks#794) issue by [@&#8203;teksturi](https://github.com/teksturi).
- Removed `check-byte-order-marker` and `fix-encoding-pragma`.
  - `check-byte-order-marker`: migrate to `fix-byte-order-marker`.
  - `fix-encoding-pragma`: migrate to `pyupgrade`.
  - [#&#8203;1034](pre-commit/pre-commit-hooks#1034) PR by [@&#8203;mxr](https://github.com/mxr).
  - [#&#8203;1032](pre-commit/pre-commit-hooks#1032) issue by [@&#8203;mxr](https://github.com/mxr).
  - [#&#8203;522](pre-commit/pre-commit-hooks#522) PR by [@&#8203;jgowdy](https://github.com/jgowdy).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **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 [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS42MC4zIiwidXBkYXRlZEluVmVyIjoiNDEuNjAuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://codefloe.com/devxy/ansible-data-science-core/pulls/72
Co-authored-by: devxy-bot <no-reply@devxy.io>
Co-committed-by: devxy-bot <no-reply@devxy.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants