1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-01-24 12:47:05 +00:00

Fixed PLW1514 (unspecified-encoding): open in text mode without explicit encoding argument

This commit is contained in:
Teal Dulcet 2025-01-08 05:14:13 -08:00
parent b412e7b4ba
commit ee240c654d

View File

@ -124,7 +124,7 @@ def generate_documentation():
""")
parser = Source.parser()
with open("setup/start.sh") as start_file:
with open("setup/start.sh", encoding="utf-8") as start_file:
for line in start_file:
try:
fn = parser.parse_string(line).filename()
@ -401,7 +401,7 @@ class BashScript(Grammar):
@staticmethod
def parse(fn):
if fn in ("setup/functions.sh", "/etc/mailinabox.conf"): return ""
with open(fn) as f:
with open(fn, encoding="utf-8") as f:
string = f.read()
# tokenize