Skip to content

Commit ec5f887

Browse files
Christina ZhaoChristina Zhao
authored andcommitted
chore: fix isort
updated import order, applied isort to adjust the formatting of the import packages for py files
1 parent 33b6e50 commit ec5f887

34 files changed

Lines changed: 138 additions & 43 deletions

cforge/commands/server/run.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ def run(
164164

165165
# Import top-level translate here to avoid undesirable initialization
166166
# Third Party
167+
# First-Party
167168
from mcpgateway.translate import main as translate_main
168169

169170
# Launch the translation wrapper in a subprocess

cforge/common/console.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
configuration without repeated construction.
1010
"""
1111

12+
# Standard
1213
from functools import lru_cache
1314

15+
# Third-Party
1416
from rich.console import Console
1517
import typer
1618

cforge/common/errors.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@
99
boundary between internal failures and surfaced command errors.
1010
"""
1111

12+
# Standard
1213
from enum import Enum
1314
import json
1415
from typing import Any, Optional, Tuple
1516

17+
# Third-Party
1618
import typer
1719

20+
# First-Party
1821
from cforge.common.console import get_console
1922

2023

@@ -56,6 +59,7 @@ def split_exception_details(exception: Exception) -> Tuple[str, Any]:
5659

5760
def handle_exception(exception: Exception) -> None:
5861
"""Handle an exception and print a friendly error message."""
62+
# First-Party
5963
from cforge.common.render import print_json
6064

6165
e_str, e_detail = split_exception_details(exception)

cforge/common/http.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@
99
helpers instead of handling auth headers and base URL resolution themselves.
1010
"""
1111

12+
# Standard
1213
from pathlib import Path
1314
from typing import Any, Dict, Optional
1415

16+
# Third-Party
1517
import requests
1618

19+
# First-Party
1720
from cforge.common.errors import AuthenticationError, CLIError
1821
from cforge.config import get_settings
1922
from cforge.credential_store import load_profile_credentials

cforge/common/prompting.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@
1010
commands that need structured request payloads.
1111
"""
1212

13+
# Standard
1314
import json
1415
from typing import Annotated, Any, Callable, Dict, get_args, get_origin, get_type_hints, List, Optional, Tuple, Union
1516

17+
# Third-Party
1618
from pydantic import BaseModel
1719
from rich.console import Console
1820
import typer
1921

22+
# First-Party
2023
from cforge.common.console import get_console
2124
from cforge.common.errors import CLIError
2225
from cforge.common.schema_validation import validate_instance, validate_instance_against_subschema, validate_schema

cforge/common/render.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,19 @@
99
data retrieval while sharing a consistent terminal presentation.
1010
"""
1111

12+
# Standard
1213
import json
1314
from typing import Any, Dict, List, Optional
1415

16+
# Third-Party
1517
from rich.console import Console, ConsoleOptions, RenderableType, RenderResult
1618
from rich.measure import Measurement
1719
from rich.panel import Panel
1820
from rich.segment import Segment
1921
from rich.syntax import Syntax
2022
from rich.table import Table
2123

24+
# First-Party
2225
from cforge.common.console import get_console
2326
from cforge.config import get_settings
2427

cforge/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010
# Standard
1111
from contextlib import contextmanager
1212
from functools import lru_cache
13+
import os
1314
from pathlib import Path
1415
from typing import Generator, Optional, Self
15-
import os
1616

1717
# Third-Party
1818
from pydantic import model_validator
1919

2020
# First-Party
21-
from mcpgateway.config import Settings
2221
from mcpgateway.config import get_settings as cf_get_settings
22+
from mcpgateway.config import Settings
2323

2424
HOME_DIR_NAME = ".contextforge"
2525
DEFAULT_HOME = Path.home() / HOME_DIR_NAME

cforge/credential_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# Third-Party
1616
from cryptography.hazmat.backends import default_backend
1717
from cryptography.hazmat.primitives import hashes
18-
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
18+
from cryptography.hazmat.primitives.ciphers import algorithms, Cipher, modes
1919
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
2020

2121
# First-Party

cforge/main.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
# Third-Party
2929
import typer
3030

31+
# First-Party
3132
from cforge.commands.deploy.deploy import deploy
3233
from cforge.commands.metrics.metrics import metrics_get, metrics_reset
3334
from cforge.commands.resources.a2a import (
@@ -47,11 +48,7 @@
4748
mcp_servers_toggle,
4849
mcp_servers_update,
4950
)
50-
from cforge.commands.resources.plugins import (
51-
plugins_get,
52-
plugins_list,
53-
plugins_stats,
54-
)
51+
from cforge.commands.resources.plugins import plugins_get, plugins_list, plugins_stats
5552
from cforge.commands.resources.prompts import (
5653
prompts_create,
5754
prompts_delete,
@@ -101,8 +98,6 @@
10198
from cforge.commands.settings.support_bundle import support_bundle
10299
from cforge.commands.settings.version import version
103100
from cforge.commands.settings.whoami import whoami
104-
105-
# First-Party
106101
from cforge.common.console import get_app
107102

108103
# Get the main app singleton

cforge/profile_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010

1111
# Standard
1212
from datetime import datetime
13+
import json
1314
from pathlib import Path
1415
from typing import Dict, List, Optional
15-
import json
1616

1717
# Third-Party
18-
from pydantic import BaseModel, Field, ValidationInfo, field_validator
18+
from pydantic import BaseModel, Field, field_validator, ValidationInfo
1919

20-
# Local
20+
# First-Party
2121
from cforge.config import get_settings
2222

2323
# Virtual default profile ID for local development

0 commit comments

Comments
 (0)