Skip to content

Commit 9f6b764

Browse files
Add minor updates to python sdk (github#45)
* add py.typed to support typing * simplify path manipulation * Apply ruff formatting --------- Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>
1 parent 4b1d5d4 commit 9f6b764

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

python/copilot/py.typed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

python/e2e/testharness/context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def get_cli_path() -> str:
2424
return cli_path
2525

2626
# Look for CLI in sibling nodejs directory's node_modules
27-
base_path = Path(__file__).parent.parent.parent.parent
27+
base_path = Path(__file__).parents[3] # equivalent to: path.parent.parent.parent.parent
2828
full_path = base_path / "nodejs" / "node_modules" / "@github" / "copilot" / "index.js"
2929
if full_path.exists():
3030
return str(full_path.resolve())
@@ -35,7 +35,7 @@ def get_cli_path() -> str:
3535

3636

3737
CLI_PATH = get_cli_path()
38-
SNAPSHOTS_DIR = Path(__file__).parent.parent.parent.parent / "test" / "snapshots"
38+
SNAPSHOTS_DIR = Path(__file__).parents[3] / "test" / "snapshots"
3939

4040

4141
class E2ETestContext:

0 commit comments

Comments
 (0)