Skip to content

Commit

Permalink
Fixes #65: QVariant erroneously introduced with typing annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreRaybaut committed Sep 26, 2023
1 parent 34f610c commit b5bd26c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Version 3.0.5 ##

Bug fixes:

* [Issue #65](https://github.com/PlotPyStack/guidata/issues/65) - QVariant import erroneously used in typing annotations

Other changes:

* ``tests.test_callbacks``: added an example of a callback function for dynamically
Expand Down
4 changes: 2 additions & 2 deletions guidata/dataset/qtitemwidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import numpy
from qtpy.compat import getexistingdirectory
from qtpy.QtCore import Qt, QVariant
from qtpy.QtCore import Qt
from qtpy.QtGui import QColor, QIcon, QPixmap
from qtpy.QtWidgets import (
QAbstractButton,
Expand Down Expand Up @@ -318,7 +318,7 @@ def get(self) -> None:
else:
self.line_edit_changed(value)

def line_edit_changed(self, qvalue: Optional[QVariant]) -> None:
def line_edit_changed(self, qvalue: str | None) -> None:
"""QLineEdit validator"""
if qvalue is not None:
value = self.item.from_string(str(qvalue))
Expand Down

0 comments on commit b5bd26c

Please sign in to comment.