removed unwanted changes
This commit is contained in:
parent
05e68c2b27
commit
6ea91e542d
@ -15,7 +15,7 @@ repos:
|
|||||||
rev: v2.3.0
|
rev: v2.3.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: codespell
|
- id: codespell
|
||||||
args: ["reflex", "te"]
|
args: ["reflex"]
|
||||||
|
|
||||||
# Run pyi check before pyright because pyright can fail if pyi files are wrong.
|
# Run pyi check before pyright because pyright can fail if pyi files are wrong.
|
||||||
- repo: local
|
- repo: local
|
||||||
|
@ -180,7 +180,7 @@ def save_error(error: Exception) -> str:
|
|||||||
timestamp = datetime.now().strftime("%Y-%m-%d__%H-%M-%S")
|
timestamp = datetime.now().strftime("%Y-%m-%d__%H-%M-%S")
|
||||||
constants.Reflex.LOGS_DIR.mkdir(parents=True, exist_ok=True)
|
constants.Reflex.LOGS_DIR.mkdir(parents=True, exist_ok=True)
|
||||||
log_path = constants.Reflex.LOGS_DIR / f"error_{timestamp}.log"
|
log_path = constants.Reflex.LOGS_DIR / f"error_{timestamp}.log"
|
||||||
traceback.TracebackException.from_exception(error)
|
traceback.TracebackException.from_exception(error).print(file=log_path.open("w+")) # type: ignore[attr-defined]
|
||||||
return str(log_path)
|
return str(log_path)
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,15 +6,14 @@ import asyncio
|
|||||||
import dataclasses
|
import dataclasses
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
import platform
|
import platform
|
||||||
import sys
|
|
||||||
import warnings
|
import warnings
|
||||||
from contextlib import suppress
|
from contextlib import suppress
|
||||||
|
|
||||||
from reflex.config import environment
|
from reflex.config import environment
|
||||||
|
|
||||||
if sys.version_info >= (3, 11):
|
try:
|
||||||
from datetime import UTC, datetime
|
from datetime import UTC, datetime # type: ignore[attr-defined]
|
||||||
else:
|
except ImportError:
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
UTC = None
|
UTC = None
|
||||||
|
Loading…
Reference in New Issue
Block a user