Archived
Fix pyright type errors across codebase
- Add pyrightconfig.json for pyright 1.1.408 TOML parsing workaround - Add NoReturn annotations to fatal() functions for proper type narrowing - Add None checks and assertions after require=True get_record() calls - Fix AttrDict class with __getattr__ for dynamic attribute access - Add type annotations and casts for Kubernetes client objects - Store compose config as DockerDeployer instance attributes - Filter None values from dotenv and environment mappings - Use hasattr/getattr patterns for optional container attributes Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
cd3d908d0d
commit
dd856af2d3
@@ -15,6 +15,7 @@
|
||||
|
||||
from stack_orchestrator.util import get_yaml
|
||||
from stack_orchestrator.deploy.deploy_types import DeployCommandContext
|
||||
from stack_orchestrator.deploy.deployment_context import DeploymentContext
|
||||
from stack_orchestrator.deploy.stack_state import State
|
||||
from stack_orchestrator.deploy.deploy_util import VolumeMapping, run_container_command
|
||||
from pathlib import Path
|
||||
@@ -31,7 +32,7 @@ def setup(command_context: DeployCommandContext, parameters, extra_args):
|
||||
host_directory = "./container-output-dir"
|
||||
host_directory_absolute = Path(extra_args[0]).absolute().joinpath(host_directory)
|
||||
host_directory_absolute.mkdir(parents=True, exist_ok=True)
|
||||
mounts = [VolumeMapping(host_directory_absolute, "/data")]
|
||||
mounts = [VolumeMapping(str(host_directory_absolute), "/data")]
|
||||
output, status = run_container_command(
|
||||
command_context,
|
||||
"test",
|
||||
@@ -45,9 +46,9 @@ def init(command_context: DeployCommandContext):
|
||||
return yaml.load(default_spec_file_content)
|
||||
|
||||
|
||||
def create(command_context: DeployCommandContext, extra_args):
|
||||
def create(deployment_context: DeploymentContext, extra_args):
|
||||
data = "create-command-output-data"
|
||||
output_file_path = command_context.deployment_dir.joinpath("create-file")
|
||||
output_file_path = deployment_context.deployment_dir.joinpath("create-file")
|
||||
with open(output_file_path, "w+") as output_file:
|
||||
output_file.write(data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user