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] Word Enrichment - fix PyQt6 incompatibility and sort imports #901

Merged
merged 1 commit into from
Sep 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions orangecontrib/text/widgets/owwordenrichment.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@
from typing import List, Optional

import numpy as np

from AnyQt.QtWidgets import QTreeWidget, QTreeView, QTreeWidgetItem

from Orange.data import Table, Domain, ContinuousVariable, StringVariable
from AnyQt.QtCore import QSize, Qt
from AnyQt.QtWidgets import QTreeView, QTreeWidget, QTreeWidgetItem
from Orange.data import ContinuousVariable, Domain, StringVariable, Table
from Orange.statistics.util import FDR
from Orange.widgets import gui
from Orange.widgets.settings import Setting
from Orange.widgets.utils.concurrent import ConcurrentWidgetMixin, TaskState
from Orange.widgets.widget import OWWidget, Msg, Input, Output
from Orange.statistics.util import FDR
from AnyQt.QtCore import QSize
from Orange.widgets.widget import Input, Msg, Output, OWWidget

from orangecontrib.text import Corpus
from orangecontrib.text.util import np_sp_sum
from orangecontrib.text.stats import hypergeom_p_values
from orangecontrib.text.util import np_sp_sum
from orangecontrib.text.widgets.utils.words import create_words_table


Expand Down Expand Up @@ -125,7 +124,7 @@ def __init__(self):
self.sig_words.setHeaderLabels(self.cols)
self.sig_words.setSortingEnabled(True)
self.sig_words.setSelectionMode(QTreeView.NoSelection)
self.sig_words.sortByColumn(1, 0) # 0 is ascending order
self.sig_words.sortByColumn(1, Qt.AscendingOrder)
for i in range(len(self.cols)):
self.sig_words.resizeColumnToContents(i)
self.mainArea.layout().addWidget(self.sig_words)
Expand Down