Setup LSP and clear all lint
This commit is contained in:
@@ -2,7 +2,7 @@ import json
|
||||
import os
|
||||
import secrets
|
||||
import smtplib
|
||||
from datetime import datetime, timedelta
|
||||
from datetime import datetime
|
||||
from email import policy
|
||||
from email.message import EmailMessage
|
||||
from html.parser import HTMLParser
|
||||
@@ -10,13 +10,12 @@ from io import StringIO
|
||||
from typing import Any, List
|
||||
|
||||
import css_inline
|
||||
from PyQt6.QtCore import QResource, QSize, Qt, QUrl, pyqtSlot
|
||||
from lib import query_error
|
||||
from PyQt6.QtCore import QResource, Qt, QUrl, pyqtSlot
|
||||
from PyQt6.QtGui import QStandardItem, QStandardItemModel
|
||||
from PyQt6.QtMultimedia import QMediaDevices, QSoundEffect
|
||||
from PyQt6.QtSql import QSqlQuery, QSqlQueryModel
|
||||
from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QStyledItemDelegate
|
||||
|
||||
from main import query_error
|
||||
from PyQt6.QtWidgets import QDialog, QDialogButtonBox
|
||||
from ui.PersonDialog import Ui_PersonDialog
|
||||
|
||||
|
||||
@@ -51,7 +50,7 @@ class blockHandler(HTMLParser):
|
||||
return
|
||||
|
||||
def handle_starttag(self, tag: str, attrs: Any) -> None:
|
||||
if not tag in self.tags:
|
||||
if tag not in self.tags:
|
||||
return
|
||||
self.active += 1
|
||||
if tag in self.space:
|
||||
@@ -60,7 +59,7 @@ class blockHandler(HTMLParser):
|
||||
return
|
||||
|
||||
def handle_endtag(self, tag: str) -> None:
|
||||
if not tag in self.tags:
|
||||
if tag not in self.tags:
|
||||
return
|
||||
self.active -= 1
|
||||
self.text += f"</{tag}>"
|
||||
@@ -457,7 +456,6 @@ class PersonDialog(QDialog, Ui_PersonDialog):
|
||||
query.bindValue(":session_id", session_id)
|
||||
if not query.exec():
|
||||
query_error(query)
|
||||
first = True
|
||||
if not query.next():
|
||||
return ""
|
||||
html += "<h3>" + self.tr("Notes") + "</h3>\n"
|
||||
|
||||
Reference in New Issue
Block a user