diff options
author | arza <arza@arza.us> | 2023-09-16 20:11:12 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-16 20:11:12 +0300 |
commit | fb6345aa1bc4ceac073c475b60c831cd27332da1 (patch) | |
tree | 2e8e8719774cf1ce7a85e200bba604c8b2ab716f | |
parent | 50400c8c4f48775704c9641746a162f4db162712 (diff) | |
download | qutebrowser-fb6345aa1bc4ceac073c475b60c831cd27332da1.tar.gz qutebrowser-fb6345aa1bc4ceac073c475b60c831cd27332da1.zip |
Fix style
Co-authored-by: port19 <port19@port19.xyz>
-rw-r--r-- | qutebrowser/mainwindow/tabwidget.py | 1 | ||||
-rw-r--r-- | qutebrowser/mainwindow/treetabbedbrowser.py | 19 | ||||
-rw-r--r-- | qutebrowser/mainwindow/treetabwidget.py | 19 | ||||
-rw-r--r-- | qutebrowser/misc/notree.py | 21 | ||||
-rw-r--r-- | tests/unit/misc/test_notree.py | 19 |
5 files changed, 9 insertions, 70 deletions
diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index f2cb17658..066058f2c 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -93,7 +93,6 @@ class TabWidget(QTabWidget): def _tab_by_idx(self, idx: int) -> Optional[QWidget]: """Get the tab at the given index.""" - tab = self.widget(idx) if tab is not None: assert isinstance(tab, browsertab.AbstractTab), tab diff --git a/qutebrowser/mainwindow/treetabbedbrowser.py b/qutebrowser/mainwindow/treetabbedbrowser.py index c7e10ab18..0294eb0eb 100644 --- a/qutebrowser/mainwindow/treetabbedbrowser.py +++ b/qutebrowser/mainwindow/treetabbedbrowser.py @@ -1,21 +1,6 @@ -# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: - -# Copyright 2014-2018 Giuseppe Stelluto (pinusc) <giuseppe@gstelluto.com> -# -# This file is part of qutebrowser. -# -# qutebrowser is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# qutebrowser is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# SPDX-FileCopyrightText: Giuseppe Stelluto (pinusc) <giuseppe@gstelluto.com> # -# You should have received a copy of the GNU General Public License -# along with qutebrowser. If not, see <https://www.gnu.org/licenses/>. +# SPDX-License-Identifier: GPL-3.0-or-later """Subclass of TabbedBrowser to provide tree-tab functionality.""" diff --git a/qutebrowser/mainwindow/treetabwidget.py b/qutebrowser/mainwindow/treetabwidget.py index 12de178c2..36dc81ce4 100644 --- a/qutebrowser/mainwindow/treetabwidget.py +++ b/qutebrowser/mainwindow/treetabwidget.py @@ -1,21 +1,6 @@ -# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: - -# Copyright 2014-2018 Giuseppe Stelluto (pinusc) <giuseppe@gstelluto.com> -# -# This file is part of qutebrowser. -# -# qutebrowser is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# qutebrowser is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# SPDX-FileCopyrightText: Giuseppe Stelluto (pinusc) <giuseppe@gstelluto.com> # -# You should have received a copy of the GNU General Public License -# along with qutebrowser. If not, see <https://www.gnu.org/licenses/>. +# SPDX-License-Identifier: GPL-3.0-or-later """Extension of TabWidget for tree-tab functionality.""" diff --git a/qutebrowser/misc/notree.py b/qutebrowser/misc/notree.py index 9d180ad4c..78286a6fa 100644 --- a/qutebrowser/misc/notree.py +++ b/qutebrowser/misc/notree.py @@ -1,21 +1,6 @@ -# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: - -# Copyright 2019 Giuseppe Stelluto (pinusc) <giuseppe@gstelluto.com> -# -# This file is part of qutebrowser. -# -# qutebrowser is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# qutebrowser is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# SPDX-FileCopyrightText: Giuseppe Stelluto (pinusc) <giuseppe@gstelluto.com> # -# You should have received a copy of the GNU General Public License -# along with qutebrowser. If not, see <https://www.gnu.org/licenses/>. +# SPDX-License-Identifier: GPL-3.0-or-later """Tree library for tree-tabs. @@ -138,7 +123,7 @@ class Node(Generic[T]): def parent(self, value: 'Node[T]') -> None: """Set parent property. Also adds self to value.children.""" # pylint: disable=protected-access - assert(value is None or isinstance(value, Node)) + assert (value is None or isinstance(value, Node)) if self.__parent: self.__parent.__disown(self) self.__parent = None diff --git a/tests/unit/misc/test_notree.py b/tests/unit/misc/test_notree.py index 95f92f1a6..192dc6ac7 100644 --- a/tests/unit/misc/test_notree.py +++ b/tests/unit/misc/test_notree.py @@ -1,21 +1,6 @@ -# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: - -# Copyright 2019 Florian Bruhin (The-Compiler) <me@the-compiler.org> -# -# This file is part of qutebrowser. -# -# qutebrowser is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# qutebrowser is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# SPDX-FileCopyrightText: Florian Bruhin (The-Compiler) <me@the-compiler.org> # -# You should have received a copy of the GNU General Public License -# along with qutebrowser. If not, see <https://www.gnu.org/licenses/>. +# SPDX-License-Identifier: GPL-3.0-or-later """Tests for misc.notree library.""" import pytest |