minor fixes for running on windows.
This commit is contained in:
parent
a448fc43ae
commit
eb440dff36
4 changed files with 15 additions and 3 deletions
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
|
|
@ -25,7 +25,9 @@
|
|||
"copyts",
|
||||
"cronsim",
|
||||
"datas",
|
||||
"dateparser",
|
||||
"daterange",
|
||||
"defusedxml",
|
||||
"dotenv",
|
||||
"edgechromium",
|
||||
"engineio",
|
||||
|
|
@ -56,6 +58,7 @@
|
|||
"movflags",
|
||||
"mpegts",
|
||||
"msvideo",
|
||||
"multidict",
|
||||
"muxdelay",
|
||||
"nodesc",
|
||||
"noprogress",
|
||||
|
|
|
|||
|
|
@ -539,7 +539,7 @@ class Config:
|
|||
try:
|
||||
import subprocess
|
||||
|
||||
branch_result = subprocess.run( # noqa: S603
|
||||
branch_result = subprocess.run(
|
||||
["git", "rev-parse", "--abbrev-ref", "HEAD"], # noqa: S607
|
||||
cwd=os.path.dirname(git_path),
|
||||
capture_output=True,
|
||||
|
|
@ -556,7 +556,7 @@ class Config:
|
|||
logging.warning("Git branch name is empty.")
|
||||
return
|
||||
|
||||
commit_result = subprocess.run( # noqa: S603
|
||||
commit_result = subprocess.run(
|
||||
["git", "log", "-1", "--format=%ct_%H"], # noqa: S607
|
||||
cwd=os.path.dirname(git_path),
|
||||
capture_output=True,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,14 @@
|
|||
#!/usr/bin/env python3
|
||||
import io
|
||||
import os
|
||||
import sys
|
||||
|
||||
os.environ["PYTHONUTF8"] = "1"
|
||||
|
||||
if "utf-8" != sys.stdout.encoding.lower():
|
||||
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
|
||||
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding="utf-8")
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
APP_ROOT = str((Path(__file__).parent / "..").resolve())
|
||||
|
|
@ -8,7 +17,6 @@ if APP_ROOT not in sys.path:
|
|||
|
||||
|
||||
import json
|
||||
import os
|
||||
import queue
|
||||
import socket
|
||||
import threading
|
||||
|
|
|
|||
|
|
@ -159,6 +159,7 @@ ignore = [
|
|||
"ERA001",
|
||||
"S101",
|
||||
"LOG015",
|
||||
"PLC0415",
|
||||
]
|
||||
|
||||
# Allow fix for all enabled rules (when `--fix`) is provided.
|
||||
|
|
|
|||
Loading…
Reference in a new issue