Skip to content

Commit 9321f97

Browse files
committed
flatten playwright modules
1 parent c13c6e4 commit 9321f97

File tree

10 files changed

+5
-8
lines changed

10 files changed

+5
-8
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Usage with Playwright (async):
6161
```python
6262
import asyncio
6363
from playwright.async_api import async_playwright
64-
from python_ghost_cursor.playwright.async_api import create_cursor
64+
from python_ghost_cursor.playwright_async import create_cursor
6565

6666
async def main():
6767
async with async_playwright() as p:
@@ -81,7 +81,7 @@ Usage with Playwright (sync):
8181

8282
```python
8383
from playwright.sync_api import sync_playwright
84-
from python_ghost_cursor.playwright.sync_api import create_cursor
84+
from python_ghost_cursor.playwright_sync import create_cursor
8585

8686
def main():
8787
sync with sync_playwright() as p:

python_ghost_cursor/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
### EXPORTS
77

8-
from .shared import path
8+
from .shared._spoof import get_path as path
99

1010
# To support deprecations
1111
def createCursor(*args, **kwargs):

python_ghost_cursor/playwright/__init__.py

Whitespace-only changes.

python_ghost_cursor/playwright/async_api/_mouse_helper.py renamed to python_ghost_cursor/playwright_async/_mouse_helper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
async def install_mouse_helper(page: Page):
66
await page.add_init_script(
7-
path=Path(__file__).parent.joinpath("../../js/mouseHelper.js")
7+
path=Path(__file__).parent.joinpath("../js/mouseHelper.js")
88
)

python_ghost_cursor/playwright/sync_api/_mouse_helper.py renamed to python_ghost_cursor/playwright_sync/_mouse_helper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44

55
def install_mouse_helper(page: Page) -> None:
6-
page.add_init_script(path=Path(__file__).parent.joinpath("../../js/mouseHelper.js"))
6+
page.add_init_script(path=Path(__file__).parent.joinpath("../js/mouseHelper.js"))
-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
from ._spoof import get_path as path
2-
3-
__all__ = ["path"]

0 commit comments

Comments
 (0)