Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "format code" support for Python #180

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

saiyalamarty
Copy link

@saiyalamarty saiyalamarty commented Feb 14, 2025

Adding support for formatting Python code using Ruff.

Ruff is a rust based fast python formatter. They also have a wasm build of the same. Built by the Astral team (Charlie Marsh)
ruff repo: https://github.com/astral-sh/ruff

Note:

Copy link

vercel bot commented Feb 14, 2025

@saiyalamarty is attempting to deploy a commit to the Raycast Team on Vercel.

A member of the Team first needs to authorize it.

@saiyalamarty saiyalamarty changed the title Add code format support for Python Add "format code" support for Python Feb 14, 2025
Comment on lines 17 to 29
const ruffConfig = {
preview: false,
builtins: [],
"target-version": "py312",
"line-length": 80,
"indent-width": 4,
format: {
"indent-style": "space",
"quote-style": "double",
"skip-magic-trailing-comma": false,
"line-ending": "auto",
},
};
Copy link

@MichaReiser MichaReiser Feb 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use Workspace.defaultSettings() to get the default settings

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the suggestion @MichaReiser! Addressed.

Copy link

vercel bot commented Feb 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ray-so ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 17, 2025 8:52am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants