Skip to content

Commit

Permalink
Linter
Browse files Browse the repository at this point in the history
  • Loading branch information
drew2a committed Jan 20, 2023
1 parent d5a166a commit 0644084
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/tribler/gui/debug_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import socket
import sys
from binascii import unhexlify
from time import localtime, strftime, time
from typing import Dict

Expand All @@ -13,7 +14,6 @@
from PyQt5.QtCore import QTimer, Qt, pyqtSignal
from PyQt5.QtGui import QBrush, QColor, QTextCursor
from PyQt5.QtWidgets import QDesktopWidget, QFileDialog, QHeaderView, QMainWindow, QMessageBox, QTreeWidgetItem
from binascii import unhexlify

from tribler.core.utilities.utilities import has_bep33_support
from tribler.gui.defs import DEBUG_PANE_REFRESH_TIMEOUT, GB, MB
Expand Down
18 changes: 9 additions & 9 deletions src/tribler/gui/dialogs/feedbackdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@

class FeedbackDialog(AddBreadcrumbOnShowMixin, QDialog):
def __init__( # pylint: disable=too-many-arguments, too-many-locals
self,
parent: TriblerWindow,
sentry_reporter: SentryReporter,
reported_error: ReportedError,
tribler_version,
start_time,
stop_application_on_close=True,
additional_tags=None,
self,
parent: TriblerWindow,
sentry_reporter: SentryReporter,
reported_error: ReportedError,
tribler_version,
start_time,
stop_application_on_close=True,
additional_tags=None,
):
QDialog.__init__(self, parent)
self.core_manager = parent.core_manager
Expand Down Expand Up @@ -101,7 +101,7 @@ def add_item_to_info_widget(key, value):

# Add recent requests to feedback dialog
request_ind = 1

for request, status_code in request_manager.performed_requests.items():
add_item_to_info_widget(
'request_%d' % request_ind,
Expand Down
2 changes: 1 addition & 1 deletion src/tribler/gui/network/request/file_download_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from tribler.gui.network.request.request import Request


class TriblerFileDownloadRequest(Request):
class FileDownloadRequest(Request):
def __init__(self, *args, **kwargs):
super().__init__(
priority=QNetworkRequest.LowPriority,
Expand Down
2 changes: 1 addition & 1 deletion src/tribler/gui/network/request/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def _on_finished(self):
raise Warning(text)

self.on_finished_signal.emit(result)
except Exception as e:
except Exception as e: # pylint: disable=broad-except
self.logger.exception(e)
self.cancel()
finally:
Expand Down
2 changes: 1 addition & 1 deletion src/tribler/gui/network/request/shutdown_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

class ShutdownRequest(Request):
def __init__(self, *args, **kwargs):
super().__init__("shutdown", *args, **kwargs, method="PUT", priority=QNetworkRequest.HighPriority)
super().__init__("shutdown", *args, **kwargs, method="PUT", priority=QNetworkRequest.HighPriority)
2 changes: 1 addition & 1 deletion src/tribler/gui/network/request/tests/test_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_bytes_data_constructor():
assert request.data == b'bytes'


def test_bytes_data_constructor():
def test_str_data_constructor():
request = Request(
endpoint='endpoint',
data='str'
Expand Down
4 changes: 2 additions & 2 deletions src/tribler/gui/widgets/downloadspage.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
DOWNLOADS_FILTER_INACTIVE,
)
from tribler.gui.dialogs.confirmationdialog import ConfirmationDialog
from tribler.gui.network.request.file_download_request import TriblerFileDownloadRequest
from tribler.gui.network.request.file_download_request import FileDownloadRequest
from tribler.gui.network.request.request import Request
from tribler.gui.network.request_manager import request_manager
from tribler.gui.sentry_mixin import AddBreadcrumbOnShowMixin
Expand Down Expand Up @@ -501,7 +501,7 @@ def on_finish(result: Tuple):
selected_item = self.selected_items[:1]
if action == 0 and selected_item:
filename = self.dialog.dialog_widget.dialog_input.text()
TriblerFileDownloadRequest(
FileDownloadRequest(
f"downloads/{selected_item[0].download_info['infohash']}/torrent",
on_finish,
)
Expand Down

0 comments on commit 0644084

Please sign in to comment.