-
Notifications
You must be signed in to change notification settings - Fork 883
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
Cache Cargo registry on GitHub Actions #3
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
charliermarsh
force-pushed
the
charlie/cache
branch
3 times, most recently
from
August 10, 2022 20:36
602236f
to
3642a02
Compare
charliermarsh
force-pushed
the
charlie/cache
branch
from
August 10, 2022 20:37
3642a02
to
328b521
Compare
not-my-profile
added a commit
to not-my-profile/ruff
that referenced
this pull request
Jan 19, 2023
…n ruff This commit series removes the following associated function from the Violation trait: fn placeholder() -> Self; ruff previously used this placeholder approach for the messages it listed in the README and displayed when invoked with --explain <code>. This approach is suboptimal for three reasons: 1. The placeholder implementations are completely boring code since they just initialize the struct with some dummy values. 2. Displaying concrete error messages with arbitrary interpolated values can be confusing for the user since they might not recognize that the values are interpolated. 3. Some violations have varying format strings depending on the violation which could not be documented with the previous approach (while we could have changed the signature to return Vec<Self> this would still very much suffer from astral-sh#2 and astral-sh#3). We therefore drop Violation::placeholder in favor of a new macro-based approach, explaind in commit 4/5. Violation::placeholder is only invoked via Rule::kind, so we firstly have to get rid of all Rule::kind invocations ... this commit starts removing the trivial cases.
not-my-profile
added a commit
to not-my-profile/ruff
that referenced
this pull request
Jan 19, 2023
…n ruff This commit series removes the following associated function from the Violation trait: fn placeholder() -> Self; ruff previously used this placeholder approach for the messages it listed in the README and displayed when invoked with --explain <code>. This approach is suboptimal for three reasons: 1. The placeholder implementations are completely boring code since they just initialize the struct with some dummy values. 2. Displaying concrete error messages with arbitrary interpolated values can be confusing for the user since they might not recognize that the values are interpolated. 3. Some violations have varying format strings depending on the violation which could not be documented with the previous approach (while we could have changed the signature to return Vec<Self> this would still very much suffer from astral-sh#2 and astral-sh#3). We therefore drop Violation::placeholder in favor of a new macro-based approach, explaind in commit 4/5. Violation::placeholder is only invoked via Rule::kind, so we firstly have to get rid of all Rule::kind invocations ... this commit starts removing the trivial cases.
not-my-profile
added a commit
to not-my-profile/ruff
that referenced
this pull request
Jan 19, 2023
This commit series removes the following associated function from the Violation trait: fn placeholder() -> Self; ruff previously used this placeholder approach for the messages it listed in the README and displayed when invoked with --explain <code>. This approach is suboptimal for three reasons: 1. The placeholder implementations are completely boring code since they just initialize the struct with some dummy values. 2. Displaying concrete error messages with arbitrary interpolated values can be confusing for the user since they might not recognize that the values are interpolated. 3. Some violations have varying format strings depending on the violation which could not be documented with the previous approach (while we could have changed the signature to return Vec<Self> this would still very much suffer from astral-sh#2 and astral-sh#3). We therefore drop Violation::placeholder in favor of a new macro-based approach, explaind in commit 4/5. Violation::placeholder is only invoked via Rule::kind, so we firstly have to get rid of all Rule::kind invocations ... this commit starts removing the trivial cases.
charliermarsh
pushed a commit
that referenced
this pull request
Feb 14, 2023
This PR makes the formatter code more idiomatic by: * Unifying sequential `write!` calls into a single `write` * Replace `format_args![item]` with `item` (`format_args` is to format multiple arguments). You can think of `format_args` as a `Format` implementation for tuples of arbitrary size * Return an object that implements `Format` for `join_names` so that it can be used as part of the DSL `write!(f, [space, join_names(names)])` * Use `space` instead of `text(" ")`
charliermarsh
pushed a commit
that referenced
this pull request
Feb 14, 2023
This PR makes the formatter code more idiomatic by: * Unifying sequential `write!` calls into a single `write` * Replace `format_args![item]` with `item` (`format_args` is to format multiple arguments). You can think of `format_args` as a `Format` implementation for tuples of arbitrary size * Return an object that implements `Format` for `join_names` so that it can be used as part of the DSL `write!(f, [space, join_names(names)])` * Use `space` instead of `text(" ")`
charliermarsh
pushed a commit
that referenced
this pull request
Feb 14, 2023
This PR makes the formatter code more idiomatic by: * Unifying sequential `write!` calls into a single `write` * Replace `format_args![item]` with `item` (`format_args` is to format multiple arguments). You can think of `format_args` as a `Format` implementation for tuples of arbitrary size * Return an object that implements `Format` for `join_names` so that it can be used as part of the DSL `write!(f, [space, join_names(names)])` * Use `space` instead of `text(" ")`
charliermarsh
pushed a commit
that referenced
this pull request
Feb 14, 2023
This PR makes the formatter code more idiomatic by: * Unifying sequential `write!` calls into a single `write` * Replace `format_args![item]` with `item` (`format_args` is to format multiple arguments). You can think of `format_args` as a `Format` implementation for tuples of arbitrary size * Return an object that implements `Format` for `join_names` so that it can be used as part of the DSL `write!(f, [space, join_names(names)])` * Use `space` instead of `text(" ")`
charliermarsh
pushed a commit
that referenced
this pull request
Feb 14, 2023
This PR makes the formatter code more idiomatic by: * Unifying sequential `write!` calls into a single `write` * Replace `format_args![item]` with `item` (`format_args` is to format multiple arguments). You can think of `format_args` as a `Format` implementation for tuples of arbitrary size * Return an object that implements `Format` for `join_names` so that it can be used as part of the DSL `write!(f, [space, join_names(names)])` * Use `space` instead of `text(" ")`
charliermarsh
pushed a commit
that referenced
this pull request
Feb 15, 2023
This PR makes the formatter code more idiomatic by: * Unifying sequential `write!` calls into a single `write` * Replace `format_args![item]` with `item` (`format_args` is to format multiple arguments). You can think of `format_args` as a `Format` implementation for tuples of arbitrary size * Return an object that implements `Format` for `join_names` so that it can be used as part of the DSL `write!(f, [space, join_names(names)])` * Use `space` instead of `text(" ")`
charliermarsh
pushed a commit
that referenced
this pull request
Feb 15, 2023
This PR makes the formatter code more idiomatic by: * Unifying sequential `write!` calls into a single `write` * Replace `format_args![item]` with `item` (`format_args` is to format multiple arguments). You can think of `format_args` as a `Format` implementation for tuples of arbitrary size * Return an object that implements `Format` for `join_names` so that it can be used as part of the DSL `write!(f, [space, join_names(names)])` * Use `space` instead of `text(" ")`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.