nucleic / enaml

Declarative User Interfaces for Python
http://enaml.readthedocs.io/en/latest/
Other
1.53k stars 130 forks source link

Flow Layout sort fix for stretch or ortho_stretch > 0 #448

Closed e-calder closed 3 years ago

e-calder commented 3 years ago

Potential fix for issue mentioned in https://github.com/nucleic/enaml/issues/447

<class 'TypeError'>
'<' not supported between instances of 'QFlowWidgetItem' and 'QFlowWidgetItem'

Dont rely on Python's sort; we should not include the QFlowWidgetItem in the sort key.

Disclaimer - I had some issues running tests locally (had to start a whole new fresh python/venv environment but I'm not convinced I did it 100% correctly) so I think this test is OK.

MatthieuDartiailh commented 3 years ago

Tests timed out on GHA but not appveyor. I will try to investigate in the coming days.

MatthieuDartiailh commented 3 years ago

I merged #442 that should help with CIs. Could you rebase your patch @e-calder ?

MatthieuDartiailh commented 3 years ago

Can you also add an entry to the release notes ? After that I think this will be good to go since the tests are fine.

codecov-commenter commented 3 years ago

Codecov Report

Merging #448 (8f02a3c) into main (5477fc4) will increase coverage by 0.04%. The diff coverage is 50.00%.

@@            Coverage Diff             @@
##             main     #448      +/-   ##
==========================================
+ Coverage   73.23%   73.28%   +0.04%     
==========================================
  Files         316      316              
  Lines       24046    24046              
==========================================
+ Hits        17611    17623      +12     
+ Misses       6435     6423      -12