Update linting for main code
This commit is contained in:
@@ -20,7 +20,7 @@ General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
""" # noqa
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
@@ -42,6 +42,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class NovelSelector(QComboBox):
|
||||
"""Custom: Novel Root Folder Selector."""
|
||||
|
||||
novelSelectionChanged = pyqtSignal(str)
|
||||
|
||||
@@ -53,7 +54,6 @@ class NovelSelector(QComboBox):
|
||||
self._listFormat = None
|
||||
self.currentIndexChanged.connect(self._indexChanged)
|
||||
self.updateTheme()
|
||||
return
|
||||
|
||||
##
|
||||
# Properties
|
||||
@@ -80,18 +80,15 @@ class NovelSelector(QComboBox):
|
||||
self._blockSignal = blockSignal
|
||||
self.setCurrentIndex(index)
|
||||
self._blockSignal = False
|
||||
return
|
||||
|
||||
def setIncludeAll(self, value: bool) -> None:
|
||||
"""Set flag to add an "All Novel Folders" option."""
|
||||
self._includeAll = value
|
||||
return
|
||||
|
||||
def setListFormat(self, value: str | None) -> None:
|
||||
"""Set a format string for the list entries."""
|
||||
if value is None or "{0}" in value:
|
||||
self._listFormat = value
|
||||
return
|
||||
|
||||
def updateTheme(self) -> None:
|
||||
"""Update theme colours."""
|
||||
@@ -99,7 +96,6 @@ class NovelSelector(QComboBox):
|
||||
palette.setBrush(QPalette.ColorGroup.Disabled, QPalette.ColorRole.Text, palette.text())
|
||||
self.setPalette(palette)
|
||||
self.refreshNovelList()
|
||||
return
|
||||
|
||||
##
|
||||
# Public Slots
|
||||
@@ -133,8 +129,6 @@ class NovelSelector(QComboBox):
|
||||
self.setEnabled(self.count() > 1)
|
||||
self._blockSignal = False
|
||||
|
||||
return
|
||||
|
||||
##
|
||||
# Private Slots
|
||||
##
|
||||
@@ -144,4 +138,3 @@ class NovelSelector(QComboBox):
|
||||
"""Re-emit the change of selection signal, unless blocked."""
|
||||
if not self._blockSignal:
|
||||
self.novelSelectionChanged.emit(self.currentData())
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user