Class PythonSpacesVisitor<P>

java.lang.Object
org.openrewrite.TreeVisitor<org.openrewrite.java.tree.J,P>
org.openrewrite.java.JavaVisitor<P>
org.openrewrite.python.PythonVisitor<P>
org.openrewrite.python.PythonIsoVisitor<P>
org.openrewrite.python.format.PythonSpacesVisitor<P>

@Incubating(since="0.3.1") public class PythonSpacesVisitor<P> extends PythonIsoVisitor<P>
Ideally, we'll reuse AutoFormatVisitor from Java, but Python requires specific handling of whitespace to maintain column alignment.

This is an example of whitespace formatting on Python limited to safe changes until column alignment is supported.

  • Constructor Details

    • PythonSpacesVisitor

      public PythonSpacesVisitor()
  • Method Details

    • visitMethodDeclaration

      public org.openrewrite.java.tree.J.MethodDeclaration visitMethodDeclaration(org.openrewrite.java.tree.J.MethodDeclaration method, P p)
      Overrides:
      visitMethodDeclaration in class org.openrewrite.java.JavaVisitor<P>