From 0ee7d2e92f326ee0528a86088b6190c6be759ed9 Mon Sep 17 00:00:00 2001 From: Abhilash Raj Date: Mon, 31 May 2021 21:16:22 -0700 Subject: [PATCH] Fix the imports to support Python3 style absolute imports. --- qweechat/buffer.py | 6 +++--- qweechat/chat.py | 4 ++-- qweechat/debug.py | 4 ++-- qweechat/network.py | 2 +- qweechat/qweechat.py | 19 ++++++++----------- setup.py | 5 ++++- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/qweechat/buffer.py b/qweechat/buffer.py index e581f8b..2ccd6e7 100644 --- a/qweechat/buffer.py +++ b/qweechat/buffer.py @@ -21,9 +21,9 @@ # from pkg_resources import resource_filename -from chat import ChatTextEdit -from input import InputLineEdit -import weechat.color as color +from qweechat.chat import ChatTextEdit +from qweechat.input import InputLineEdit +import qweechat.weechat.color as color from PySide6 import QtCore from PySide6 import QtWidgets diff --git a/qweechat/chat.py b/qweechat/chat.py index bd339ac..2d5f47e 100644 --- a/qweechat/chat.py +++ b/qweechat/chat.py @@ -21,8 +21,8 @@ # import datetime -import config -import weechat.color as color +from qweechat import config +from qweechat.weechat import color from PySide6 import QtCore from PySide6 import QtWidgets, QtGui diff --git a/qweechat/debug.py b/qweechat/debug.py index 3261beb..d00c46b 100644 --- a/qweechat/debug.py +++ b/qweechat/debug.py @@ -20,8 +20,8 @@ # along with QWeeChat. If not, see . # -from chat import ChatTextEdit -from input import InputLineEdit +from qweechat.chat import ChatTextEdit +from qweechat.input import InputLineEdit from PySide6 import QtWidgets as QtGui diff --git a/qweechat/network.py b/qweechat/network.py index 362bb36..52e190c 100644 --- a/qweechat/network.py +++ b/qweechat/network.py @@ -21,7 +21,7 @@ # import struct -import config +from qweechat import config from PySide6 import QtCore, QtNetwork from PySide6.QtCore import QObject, Signal diff --git a/qweechat/qweechat.py b/qweechat/qweechat.py index 33e210a..5e14bbc 100644 --- a/qweechat/qweechat.py +++ b/qweechat/qweechat.py @@ -37,14 +37,14 @@ import sys import traceback from pkg_resources import resource_filename # import qt_compat -import config -import weechat.protocol as protocol -from network import Network -from connection import ConnectionDialog -from buffer import BufferListWidget, Buffer -from debug import DebugDialog -from about import AboutDialog -from version import qweechat_version +from qweechat import config +from qweechat.weechat import protocol +from qweechat.network import Network +from qweechat.connection import ConnectionDialog +from qweechat.buffer import BufferListWidget, Buffer +from qweechat.debug import DebugDialog +from qweechat.about import AboutDialog +from qweechat.version import qweechat_version from PySide6.QtWidgets import ( QApplication, QLabel, QPushButton, QVBoxLayout, QWidget) @@ -345,7 +345,6 @@ class MainWindow(QtWidgets.QMainWindow): for obj in message.objects: if obj.objtype != 'hda' or obj.value['path'][-1] != 'buffer': continue - print('listbuffers object', obj.objtype, obj.value['path']) self.list_buffers.clear() while self.stacked_buffers.count() > 0: buf = self.stacked_buffers.widget(0) @@ -353,7 +352,6 @@ class MainWindow(QtWidgets.QMainWindow): self.buffers = [] for item in obj.value['items']: buf = self.create_buffer(item) - print(f'Creating buffer for {item}') self.insert_buffer(len(self.buffers), buf) self.list_buffers.setCurrentRow(0) self.buffers[0].widget.input.setFocus() @@ -485,7 +483,6 @@ class MainWindow(QtWidgets.QMainWindow): def parse_message(self, message): """Parse a WeeChat message.""" - print(f'message.msgid = {message.msgid}') if message.msgid.startswith('debug'): self.debug_display(0, '', '(debug message, ignored)') elif message.msgid == 'listbuffers': diff --git a/setup.py b/setup.py index c6edcbe..d22cf9f 100644 --- a/setup.py +++ b/setup.py @@ -54,5 +54,8 @@ setup( 'console_scripts': [ 'qweechat-testproto = qweechat.weechat.testproto:main', ] - } + }, + install_requires = [ + 'PySide6', + ] )