openrewrite / rewrite

Automated mass refactoring of source code.
https://docs.openrewrite.org
Apache License 2.0
2.09k stars 312 forks source link

Not statement doesn't have the right whitespace #3187

Open moderne-meeseeks[bot] opened 1 year ago

moderne-meeseeks[bot] commented 1 year ago

Problem

Describe the issue you are experiencing.

Expected behavior

Describe what you expected to see.

Example diff

From: maths/pollard_rho.py

      # the tortoise and the hare will share a common divisor with ``num``.
divisor = gcd(hare - tortoise, num)

-            if divisor == 1:
-                # No common divisor yet, just keep searching.
-                continue
-            else:
+            if notdivisor == 1:
    # We found a common divisor!
    if divisor == num:
        # Unfortunately, the divisor is ``num`` itself and is useless.

Recipes in example diff:

References:


This issue originally created by @jkschneider on: https://github.com/moderneinc/support-public/issues/39

moderne-meeseeks[bot] commented 1 year ago

This comment originially written by @ on: