Skip to content

Comments

Remove CheckLocator abstraction#627

Merged
charliermarsh merged 1 commit intomainfrom
charlie/filter-rules
Nov 6, 2022
Merged

Remove CheckLocator abstraction#627
charliermarsh merged 1 commit intomainfrom
charlie/filter-rules

Conversation

@charliermarsh
Copy link
Member

Instead, just enforce that all checks are added via add_check, and modify the check location in the rare case that we're in an f-string.

@charliermarsh charliermarsh merged commit 85b882f into main Nov 6, 2022
@charliermarsh charliermarsh deleted the charlie/filter-rules branch November 6, 2022 22:42
konstin added a commit that referenced this pull request Aug 4, 2023
Implement fluent style/call chains. See the `call_chains.py` formatting
for examples.

This isn't fully like black because in `raise A from B` they allow `A`
breaking can influence the formatting of `B` even if it is already
multiline.

Similarity index:

| project      | main  | PR    |
|--------------|-------|-------|
| build        | ???   | 0.753 |
| django       | 0.991 | 0.998 |
| transformers | 0.993 | 0.994 |
| typeshed     | 0.723 | 0.723 |
| warehouse    | 0.978 | 0.994 |
| zulip        | 0.992 | 0.994 |

Call chain formatting is affected by
#627, but i'm cutting scope
here.

Closes #5343

**Test Plan**:
 * Added a dedicated call chains test file
 * The ecosystem checks found some bugs
 * I manually check django and zulip formatting

---------

Co-authored-by: Micha Reiser <[email protected]>
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.

1 participant