Skip to content

Commit

Permalink
Add ABC for statusbar widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
pylbrecht committed Apr 28, 2024
1 parent 91be21a commit 59f04af
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions qutebrowser/mainwindow/statusbar/widget.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from abc import ABCMeta, ABC, abstractmethod

Check warning on line 1 in qutebrowser/mainwindow/statusbar/widget.py

View workflow job for this annotation

GitHub Actions / linters (pylint)

Missing module docstring

Check warning on line 1 in qutebrowser/mainwindow/statusbar/widget.py

View workflow job for this annotation

GitHub Actions / linters (flake8)

Missing docstring in public module
from qutebrowser.qt.widgets import QWidget


class QABCMeta(ABCMeta, type(QWidget)):
"""Meta class that combines ABC and the Qt meta class"""

Check warning on line 6 in qutebrowser/mainwindow/statusbar/widget.py

View workflow job for this annotation

GitHub Actions / linters (flake8)

1 blank line required after class docstring

Check warning on line 6 in qutebrowser/mainwindow/statusbar/widget.py

View workflow job for this annotation

GitHub Actions / linters (flake8)

First line should end with a period
pass

Check warning on line 7 in qutebrowser/mainwindow/statusbar/widget.py

View workflow job for this annotation

GitHub Actions / linters (pylint)

Unnecessary pass statement


class StatusBarWidget(ABC, metaclass=QABCMeta):
"""Abstract base class for all status bar widgets"""

Check warning on line 11 in qutebrowser/mainwindow/statusbar/widget.py

View workflow job for this annotation

GitHub Actions / linters (flake8)

First line should end with a period

@abstractmethod
def enable(self):
pass

@abstractmethod
def disable(self):
pass

0 comments on commit 59f04af

Please sign in to comment.