Skip to content

Commit 171311a

Browse files
committed
update
1 parent 0cda7e6 commit 171311a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies = [
1111
"playwright>=1.33.0",
1212
"pydantic>=1.10.8",
1313
"playwright_stealth>=1.0.5",
14-
"stdl>=0.4.4",
14+
"stdl>=0.5.5",
1515
"loguru>=0.7.0",
1616
]
1717

wrighter/options.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
)
1414
from pydantic import BaseModel, validator
1515
from stdl import fs
16-
from stdl.str_u import FG, colored
16+
from stdl.st import FG, colored
1717

1818
from wrighter.constants import BROWSER_LAUNCH_OPTS_NAMES, BROWSERS, CONTEXT_OPTS_NAMES, PERMISSIONS
1919

@@ -36,8 +36,8 @@ def export(self, path: str | Path, *, full: bool = False):
3636
"""
3737
excl_unset = not full
3838
excl_defaults = not full
39-
json_opts = self.json(exclude_unset=excl_unset, exclude_defaults=excl_defaults)
40-
fs.json_dump(data=json.loads(json_opts), path=path)
39+
data = self.model_dump(exclude_unset=excl_unset, exclude_defaults=excl_defaults)
40+
fs.json_dump(data, path=path)
4141

4242
def print(self, *, full=False):
4343
print(colored(self.__class__.__name__, color=FG.LIGHT_BLUE) + ":")
@@ -178,7 +178,7 @@ def __validate_viewport_size(cls, v: ViewportSize):
178178
"storage_state",
179179
)
180180
def __validate_path(cls, v):
181-
fs.assert_paths_exist(v)
181+
fs.ensure_paths_exist(v)
182182
return os.path.abspath(str(v))
183183

184184

wrighter/plugin_manager.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from playwright.sync_api import BrowserContext, Page
2-
from stdl.str_u import FG, colored
2+
from stdl.st import FG, colored
33

44
from wrighter.plugin import Plugin
55

0 commit comments

Comments
 (0)