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

[FIX] plotutils: Fix and implicit conversion to int warning error #5874

Merged
merged 1 commit into from
Mar 7, 2022

Conversation

ales-erjavec
Copy link
Contributor

Issue

Distributions widget raises an error on Python 3.10 due to implicit int conversion (warning on 3.9).

----------------------------- TypeError Exception -----------------------------
Traceback (most recent call last):
  File "/home/ales/.envs/orange3/lib/python3.10/site-packages/pyqtgraph/graphicsItems/AxisItem.py", line 593, in paint
    specs = self.generateDrawSpecs(painter)
  File "/home/ales/devel/orange3/Orange/widgets/visualize/utils/plotutils.py", line 432, in generateDrawSpecs
    text_specs = [(rect, flags, elide(text, Qt.ElideRight, max_width))
  File "/home/ales/devel/orange3/Orange/widgets/visualize/utils/plotutils.py", line 432, in <listcomp>
    text_specs = [(rect, flags, elide(text, Qt.ElideRight, max_width))
TypeError: elidedText(self, str, Qt.TextElideMode, int, flags: int = 0): argument 3 has unexpected type 'float'

Workflow: File (iris) -> Distributions

Description of changes

Fix and implicit conversion to int error

Includes
  • Code changes
  • Tests
  • Documentation

@codecov
Copy link

codecov bot commented Mar 7, 2022

Codecov Report

Merging #5874 (b47c9be) into master (ea6f32d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #5874   +/-   ##
=======================================
  Coverage   86.28%   86.29%           
=======================================
  Files         315      315           
  Lines       66793    66793           
=======================================
+ Hits        57632    57636    +4     
+ Misses       9161     9157    -4     

@markotoplak markotoplak merged commit 269d7fa into biolab:master Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants