8000 [CI][lintrunner] bump `black` version to 24.4.2 by XuehaiPan · Pull Request #129870 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

[CI][lintrunner] bump black version to 24.4.2 #129870

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

Closed
wants to merge 22 commits into from

Conversation

XuehaiPan
Copy link
Collaborator
@XuehaiPan XuehaiPan commented Jul 1, 2024

This PR bumps black to the latest version to enable 2024 style rather than the old 2023 style.

The most significant style enhancement is: Add parentheses around multiline-string, lambda function, if-else expressions when in the function argument list or list / dict literals. This improves the code readability.

2023 style:

func(
    a=long_long_long_long_then_value
    if long_long_long_long_long_condition
    else long_long_long_long_else_value,
    b=other_argument,
    c=lambda x: x.to("cuda")
    if torch.cuda.is_available()
    else: x,
)

2024 style:

func(
    a=(
        long_long_long_long_then_value
        if long_long_long_long_long_condition
        else long_long_long_long_else_value
    ),
    b=other_argument,
    c=lambda x: (
        x.to("cuda")
        if torch.cuda.is_available()
        else: x
    ),
)

Stack from ghstack (oldest at bottom):

cc @XilunWu @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @mcarilli @ptrblck @leslie-fang-intel @albanD @voznesenskym @penguinwu @EikanWang @Guobing-Chen @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang @rec @LucasLLC @MeetVadakkanchery @mhorowitz @pradeepfn @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @osalpekar @jiayisuse @tianyu-l @peterbell10

[ghstack-poisoned]
Copy link
pytorch-bot bot commented Jul 1, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/129870

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit 1b3c3db with merge base fcef6cc (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@albanD albanD removed their request for review July 16, 2024 21:34
[ghstack-poisoned]
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request Jul 17, 2024
ghstack-source-id: ff4ac41
Pull Request resolved: pytorch#129870
[ghstack-poisoned]
[ghstack-poisoned]
@XuehaiPan XuehaiPan requested review from ydwu4 and angelayi as code owners July 20, 2024 09:58
[ghstack-poisoned]
[ghstack-poisoned]
@XuehaiPan XuehaiPan requested a review from kulinseth as a code owner July 20, 2024 17:43
@pytorch-bot pytorch-bot bot added the ciflow/mps Run MPS tests (subset of trunk) label Jul 20, 2024
[ghstack-poisoned]
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request Jul 20, 2024
ghstack-source-id: 541466b
Pull Request resolved: pytorch#129870
[ghstack-poisoned]
@XuehaiPan XuehaiPan requested a review from syed-ahmed as a code owner August 1, 2024 19:06
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request Aug 1, 2024
ghstack-source-id: 70b972f
Pull Request resolved: pytorch#129870
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request Aug 2, 2024
ghstack-source-id: 70b972f
Pull Request resolved: pytorch#129870
[ghstack-poisoned]
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request Aug 2, 2024
ghstack-source-id: 182f6f8
Pull Request resolved: pytorch#129870
[ghstack-poisoned]
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request Aug 3, 2024
ghstack-source-id: 7bb00ab
Pull Request resolved: pytorch#129870
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request Aug 3, 2024
ghstack-source-id: 7bb00ab
Pull Request resolved: pytorch#129870
Copy link
Contributor
github-actions bot commented Oct 2, 2024

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the Stale label Oct 2, 2024
@XuehaiPan XuehaiPan closed this Oct 2, 2024
@github-actions github-actions bot deleted the gh/XuehaiPan/96/head branch November 3, 2024 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/inductor ciflow/mps Run MPS tests (subset of trunk) ciflow/trunk Trigger trunk jobs on your pull request module: amp (automated mixed precision) autocast module: cpu CPU specific problem (e.g., perf, algorithm) module: dynamo module: inductor module: lint Issues related to our Python/C++ lint rules (run by Travis) oncall: distributed Add this issue/PR to distributed oncall triage queue open source release notes: quantization release notes category release notes: releng release notes category skip-pr-sanity-checks Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0