Skip to content

Commit 79bf9b1

Browse files
refactor: Extract documentation examples from tests
Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.java.recipes.ExamplesExtractor?organizationId=ODQ2MGExMTUtNDg0My00N2EwLTgzMGMtNGE1NGExMTBmZDkw Co-authored-by: Moderne <[email protected]>
1 parent 1b86734 commit 79bf9b1

File tree

1 file changed

+56
-0
lines changed
  • rewrite-python/src/main/resources/META-INF/rewrite

1 file changed

+56
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Copyright 2025 the original author or authors.
2+
# <p>
3+
# Licensed under the Moderne Source Available License (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
# <p>
7+
# https://docs.moderne.io/licensing/moderne-source-available-license
8+
# <p>
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
---
16+
type: specs.openrewrite.org/v1beta/example
17+
recipeName: org.openrewrite.python.ChangeMethodName
18+
examples:
19+
- description: ''
20+
parameters:
21+
- print
22+
- println
23+
- 'true'
24+
sources:
25+
- before: |
26+
class Foo:
27+
def foo(self) :
28+
print("hello")
29+
after: |
30+
class Foo:
31+
def foo(self) :
32+
println("hello")
33+
language: python
34+
---
35+
type: specs.openrewrite.org/v1beta/example
36+
recipeName: org.openrewrite.python.format.PythonSpaces
37+
examples:
38+
- description: ''
39+
sources:
40+
- before: |
41+
class Foo:
42+
def foo(
43+
a ,
44+
b ,
45+
c
46+
):
47+
pass
48+
after: |
49+
class Foo:
50+
def foo(
51+
a,
52+
b,
53+
c
54+
):
55+
pass
56+
language: python

0 commit comments

Comments
 (0)