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

checks: Flake8 F841 fixes in the wxpython directory part 1 #4244

Merged
merged 5 commits into from
Sep 18, 2024

Conversation

mshukuno
Copy link
Contributor

Description

Flake8 F841 (local variable assigned to but never used) fixes in the gui/wxpython/animation and gui/wxpython/core directory.

Motivation and context

Changes require resolving a part of Flake8 warnings that are currently ignored. The issue title and number as follows.

  • [Bug] Fix currently ignored Flake8 warnings #1522

How has this been tested?

animation:
Bify tested entering multiple raster datasets and it worked.

core:
Not tested.

Types of changes

Two declarations of unused functions were deleted.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing
    functionality to not work as before)

Checklist

  • PR title provides summary of the changes and starts with one of the
    pre-defined prefixes
  • My code follows the code style
    of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@github-actions github-actions bot added GUI wxGUI related Python Related code is in Python labels Aug 28, 2024
Copy link
Contributor

@petrasovaa petrasovaa left a comment

Choose a reason for hiding this comment

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

Looks like the .flake8 misses changes in wxpython/animation

gui/wxpython/core/utils.py Outdated Show resolved Hide resolved
gui/wxpython/core/utils.py Outdated Show resolved Hide resolved
Copy link
Member

@wenzeslaus wenzeslaus left a comment

Choose a reason for hiding this comment

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

This looks good to me. I was not sure about keeping reference to wx.App around, but I don't see any specific instructions in the doc. Plus now I see that it is a test. Let me know if you want more feedback from me here for some reason.

@mshukuno
Copy link
Contributor Author

The initialization of wx.App is required by all wxPython applications, unless I misunderstood.
"Every wxPython app is an instance of wx.App."

My apologies for not understanding what you meant by "Plus now I see it's a test"?

@petrasovaa petrasovaa merged commit 0536351 into OSGeo:main Sep 18, 2024
26 checks passed
@mshukuno mshukuno deleted the flake8-F841-wx-1 branch September 19, 2024 17:11
@neteler neteler added this to the 8.5.0 milestone Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI wxGUI related Python Related code is in Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants