catch stray breakpoints and prints

This commit is contained in:
Lendemor 2024-12-20 00:29:54 +01:00
parent d8e988105f
commit 8ec0278501
3 changed files with 4 additions and 5 deletions

View File

@ -87,7 +87,7 @@ build-backend = "poetry.core.masonry.api"
target-version = "py39"
output-format = "concise"
lint.isort.split-on-trailing-comma = false
lint.select = ["B", "C4", "D", "E", "ERA", "F", "FURB", "I", "PERF", "PTH", "RUF", "SIM", "W"]
lint.select = ["B", "C4", "D", "E", "ERA", "F", "FURB", "I", "PERF", "PTH", "RUF", "SIM", "T", "W"]
lint.ignore = ["B008", "D205", "E501", "F403", "SIM115", "RUF006", "RUF012"]
lint.pydocstyle.convention = "google"

View File

@ -52,6 +52,7 @@ from reflex.state import (
StateManagerRedis,
reload_state_module,
)
from reflex.utils import console
try:
from selenium import webdriver # pyright: ignore [reportMissingImports]
@ -385,7 +386,7 @@ class AppHarness:
)
if not line:
break
print(line) # for pytest diagnosis
print(line) # for pytest diagnosis #noqa: T201
m = re.search(reflex.constants.Next.FRONTEND_LISTENING_REGEX, line)
if m is not None:
self.frontend_url = m.group(1)
@ -403,11 +404,10 @@ class AppHarness:
)
# catch I/O operation on closed file.
except ValueError as e:
print(e)
console.error(str(e))
break
if not line:
break
print(line)
self.frontend_output_thread = threading.Thread(target=consume_frontend_output)
self.frontend_output_thread.start()

View File

@ -1202,4 +1202,3 @@ class PyiGenerator:
or "Var[Template]" in line
):
line = line.rstrip() + " # type: ignore\n"
print(line, end="")