Skip to content

Commit d06ff62

Browse files
committed
linting
Signed-off-by: phernandez <paul@basicmachines.co>
1 parent 5c2bbe6 commit d06ff62

4 files changed

Lines changed: 19 additions & 14 deletions

File tree

.github/workflows/test.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,17 @@ jobs:
5858
5959
- name: Run type checks
6060
run: |
61-
just type-check
61+
just typecheck
62+
63+
- name: Run type checks
64+
run: |
65+
just typecheck
66+
67+
- name: Run linting
68+
run: |
69+
just lint
6270
6371
- name: Run tests
6472
run: |
6573
uv pip install pytest pytest-cov
66-
just test
74+
just test

src/basic_memory/cli/auth.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import os
55
import time
66
import webbrowser
7-
from pathlib import Path
87

98
import httpx
109
from rich.console import Console

src/basic_memory/cli/commands/cloud.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ class CloudAPIError(Exception):
3030

3131
pass
3232

33+
3334
# TODO this is the workos dev env
34-
CLI_OAUTH_CLIENT_ID="client_01K46RED2BW9YKYE4N7Y9BDN2V"
35-
AUTHKIT_DOMAIN="https://exciting-aquarium-32-staging.authkit.app"
35+
CLI_OAUTH_CLIENT_ID = "client_01K46RED2BW9YKYE4N7Y9BDN2V"
36+
AUTHKIT_DOMAIN = "https://exciting-aquarium-32-staging.authkit.app"
3637

3738

3839
async def make_api_request(
@@ -48,15 +49,14 @@ async def make_api_request(
4849
headers.update(auth_headers)
4950
async with httpx.AsyncClient(timeout=timeout) as client:
5051
try:
51-
response = await client.request(
52-
method=method, url=url, headers=headers, json=json_data
53-
)
52+
response = await client.request(method=method, url=url, headers=headers, json=json_data)
5453
console.print(response)
5554
response.raise_for_status()
5655
return response
5756
except httpx.HTTPError as e:
5857
raise CloudAPIError(f"API request failed: {e}") from e
5958

59+
6060
async def get_authenticated_headers() -> dict[str, str]:
6161
"""Get authentication headers with JWT token."""
6262
auth = CLIAuth(client_id=CLI_OAUTH_CLIENT_ID, authkit_domain=AUTHKIT_DOMAIN)
@@ -73,9 +73,7 @@ def login():
7373
"""Authenticate with WorkOS using OAuth Device Authorization flow."""
7474

7575
async def _login():
76-
auth = CLIAuth(
77-
client_id=CLI_OAUTH_CLIENT_ID, authkit_domain=AUTHKIT_DOMAIN
78-
)
76+
auth = CLIAuth(client_id=CLI_OAUTH_CLIENT_ID, authkit_domain=AUTHKIT_DOMAIN)
7977

8078
success = await auth.login()
8179
if not success:
@@ -84,6 +82,7 @@ async def _login():
8482

8583
asyncio.run(_login())
8684

85+
8786
@cloud_app.command("list")
8887
def list_projects(
8988
host_url: str = typer.Option(..., "--host", "-h", help="Cloud host URL"),
@@ -97,9 +96,7 @@ def list_projects(
9796
console.print(f"[blue]Fetching projects from {host_url}...[/blue]")
9897

9998
# Make API request to list projects
100-
response = asyncio.run(
101-
make_api_request(method="GET", url=f"{host_url}/projects/projects")
102-
)
99+
response = asyncio.run(make_api_request(method="GET", url=f"{host_url}/projects/projects"))
103100

104101
projects_data = response.json()
105102

src/basic_memory/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ def ensure_project_paths_exists(cls, v: Dict[str, str]) -> Dict[str, str]: # pr
162162
def data_dir_path(self):
163163
return Path.home() / DATA_DIR_NAME
164164

165+
165166
class ConfigManager:
166167
"""Manages Basic Memory configuration."""
167168

0 commit comments

Comments
 (0)