Skip to content

Commit

Permalink
pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
irgolic committed Jan 7, 2021
1 parent f2bbb02 commit 59aa70a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions Orange/widgets/data/owcsvimport.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
)
from PyQt5.QtWidgets import (
QLabel, QComboBox, QPushButton, QDialog, QDialogButtonBox, QGridLayout,
QVBoxLayout, QSizePolicy, QStyle, QFileIconProvider, QFileDialog,
QApplication, QMessageBox, QTextBrowser, QMenu
QVBoxLayout, QSizePolicy, QFileIconProvider, QFileDialog,
QApplication, QMessageBox, QTextBrowser
)
from PyQt5.QtCore import pyqtSlot as Slot, pyqtSignal as Signal

Expand Down Expand Up @@ -956,7 +956,7 @@ def _path_must_be_relative_mb(self, prefix: str) -> QMessageBox:
return mb

@Slot()
def browse(self, prefixname=None, directory=None):
def browse(self):
"""
Open a file dialog and select a user specified file.
"""
Expand Down Expand Up @@ -984,7 +984,7 @@ def browse(self, prefixname=None, directory=None):
if not mtype.inherits("text/plain"):
mb = self._might_be_binary_mb(path)
if mb.exec() == QMessageBox.Cancel:
return
return False
# initialize dialect based on selected format
dialect, header = default_options_for_mime_type(
path, selected_filter.mime_type,
Expand Down Expand Up @@ -1470,7 +1470,7 @@ def __init__(self, dialect: csv.Dialect):
super().__init__()
self.dialect = dialect

def sniff(self, *_args, **_kwargs): # pylint: disable=signature-differs
def sniff(self, *_args, **_kwargs): # pylint: disable=signature-differs, arguments-differ
# return fixed constant dialect, has_header sniffs dialect itself,
# so it can't detect headers for a predefined dialect
return self.dialect
Expand Down Expand Up @@ -1838,8 +1838,7 @@ def emitProgressChangedOrCancel(self, current, total):
"""
if self.cancel:
raise TaskState.UserCancelException()
else:
self.__progressChanged.emit(current, total)
self.__progressChanged.emit(current, total)


class TextReadWrapper(io.TextIOWrapper):
Expand Down
2 changes: 1 addition & 1 deletion Orange/widgets/utils/textimport.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
)

from PyQt5.QtCore import (
Qt, QSize, QPoint, QRect, QRectF, QRegExp, QAbstractTableModel,
Qt, QSize, QRect, QRectF, QRegExp, QAbstractTableModel,
QModelIndex, QItemSelectionModel, QTextBoundaryFinder, QTimer, QEvent
)
from PyQt5.QtCore import pyqtSignal as Signal, pyqtSlot as Slot
Expand Down

0 comments on commit 59aa70a

Please sign in to comment.