openrewrite / rewrite-python

OpenRewrite recipes for Python.
Apache License 2.0
12 stars 5 forks source link

Formatting is not preserved in JContainer of J.MethodDeclaration parameters. #39

Closed traceyyoshima closed 1 year ago

traceyyoshima commented 1 year ago

J.Empty is not created.

    @Test
    void emptyParameters() {
        rewriteRun(
          python(
            """
              class Foo:
                  def foo(    ):
                      pass
              """
          )
        );
    }

Padding before is not preserved:

    @Test
    void formatBeforeParameters() {
        rewriteRun(
          python(
            """
              class Foo:
                  def foo ():
                      pass
            """,
            """
              class Foo:
                  def foo():
                      pass
            """
          )
        );
    }