77
88from alphatrion import envs
99from alphatrion .artifact import artifact
10+ from alphatrion .server .graphql .types import ArtifactFile
1011from alphatrion .storage import runtime
1112from alphatrion .storage .sql_models import (
1213 FINISHED_STATUS ,
1314 Status ,
1415)
15- from alphatrion .server .graphql .types import ArtifactFile
1616
1717from .types import (
1818 AddUserToTeamInput ,
@@ -376,9 +376,11 @@ async def list_artifact_files(
376376 # Determine content type based on file extension
377377 if filename .endswith (".json" ):
378378 content_type = "application/json"
379- elif filename .endswith (".txt" ) or filename .endswith (".log" ):
380- content_type = "text/plain"
381- elif filename .endswith ((".py" , ".js" , ".ts" , ".tsx" , ".jsx" )):
379+ elif (
380+ filename .endswith (".txt" )
381+ or filename .endswith (".log" )
382+ or filename .endswith ((".py" , ".js" , ".ts" , ".tsx" , ".jsx" ))
383+ ):
382384 content_type = "text/plain"
383385 else :
384386 content_type = "text/plain"
@@ -395,7 +397,10 @@ async def list_artifact_files(
395397
396398 @staticmethod
397399 async def get_artifact_content (
398- team_id : str , tag : str , repo_name : str | None = None , filename : str | None = None
400+ team_id : str ,
401+ tag : str ,
402+ repo_name : str | None = None ,
403+ filename : str | None = None ,
399404 ) -> ArtifactContent :
400405 """Get artifact content from registry."""
401406 try :
@@ -431,9 +436,11 @@ async def get_artifact_content(
431436 # Determine content type based on file extension
432437 if actual_filename .endswith (".json" ):
433438 content_type = "application/json"
434- elif actual_filename .endswith (".txt" ) or actual_filename .endswith (".log" ):
435- content_type = "text/plain"
436- elif actual_filename .endswith ((".py" , ".js" , ".ts" , ".tsx" , ".jsx" )):
439+ elif (
440+ actual_filename .endswith (".txt" )
441+ or actual_filename .endswith (".log" )
442+ or actual_filename .endswith ((".py" , ".js" , ".ts" , ".tsx" , ".jsx" ))
443+ ):
437444 content_type = "text/plain"
438445 else :
439446 content_type = "text/plain"
0 commit comments