Skip to content

Commit

Permalink
refactor(manager/pip-compile): rename constraint helpers (#28138)
Browse files Browse the repository at this point in the history
  • Loading branch information
not7cd committed Mar 26, 2024
1 parent 30495ed commit 839e50f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/modules/manager/pip-compile/common.ts
Expand Up @@ -11,7 +11,7 @@ import { regEx } from '../../../util/regex';
import type { PackageFileContent, UpdateArtifactsConfig } from '../types';
import type { PipCompileArgs } from './types';

export function getPythonConstraint(
export function getPythonVersionConstraint(
config: UpdateArtifactsConfig,
): string | undefined | null {
const { constraints = {} } = config;
Expand All @@ -24,8 +24,9 @@ export function getPythonConstraint(

return undefined;
}
// TODO(not7cd): rename to getPipToolsVersionConstraint, as constraints have their meaning in pip
export function getPipToolsConstraint(config: UpdateArtifactsConfig): string {
export function getPipToolsVersionConstraint(
config: UpdateArtifactsConfig,
): string {
const { constraints = {} } = config;
const { pipTools } = constraints;

Expand All @@ -41,8 +42,8 @@ export async function getExecOptions(
cwd: string,
extraEnv: ExtraEnv<string>,
): Promise<ExecOptions> {
const constraint = getPythonConstraint(config);
const pipToolsConstraint = getPipToolsConstraint(config);
const constraint = getPythonVersionConstraint(config);
const pipToolsConstraint = getPipToolsVersionConstraint(config);
const execOptions: ExecOptions = {
cwd: ensureLocalPath(cwd),
docker: {},
Expand Down

0 comments on commit 839e50f

Please sign in to comment.