Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zigai committed Dec 31, 2024
1 parent 0cda7e6 commit 171311a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies = [
"playwright>=1.33.0",
"pydantic>=1.10.8",
"playwright_stealth>=1.0.5",
"stdl>=0.4.4",
"stdl>=0.5.5",
"loguru>=0.7.0",
]

Expand Down
8 changes: 4 additions & 4 deletions wrighter/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
)
from pydantic import BaseModel, validator
from stdl import fs
from stdl.str_u import FG, colored
from stdl.st import FG, colored

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

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

def print(self, *, full=False):
print(colored(self.__class__.__name__, color=FG.LIGHT_BLUE) + ":")
Expand Down Expand Up @@ -178,7 +178,7 @@ def __validate_viewport_size(cls, v: ViewportSize):
"storage_state",
)
def __validate_path(cls, v):
fs.assert_paths_exist(v)
fs.ensure_paths_exist(v)
return os.path.abspath(str(v))


Expand Down
2 changes: 1 addition & 1 deletion wrighter/plugin_manager.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from playwright.sync_api import BrowserContext, Page
from stdl.str_u import FG, colored
from stdl.st import FG, colored

from wrighter.plugin import Plugin

Expand Down

0 comments on commit 171311a

Please sign in to comment.