-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Improve call chain #4153
Improve call chain #4153
Conversation
diff-shades results comparing this PR (8009888) to main (b7c3a9f). The full diff is available in the logs under the "Generate HTML diff report" step.
|
Seems like a lot of the diff in diff shades only have one method call. This in particular seems especially bad: assert (
makeFY5253NearestEndMonthQuarter(
weekday=1, startingMonth=3, qtr_with_extra_week=3
- ).freqstr
+ )
+ .freqstr
== "REQ-N-MAR-TUE-3"
) |
src/black/comments.py
Outdated
for comment in comment_line.strip(_COMMENT_PREFIX).split( | ||
_COMMENT_LIST_SEPARATOR | ||
) | ||
for comment in comment_line.strip(_COMMENT_PREFIX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels worse than the previous formatting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also don't like the new one, I personaly like is:
for comment in (
comment_line.strip(_COMMENT_PREFIX).split(_COMMENT_LIST_SEPARATOR)
)
anyway, I will revert this change.
if delimiter_priority == DOT_PRIORITY: | ||
if bt.delimiter_count_with_priority(delimiter_priority) == 1: | ||
raise CannotSplit("Splitting a single attribute from its owner looks wrong") | ||
if ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to keep this one as is, see the comment on the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I'm not quite sure which COMMENT you're referring to?
Looking at the diff-shades output, a lot of changes feel like mild negatives, e.g. self.assertTrue(
- logger.messages[0].startswith(
+ logger.messages[0]
+ .startswith(
"route matched for url http://localhost:8080"
"/archives/action1/article1; "
"route_name: 'foo', "
"path_info: "
) - assert repr_locals.lines[0].startswith(
- "x = <[NotImplementedError() raised in repr()] ObjWithErrorInRepr"
+ assert (
+ repr_locals.lines[0]
+ .startswith(
+ "x = <[NotImplementedError() raised in repr()]"
+ " ObjWithErrorInRepr"
+ )
) |
Fixes #571