Skip to content
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

[Refactor] Add pyupgrade pre-commit hook #2078

Merged
merged 2 commits into from
Sep 19, 2022

Conversation

xiexinch
Copy link
Collaborator

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

Add pyupgrade pre-commit hook to automatically upgrade syntax for newer versions of the language.

Ref open-mmlab/mmcv#1937

Modification

  • .pre-commit-config.yaml
  • Some Python files need to be upgraded to python3.6+.

BC-breaking (Optional)

No

Use cases (Optional)

No

@codecov
Copy link

codecov bot commented Sep 15, 2022

Codecov Report

Base: 83.10% // Head: 83.10% // No change to project coverage 👍

Coverage data is based on head (cb054c5) compared to base (fffb9e2).
Patch coverage: 91.71% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff            @@
##           dev-1.x    #2078   +/-   ##
========================================
  Coverage    83.10%   83.10%           
========================================
  Files          138      138           
  Lines         7779     7779           
  Branches      1246     1246           
========================================
  Hits          6465     6465           
  Misses        1130     1130           
  Partials       184      184           
Flag Coverage Δ
unittests 83.10% <91.71%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmseg/evaluation/metrics/iou_metric.py 77.41% <0.00%> (ø)
mmseg/models/decode_heads/enc_head.py 26.25% <0.00%> (ø)
mmseg/models/decode_heads/knet_head.py 14.12% <0.00%> (ø)
mmseg/models/decode_heads/point_head.py 18.89% <0.00%> (ø)
mmseg/models/decode_heads/stdc_head.py 27.27% <0.00%> (ø)
mmseg/models/losses/dice_loss.py 28.84% <0.00%> (ø)
mmseg/models/losses/focal_loss.py 12.87% <0.00%> (ø)
mmseg/models/losses/lovasz_loss.py 16.66% <0.00%> (ø)
mmseg/models/utils/encoding.py 25.00% <0.00%> (ø)
mmseg/utils/collect_env.py 40.00% <0.00%> (ø)
... and 69 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MeowZheng MeowZheng merged commit 230246f into open-mmlab:dev-1.x Sep 19, 2022
MeowZheng pushed a commit to MeowZheng/mmsegmentation that referenced this pull request Nov 1, 2022
* add pyupgrade hook

* run pyupgrade precommit hook
@MeowZheng MeowZheng added the 1.x Related issue of 1.x version label Nov 1, 2022
aravind-h-v pushed a commit to aravind-h-v/mmsegmentation that referenced this pull request Mar 27, 2023
* [lora] Log images when using tensorboard.

* Specify image format instead of transposing.

As discussed with @sayakpaul.

* Style
nahidnazifi87 pushed a commit to nahidnazifi87/mmsegmentation_playground that referenced this pull request Apr 5, 2024
* add pyupgrade hook

* run pyupgrade precommit hook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x Related issue of 1.x version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants