Skip to content

Commit 8059c2d

Browse files
arkqCopilot
andauthored
Run ruff auto-fixer before autopep8 and isort (project-chip#42159)
* Run ruff auto-fixer before autopep8 and isort * Update .restyled.yaml Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent b78afb8 commit 8059c2d

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.restyled.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,18 @@ restylers:
223223
include:
224224
- "**/*.sh"
225225
- "**/*.bash"
226-
- name: autopep8
227-
image: public.ecr.aws/restyled-io/restyler-autopep8:v2.3
228-
- name: isort
229-
image: public.ecr.aws/restyled-io/restyler-isort:v7.0
226+
227+
# NOTE: The order of the Python restylers is important. The ruff auto-fixer
228+
# needs to run first because the changes it makes may break style which
229+
# then autopep8 and isort can fix. Also, the isort needs to run last
230+
# because autopep8 may reformat import lines without sorting them.
230231
- name: ruff
231232
image: public.ecr.aws/restyled-io/restyler-ruff:v0.14
232233
command:
233234
- ruff
234235
- check
235236
- --fix-only
237+
- name: autopep8
238+
image: public.ecr.aws/restyled-io/restyler-autopep8:v2.3
239+
- name: isort
240+
image: public.ecr.aws/restyled-io/restyler-isort:v7.0

0 commit comments

Comments
 (0)