mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-14 16:46:25 +00:00
chore: export poetry helper functions
This commit is contained in:
parent
58cc0fefb7
commit
464adf118e
1 changed files with 2 additions and 2 deletions
|
@ -24,7 +24,7 @@ import type {
|
||||||
} from '../types';
|
} from '../types';
|
||||||
import type { PoetryFile, PoetryLock, PoetrySource } from './types';
|
import type { PoetryFile, PoetryLock, PoetrySource } from './types';
|
||||||
|
|
||||||
function getPythonConstraint(
|
export function getPythonConstraint(
|
||||||
existingLockFileContent: string,
|
existingLockFileContent: string,
|
||||||
config: UpdateArtifactsConfig
|
config: UpdateArtifactsConfig
|
||||||
): string | undefined | null {
|
): string | undefined | null {
|
||||||
|
@ -48,7 +48,7 @@ function getPythonConstraint(
|
||||||
|
|
||||||
const pkgValRegex = regEx(`^${dependencyPattern}$`);
|
const pkgValRegex = regEx(`^${dependencyPattern}$`);
|
||||||
|
|
||||||
function getPoetryRequirement(pyProjectContent: string): string | null {
|
export function getPoetryRequirement(pyProjectContent: string): string | null {
|
||||||
try {
|
try {
|
||||||
const pyproject: PoetryFile = parse(pyProjectContent);
|
const pyproject: PoetryFile = parse(pyProjectContent);
|
||||||
// https://python-poetry.org/docs/pyproject/#poetry-and-pep-517
|
// https://python-poetry.org/docs/pyproject/#poetry-and-pep-517
|
||||||
|
|
Loading…
Reference in a new issue