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

[Qt6] Fix AttributeError on renaming layer #5850

Merged
merged 3 commits into from
May 25, 2023

Conversation

aganders3
Copy link
Contributor

Fixes/Closes

Closes #5849

Description

This is a pretty simple fix, but is also backward-compatible in my testing with Qt5. I added a test to cover this method for the future. I can look into adding more tests for that file as well.

Type of change

  • Bug-fix (non-breaking change which fixes an issue)

How has this been tested?

Added a test for this feature that fails without a062d79.

This test passes with a062d79 on both Qt5 and Qt6.

Final checklist:

  • My PR is the minimum possible work for the desired functionality
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • If I included new strings, I have used trans. to make them localizable.
    For more information see our translations guide.

@aganders3 aganders3 changed the title Fix/rename layer qt6 [Qt6] Fix AttributeError on renaming layer May 18, 2023
@github-actions github-actions bot added qt Relates to qt tests Something related to our tests labels May 18, 2023
@psobolewskiPhD psobolewskiPhD added the bugfix PR with bugfix label May 18, 2023
@codecov
Copy link

codecov bot commented May 18, 2023

Codecov Report

Merging #5850 (6f0e5c3) into main (0dfb37b) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #5850      +/-   ##
==========================================
+ Coverage   89.96%   89.98%   +0.01%     
==========================================
  Files         615      615              
  Lines       52638    52647       +9     
==========================================
+ Hits        47358    47376      +18     
+ Misses       5280     5271       -9     
Impacted Files Coverage Δ
napari/_qt/containers/_layer_delegate.py 66.66% <ø> (+6.06%) ⬆️
napari/_qt/containers/_tests/test_qt_layer_list.py 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes

Copy link
Member

@psobolewskiPhD psobolewskiPhD left a comment

Choose a reason for hiding this comment

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

This works for me in both pyqt6 and pyqt5.
The fix looks correct to me, which can be confirmed reading:
https://doc.qt.io/qtforpython-6/considerations.html#forgiveness-mode-and-type-hints

@jni jni merged commit 5082235 into napari:main May 25, 2023
32 checks passed
@Czaki Czaki added this to the 0.4.18 milestone May 25, 2023
@Czaki Czaki mentioned this pull request Jun 7, 2023
Czaki pushed a commit that referenced this pull request Jun 19, 2023
# Fixes/Closes

Closes #5849

# Description

This is a pretty simple fix, but is also backward-compatible in my
testing with Qt5. I added a test to cover this method for the future. I
can look into adding more tests for that file as well.

## Type of change
- [x] Bug-fix (non-breaking change which fixes an issue)

# How has this been tested?
Added a test for this feature that fails without
a062d79.

This test passes with a062d79 on both
Qt5 and Qt6.

## Notes

@psobolewskiPhD:

> This works for me in both pyqt6 and pyqt5.
> The fix looks correct to me, which can be confirmed reading:
> doc.qt.io/qtforpython-6/considerations.html#forgiveness-mode-and-type-hints
Czaki pushed a commit that referenced this pull request Jun 21, 2023
# Fixes/Closes

Closes #5849

# Description

This is a pretty simple fix, but is also backward-compatible in my
testing with Qt5. I added a test to cover this method for the future. I
can look into adding more tests for that file as well.

## Type of change
- [x] Bug-fix (non-breaking change which fixes an issue)

# How has this been tested?
Added a test for this feature that fails without
a062d79.

This test passes with a062d79 on both
Qt5 and Qt6.

## Notes

@psobolewskiPhD:

> This works for me in both pyqt6 and pyqt5.
> The fix looks correct to me, which can be confirmed reading:
> doc.qt.io/qtforpython-6/considerations.html#forgiveness-mode-and-type-hints
Czaki pushed a commit that referenced this pull request Jun 21, 2023
# Fixes/Closes

Closes #5849

# Description

This is a pretty simple fix, but is also backward-compatible in my
testing with Qt5. I added a test to cover this method for the future. I
can look into adding more tests for that file as well.

## Type of change
- [x] Bug-fix (non-breaking change which fixes an issue)

# How has this been tested?
Added a test for this feature that fails without
a062d79.

This test passes with a062d79 on both
Qt5 and Qt6.

## Notes

@psobolewskiPhD:

> This works for me in both pyqt6 and pyqt5.
> The fix looks correct to me, which can be confirmed reading:
> doc.qt.io/qtforpython-6/considerations.html#forgiveness-mode-and-type-hints
Czaki pushed a commit that referenced this pull request Jun 21, 2023
# Fixes/Closes

Closes #5849

# Description

This is a pretty simple fix, but is also backward-compatible in my
testing with Qt5. I added a test to cover this method for the future. I
can look into adding more tests for that file as well.

## Type of change
- [x] Bug-fix (non-breaking change which fixes an issue)

# How has this been tested?
Added a test for this feature that fails without
a062d79.

This test passes with a062d79 on both
Qt5 and Qt6.

## Notes

@psobolewskiPhD:

> This works for me in both pyqt6 and pyqt5.
> The fix looks correct to me, which can be confirmed reading:
> doc.qt.io/qtforpython-6/considerations.html#forgiveness-mode-and-type-hints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix PR with bugfix qt Relates to qt tests Something related to our tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Qt6] AttributeError when renaming a layer
4 participants