Skip to content

Commit

Permalink
remove check playwright in init (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaromagnoli authored Nov 6, 2024
1 parent fc16d90 commit 70984da
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
14 changes: 0 additions & 14 deletions dataservice/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from dataservice.clients import (
PLAYWRIGHT_AVAILABLE,
HttpXClient,
PlaywrightClient,
PlaywrightPage,
Expand All @@ -17,19 +16,6 @@
from dataservice.models import FailedRequest, Request, Response
from dataservice.service import AsyncDataService, DataService


def check_playwright_availability():
if not PLAYWRIGHT_AVAILABLE:
raise ImportError(
"Playwright optional dependency is not installed. Please install it with `pip install python-dataservice[playwright]`."
)


# Check availability when importing PlaywrightClient or PlaywrightPage
if "PlaywrightClient" in globals() or "PlaywrightPage" in globals():
check_playwright_availability()


__all__ = [
"AsyncDataService",
"BaseDataItem",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "python-dataservice"
packages = [
{ include = "dataservice"},
]
version = "0.6.0"
version = "0.6.1"
description = "Lightweight async data gathering for Python"
authors = ["NomadMonad <[email protected]>"]
readme = "README.rst"
Expand Down

0 comments on commit 70984da

Please sign in to comment.