Skip to content

Commit 4fbf060

Browse files
committed
Misc edits.
1 parent cfabe36 commit 4fbf060

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

src/deploy/functions/runtimes/python/index.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,14 @@ import { Build } from "../../build";
1616
const LATEST_VERSION: runtimes.Runtime = "python310";
1717

1818
/**
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+
*
2021
* @param context runtimes.DelegateContext
2122
* @return Delegate Python runtime delegate
2223
*/
2324
export async function tryCreateDelegate(
2425
context: runtimes.DelegateContext
2526
): 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.
3027
const requirementsTextPath = path.join(context.sourceDir, "requirements.txt");
3128

3229
if (!(await promisify(fs.exists)(requirementsTextPath))) {
@@ -102,14 +99,11 @@ class Delegate implements runtimes.RuntimeDelegate {
10299
return Promise.resolve();
103100
}
104101

105-
// Watch isn't supported for Python.
106102
watch(): Promise<() => Promise<void>> {
107103
return Promise.resolve(() => Promise.resolve());
108104
}
109105

110-
async build(): Promise<void> {
111-
// No-op.
112-
}
106+
async build(): Promise<void> {}
113107

114108
async serveAdmin(port: number, envs: backend.EnvironmentVariables): Promise<() => Promise<void>> {
115109
const modulesDir = await this.modulesDir();

src/functions/python.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function runWithVirtualEnv(
2424
return spawn(command, args, {
2525
shell: true,
2626
cwd,
27-
stdio: [/* stdin= */ "ignore", /* stdout= */ "pipe", /* stderr= */ "inherit"],
27+
stdio: [/* stdin= */ "ignore", /* stdout= */ "pipe", /* stderr= */ "pipe"],
2828
// Linting disabled since internal types expect NODE_ENV which does not apply to Python runtimes.
2929
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any
3030
env: envs as any,

0 commit comments

Comments
 (0)