Package org.openrewrite.python
Class UpgradeTransitiveDependencyVersion
java.lang.Object
org.openrewrite.Recipe
org.openrewrite.ScanningRecipe<org.openrewrite.python.UpgradeTransitiveDependencyVersion.Accumulator>
org.openrewrite.python.UpgradeTransitiveDependencyVersion
- All Implemented Interfaces:
Cloneable
public class UpgradeTransitiveDependencyVersion
extends org.openrewrite.ScanningRecipe<org.openrewrite.python.UpgradeTransitiveDependencyVersion.Accumulator>
Pin a transitive dependency version using the strategy appropriate for the file type
and package manager. For
pyproject.toml: uv uses
[tool.uv].constraint-dependencies, PDM uses [tool.pdm.overrides],
and other managers add a direct dependency. For requirements.txt and
Pipfile: appends the dependency. When the matching package manager
(uv or pipenv) is available on PATH, the corresponding lock file
(uv.lock or Pipfile.lock) is regenerated.-
Nested Class Summary
Nested classes/interfaces inherited from class org.openrewrite.Recipe
org.openrewrite.Recipe.Builder, org.openrewrite.Recipe.DelegatingRecipe -
Field Summary
Fields inherited from class org.openrewrite.Recipe
contributors, examples, PANIC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.openrewrite.python.UpgradeTransitiveDependencyVersion.AccumulatorgetInitialValue(org.openrewrite.ExecutionContext ctx) org.openrewrite.TreeVisitor<?, org.openrewrite.ExecutionContext> getScanner(org.openrewrite.python.UpgradeTransitiveDependencyVersion.Accumulator acc) org.openrewrite.TreeVisitor<?, org.openrewrite.ExecutionContext> getVisitor(org.openrewrite.python.UpgradeTransitiveDependencyVersion.Accumulator acc) Methods inherited from class org.openrewrite.ScanningRecipe
clone, generate, generate, getAccumulator, getVisitorMethods inherited from class org.openrewrite.Recipe
addDataTable, builder, buildRecipeList, causesAnotherCycle, createRecipeDescriptor, equals, getContributors, getDataTableDescriptors, getDescriptor, getEstimatedEffortPerOccurrence, getExamples, getInstanceName, getJacksonPolymorphicTypeTag, getMaintainers, getName, getRecipeList, getTags, hashCode, maxCycles, noop, onComplete, run, run, run, setContributors, setExamples, validate, validate, validateAll, validateAll, withOptions
-
Constructor Details
-
UpgradeTransitiveDependencyVersion
public UpgradeTransitiveDependencyVersion()
-
-
Method Details
-
getDisplayName
- Specified by:
getDisplayNamein classorg.openrewrite.Recipe
-
getInstanceNameSuffix
- Overrides:
getInstanceNameSuffixin classorg.openrewrite.Recipe
-
getDescription
- Specified by:
getDescriptionin classorg.openrewrite.Recipe
-
getInitialValue
public org.openrewrite.python.UpgradeTransitiveDependencyVersion.Accumulator getInitialValue(org.openrewrite.ExecutionContext ctx) - Specified by:
getInitialValuein classorg.openrewrite.ScanningRecipe<org.openrewrite.python.UpgradeTransitiveDependencyVersion.Accumulator>
-
getScanner
public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getScanner(org.openrewrite.python.UpgradeTransitiveDependencyVersion.Accumulator acc) - Specified by:
getScannerin classorg.openrewrite.ScanningRecipe<org.openrewrite.python.UpgradeTransitiveDependencyVersion.Accumulator>
-
getVisitor
public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getVisitor(org.openrewrite.python.UpgradeTransitiveDependencyVersion.Accumulator acc) - Overrides:
getVisitorin classorg.openrewrite.ScanningRecipe<org.openrewrite.python.UpgradeTransitiveDependencyVersion.Accumulator>
-