Run lints through black
This commit is contained in:
parent
4ff69b300c
commit
7e782fd5b2
6 changed files with 18 additions and 7 deletions
|
@ -464,9 +464,11 @@ class PesterProfile:
|
||||||
PchumLog.exception("")
|
PchumLog.exception("")
|
||||||
initials = self.initials()
|
initials = self.initials()
|
||||||
if opchum.handle == reason:
|
if opchum.handle == reason:
|
||||||
return (
|
return "<c=%s>%s</c> banned <c=%s>%s</c> from responding to memo." % (
|
||||||
"<c=%s>%s</c> banned <c=%s>%s</c> from responding to memo."
|
opchum.colorhtml(),
|
||||||
% (opchum.colorhtml(), opinit, self.colorhtml(), initials)
|
opinit,
|
||||||
|
self.colorhtml(),
|
||||||
|
initials,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -168,12 +168,14 @@ _ARGUMENTS = parser.parse_args()
|
||||||
try:
|
try:
|
||||||
# PyQt6, QtMultimedia is prefered.
|
# PyQt6, QtMultimedia is prefered.
|
||||||
from PyQt6 import QtMultimedia
|
from PyQt6 import QtMultimedia
|
||||||
|
|
||||||
print("Audio module is PyQt6 QtMultimedia.")
|
print("Audio module is PyQt6 QtMultimedia.")
|
||||||
except ImportError:
|
except ImportError:
|
||||||
if ostools.isWin32() or ostools.isOSX():
|
if ostools.isWin32() or ostools.isOSX():
|
||||||
# PyQt5 QtMultimedia has native backends for MacOS and Windows
|
# PyQt5 QtMultimedia has native backends for MacOS and Windows
|
||||||
try:
|
try:
|
||||||
from PyQt5 import QtMultimedia
|
from PyQt5 import QtMultimedia
|
||||||
|
|
||||||
print(
|
print(
|
||||||
"Using PyQt5 QtMultimedia as sound module. (fallback, PyQt6 QtMultimedia not availible)"
|
"Using PyQt5 QtMultimedia as sound module. (fallback, PyQt6 QtMultimedia not availible)"
|
||||||
)
|
)
|
||||||
|
@ -194,12 +196,14 @@ except ImportError:
|
||||||
# PyQt5 QtMultimedia needs gstreamer on linux, so pygame is prefered.
|
# PyQt5 QtMultimedia needs gstreamer on linux, so pygame is prefered.
|
||||||
try:
|
try:
|
||||||
import pygame
|
import pygame
|
||||||
|
|
||||||
print(
|
print(
|
||||||
"Using pygame as sound module. (fallback, PyQt6 QtMultimedia not availible)"
|
"Using pygame as sound module. (fallback, PyQt6 QtMultimedia not availible)"
|
||||||
)
|
)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
try:
|
try:
|
||||||
from PyQt5 import QtMultimedia
|
from PyQt5 import QtMultimedia
|
||||||
|
|
||||||
print(
|
print(
|
||||||
"Using PyQt5 QtMultimedia as sound module. (fallback, PyQt6 QtMultimedia and pygame not availible)"
|
"Using PyQt5 QtMultimedia as sound module. (fallback, PyQt6 QtMultimedia and pygame not availible)"
|
||||||
)
|
)
|
||||||
|
|
|
@ -49,7 +49,7 @@ class Lexeme:
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
|
|
||||||
#class Message(Lexeme):
|
# class Message(Lexeme):
|
||||||
# """An object designed to represent a message, possibly containing Lexeme
|
# """An object designed to represent a message, possibly containing Lexeme
|
||||||
# objects in their native form as well. Intended to be a combination of a
|
# objects in their native form as well. Intended to be a combination of a
|
||||||
# list and a string, combining the former with the latter's methods."""
|
# list and a string, combining the former with the latter's methods."""
|
||||||
|
|
|
@ -30,6 +30,7 @@ def confExists():
|
||||||
except:
|
except:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def init(host="127.0.0.1", port=None):
|
def init(host="127.0.0.1", port=None):
|
||||||
if not port:
|
if not port:
|
||||||
port = 9797
|
port = 9797
|
||||||
|
|
|
@ -52,7 +52,9 @@ class ScriptQuirks:
|
||||||
try:
|
try:
|
||||||
extension = self.getExtension()
|
extension = self.getExtension()
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
PchumLog.exception("No self.getExtension(), does ScriptQuirks need to be subclassed?")
|
PchumLog.exception(
|
||||||
|
"No self.getExtension(), does ScriptQuirks need to be subclassed?"
|
||||||
|
)
|
||||||
return
|
return
|
||||||
filenames = []
|
filenames = []
|
||||||
if not os.path.exists(os.path.join(self.home, "quirks")):
|
if not os.path.exists(os.path.join(self.home, "quirks")):
|
||||||
|
@ -72,7 +74,9 @@ class ScriptQuirks:
|
||||||
try:
|
try:
|
||||||
extension_length = len(self.getExtension())
|
extension_length = len(self.getExtension())
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
PchumLog.exception("No self.getExtension(), does ScriptQuirks need to be subclassed?")
|
PchumLog.exception(
|
||||||
|
"No self.getExtension(), does ScriptQuirks need to be subclassed?"
|
||||||
|
)
|
||||||
return
|
return
|
||||||
name = os.path.basename(filename)[:-extension_length]
|
name = os.path.basename(filename)[:-extension_length]
|
||||||
try:
|
try:
|
||||||
|
|
2
toast.py
2
toast.py
|
@ -202,7 +202,7 @@ class ToastMachine:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
pytwmn.init()
|
pytwmn.init()
|
||||||
except Exception :
|
except Exception:
|
||||||
PchumLog.exception("Problem initilizing pytwmn.")
|
PchumLog.exception("Problem initilizing pytwmn.")
|
||||||
return
|
return
|
||||||
# self.type = type = "default"
|
# self.type = type = "default"
|
||||||
|
|
Loading…
Reference in a new issue