@@ -16,17 +16,14 @@ import { Build } from "../../build";
16
16
const LATEST_VERSION : runtimes . Runtime = "python310" ;
17
17
18
18
/**
19
- * This function is used to create a runtime delegate for the Python runtime.
19
+ * Create a runtime delegate for the Python runtime, if applicable.
20
+ *
20
21
* @param context runtimes.DelegateContext
21
22
* @return Delegate Python runtime delegate
22
23
*/
23
24
export async function tryCreateDelegate (
24
25
context : runtimes . DelegateContext
25
26
) : Promise < Delegate | undefined > {
26
- // TODO this can be done better by passing Options to tryCreateDelegate and
27
- // reading the "functions.source" and ""functions.runtime" values from there
28
- // to determine the runtime. For the sake of keeping changes to python only
29
- // this has not been done for now.
30
27
const requirementsTextPath = path . join ( context . sourceDir , "requirements.txt" ) ;
31
28
32
29
if ( ! ( await promisify ( fs . exists ) ( requirementsTextPath ) ) ) {
@@ -102,14 +99,11 @@ class Delegate implements runtimes.RuntimeDelegate {
102
99
return Promise . resolve ( ) ;
103
100
}
104
101
105
- // Watch isn't supported for Python.
106
102
watch ( ) : Promise < ( ) => Promise < void > > {
107
103
return Promise . resolve ( ( ) => Promise . resolve ( ) ) ;
108
104
}
109
105
110
- async build ( ) : Promise < void > {
111
- // No-op.
112
- }
106
+ async build ( ) : Promise < void > { }
113
107
114
108
async serveAdmin ( port : number , envs : backend . EnvironmentVariables ) : Promise < ( ) => Promise < void > > {
115
109
const modulesDir = await this . modulesDir ( ) ;
0 commit comments