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

Use context manager when possible #6484

Merged
merged 5 commits into from Aug 26, 2022

Conversation

rfezzani
Copy link
Member

Description

Completes #6458 refactoring.

Checklist

  • Docstrings for all functions
  • Gallery example in ./doc/examples (new features only)
  • Benchmark in ./benchmarks, if your changes aren't covered by an
    existing benchmark
  • Unit tests
  • Clean style in the spirit of PEP8
  • Descriptive commit messages (see below)

For reviewers

  • Check that the PR title is short, concise, and will make sense 1 year
    later.
  • Check that new functions are imported in corresponding __init__.py.
  • Check that new features, API changes, and deprecations are mentioned in
    doc/release/release_dev.rst.
  • There is a bot to help automate backporting a PR to an older branch. For
    example, to backport to v0.19.x after merging, add the following in a PR
    comment: @meeseeksdev backport to v0.19.x
  • To run benchmarks on a PR, add the run-benchmark label. To rerun, the label
    can be removed and then added again. The benchmark output can be checked in
    the "Actions" tab.

@pep8speaks
Copy link

pep8speaks commented Aug 23, 2022

Hello @rfezzani! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 470:23: E231 missing whitespace after ','
Line 506:51: E231 missing whitespace after ','

Line 41:80: E501 line too long (80 > 79 characters)

Comment last updated at 2022-08-24 09:39:20 UTC

@rfezzani rfezzani added the 🔧 type: Maintenance Refactoring and maintenance of internals label Aug 23, 2022
Copy link
Member

@lagru lagru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rfezzani for completing this obvious improvement. May I suggest two more candidates:

I don't think these are covered by #6458 which I don't want to hold up further.

Otherwise looks good! 👍

Copy link
Member

@lagru lagru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing my suggestions. Looks ready to merge in my opinion. But perhaps we should wait until #6458 is merged to avoid merge conflicts for that first-time contribution..

@rfezzani
Copy link
Member Author

Thank you @lagru.

@soupault soupault merged commit c129f02 into scikit-image:main Aug 26, 2022
@soupault
Copy link
Member

Fantastic, thank you @rfezzani !

@alexdesiqueira
Copy link
Member

Thank you @rfezzani!

@jarrodmillman jarrodmillman added this to the 0.20 milestone Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔧 type: Maintenance Refactoring and maintenance of internals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants