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 uv is available, the uv.lock file 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    org.openrewrite.python.UpgradeTransitiveDependencyVersion.Accumulator
    getInitialValue(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, getVisitor

    Methods 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

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • UpgradeTransitiveDependencyVersion

      public UpgradeTransitiveDependencyVersion()
  • Method Details

    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in class org.openrewrite.Recipe
    • getInstanceNameSuffix

      public String getInstanceNameSuffix()
      Overrides:
      getInstanceNameSuffix in class org.openrewrite.Recipe
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in class org.openrewrite.Recipe
    • getInitialValue

      public org.openrewrite.python.UpgradeTransitiveDependencyVersion.Accumulator getInitialValue(org.openrewrite.ExecutionContext ctx)
      Specified by:
      getInitialValue in class org.openrewrite.ScanningRecipe<org.openrewrite.python.UpgradeTransitiveDependencyVersion.Accumulator>
    • getScanner

      public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getScanner(org.openrewrite.python.UpgradeTransitiveDependencyVersion.Accumulator acc)
      Specified by:
      getScanner in class org.openrewrite.ScanningRecipe<org.openrewrite.python.UpgradeTransitiveDependencyVersion.Accumulator>
    • getVisitor

      public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getVisitor(org.openrewrite.python.UpgradeTransitiveDependencyVersion.Accumulator acc)
      Overrides:
      getVisitor in class org.openrewrite.ScanningRecipe<org.openrewrite.python.UpgradeTransitiveDependencyVersion.Accumulator>