diff --git a/TODO b/TODO index 9acda2186..6919de7ba 100644 --- a/TODO +++ b/TODO @@ -24,7 +24,6 @@ decorators for often-used signals from singletons? - @on_config_changed('colors') - @on_enter_mode('hints') find better names for *Parser/*Manager -Use _foo.py for modules only used in subpackage? Use py3.4 Enums with a backport to qutebrowser.utils? Simplify using of modes (e.g. enter_mode hint instead of :hint) diff --git a/qutebrowser/app.py b/qutebrowser/app.py index 7772ddd00..29c387cb8 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -63,7 +63,6 @@ from qutebrowser.commands.parsers import CommandParser, SearchParser from qutebrowser.utils.appdirs import AppDirs from qutebrowser.utils.misc import dotted_getattr from qutebrowser.utils.debug import set_trace # pylint: disable=unused-import -from qutebrowser.config.conftypes import ValidationError class QuteBrowser(QApplication): @@ -110,7 +109,7 @@ class QuteBrowser(QApplication): confdir = self._args.confdir try: config.init(confdir) - except ValidationError as e: + except config.ValidationError as e: msgbox = QMessageBox( QMessageBox.Critical, "Error while reading config!", diff --git a/qutebrowser/commands/command.py b/qutebrowser/commands/_command.py similarity index 97% rename from qutebrowser/commands/command.py rename to qutebrowser/commands/_command.py index 4872222d6..5fc000852 100644 --- a/qutebrowser/commands/command.py +++ b/qutebrowser/commands/_command.py @@ -19,8 +19,8 @@ import logging -from qutebrowser.commands.exceptions import (ArgumentCountError, - InvalidModeError) +from qutebrowser.commands._exceptions import (ArgumentCountError, + InvalidModeError) from PyQt5.QtCore import pyqtSignal, QObject diff --git a/qutebrowser/commands/exceptions.py b/qutebrowser/commands/_exceptions.py similarity index 100% rename from qutebrowser/commands/exceptions.py rename to qutebrowser/commands/_exceptions.py diff --git a/qutebrowser/commands/parsers.py b/qutebrowser/commands/parsers.py index 7c0712dee..b6df8307a 100644 --- a/qutebrowser/commands/parsers.py +++ b/qutebrowser/commands/parsers.py @@ -23,7 +23,7 @@ from PyQt5.QtWebKitWidgets import QWebPage import qutebrowser.config.config as config import qutebrowser.commands.utils as cmdutils import qutebrowser.utils.message as message -from qutebrowser.commands.exceptions import ( +from qutebrowser.commands._exceptions import ( ArgumentCountError, NoSuchCommandError, InvalidModeError) diff --git a/qutebrowser/commands/utils.py b/qutebrowser/commands/utils.py index 92cedb123..f60d51f3a 100644 --- a/qutebrowser/commands/utils.py +++ b/qutebrowser/commands/utils.py @@ -24,7 +24,7 @@ Module attributes: import inspect from collections import Iterable -from qutebrowser.commands.command import Command +from qutebrowser.commands._command import Command cmd_dict = {} diff --git a/qutebrowser/config/conftypes.py b/qutebrowser/config/_conftypes.py similarity index 100% rename from qutebrowser/config/conftypes.py rename to qutebrowser/config/_conftypes.py diff --git a/qutebrowser/config/iniparsers.py b/qutebrowser/config/_iniparsers.py similarity index 100% rename from qutebrowser/config/iniparsers.py rename to qutebrowser/config/_iniparsers.py diff --git a/qutebrowser/config/lineparser.py b/qutebrowser/config/_lineparser.py similarity index 100% rename from qutebrowser/config/lineparser.py rename to qutebrowser/config/_lineparser.py diff --git a/qutebrowser/config/sections.py b/qutebrowser/config/_sections.py similarity index 99% rename from qutebrowser/config/sections.py rename to qutebrowser/config/_sections.py index e109a5272..84728a6ab 100644 --- a/qutebrowser/config/sections.py +++ b/qutebrowser/config/_sections.py @@ -19,7 +19,7 @@ from collections import OrderedDict, ChainMap -from qutebrowser.config.value import SettingValue +from qutebrowser.config._value import SettingValue class Section: diff --git a/qutebrowser/config/value.py b/qutebrowser/config/_value.py similarity index 100% rename from qutebrowser/config/value.py rename to qutebrowser/config/_value.py diff --git a/qutebrowser/config/config.py b/qutebrowser/config/config.py index 8116c593e..d8617d05b 100644 --- a/qutebrowser/config/config.py +++ b/qutebrowser/config/config.py @@ -40,10 +40,10 @@ from PyQt5.QtCore import pyqtSignal, QObject import qutebrowser.config.configdata as configdata import qutebrowser.commands.utils as cmdutils import qutebrowser.utils.message as message -from qutebrowser.config.conftypes import ValidationError -from qutebrowser.config.iniparsers import (ReadConfigParser, - ReadWriteConfigParser) -from qutebrowser.config.lineparser import LineConfigParser +from qutebrowser.config._conftypes import ValidationError +from qutebrowser.config._iniparsers import (ReadConfigParser, + ReadWriteConfigParser) +from qutebrowser.config._lineparser import LineConfigParser instance = None state = None diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index 5a1790e0a..5df59d716 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -26,9 +26,9 @@ DATA: The config defaults, an OrderedDict of sections. from collections import OrderedDict -from qutebrowser.config.value import SettingValue -import qutebrowser.config.conftypes as types -import qutebrowser.config.sections as sect +from qutebrowser.config._value import SettingValue +import qutebrowser.config._conftypes as types +import qutebrowser.config._sections as sect FIRST_COMMENT = """ diff --git a/qutebrowser/network/schemehandler.py b/qutebrowser/network/_schemehandler.py similarity index 100% rename from qutebrowser/network/schemehandler.py rename to qutebrowser/network/_schemehandler.py diff --git a/qutebrowser/network/qutescheme.py b/qutebrowser/network/qutescheme.py index 15448772f..ca2795319 100644 --- a/qutebrowser/network/qutescheme.py +++ b/qutebrowser/network/qutescheme.py @@ -25,8 +25,8 @@ Module attributes: import logging import cgi -from qutebrowser.network.schemehandler import (SchemeHandler, - SpecialNetworkReply) +from qutebrowser.network._schemehandler import (SchemeHandler, + SpecialNetworkReply) from qutebrowser.utils.version import version from qutebrowser.utils.url import urlstring diff --git a/qutebrowser/widgets/completion.py b/qutebrowser/widgets/_completion.py similarity index 100% rename from qutebrowser/widgets/completion.py rename to qutebrowser/widgets/_completion.py diff --git a/qutebrowser/widgets/statusbar.py b/qutebrowser/widgets/_statusbar.py similarity index 100% rename from qutebrowser/widgets/statusbar.py rename to qutebrowser/widgets/_statusbar.py diff --git a/qutebrowser/widgets/tabbedbrowser.py b/qutebrowser/widgets/_tabbedbrowser.py similarity index 99% rename from qutebrowser/widgets/tabbedbrowser.py rename to qutebrowser/widgets/_tabbedbrowser.py index 09860e686..6e216485a 100644 --- a/qutebrowser/widgets/tabbedbrowser.py +++ b/qutebrowser/widgets/_tabbedbrowser.py @@ -28,7 +28,7 @@ import qutebrowser.utils.url as urlutils import qutebrowser.utils.message as message import qutebrowser.config.config as config import qutebrowser.commands.utils as cmdutils -from qutebrowser.widgets.tabwidget import TabWidget +from qutebrowser.widgets._tabwidget import TabWidget from qutebrowser.widgets.browsertab import BrowserTab from qutebrowser.browser.signalfilter import SignalFilter from qutebrowser.browser.curcommand import CurCommandDispatcher diff --git a/qutebrowser/widgets/tabwidget.py b/qutebrowser/widgets/_tabwidget.py similarity index 100% rename from qutebrowser/widgets/tabwidget.py rename to qutebrowser/widgets/_tabwidget.py diff --git a/qutebrowser/widgets/mainwindow.py b/qutebrowser/widgets/mainwindow.py index b0367a11a..696cc8ba1 100644 --- a/qutebrowser/widgets/mainwindow.py +++ b/qutebrowser/widgets/mainwindow.py @@ -24,9 +24,9 @@ from PyQt5.QtCore import pyqtSlot, QRect, QPoint from PyQt5.QtWidgets import QWidget, QVBoxLayout from PyQt5.QtWebKitWidgets import QWebInspector -from qutebrowser.widgets.statusbar import StatusBar -from qutebrowser.widgets.tabbedbrowser import TabbedBrowser -from qutebrowser.widgets.completion import CompletionView +from qutebrowser.widgets._statusbar import StatusBar +from qutebrowser.widgets._tabbedbrowser import TabbedBrowser +from qutebrowser.widgets._completion import CompletionView import qutebrowser.commands.utils as cmdutils import qutebrowser.config.config as config