Skip to content

format: replaced black with ruff for code formatting (Bug 2036413)#1134

Open
Magnolia-Liu wants to merge 8 commits intomozilla-conduit:mainfrom
Magnolia-Liu:remove-black
Open

format: replaced black with ruff for code formatting (Bug 2036413)#1134
Magnolia-Liu wants to merge 8 commits intomozilla-conduit:mainfrom
Magnolia-Liu:remove-black

Conversation

@Magnolia-Liu
Copy link
Copy Markdown

Remove black references from format, tests and documentation.

Remove black references from format, tests and documentation.
@Magnolia-Liu Magnolia-Liu requested a review from a team as a code owner May 5, 2026 15:43
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

View this pull request in Lando to land it once approved.

Comment thread Makefile Outdated
@echo "target is one of:"
@echo " help show this message and exit"
@echo " format run ruff and black on source code"
@echo " format run ruff on source code"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Technically, we also run djLint with this command. It would be good to update that now. :)

Copy link
Copy Markdown
Contributor

@zzzeid zzzeid left a comment

Choose a reason for hiding this comment

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

Couple of questions: is there any way to tweak the setting so that migration files are not affected? This would be ideal for two reasons (1) it would be good to avoid editing old migration files in general and (2) every new migration file will run into this problem, since these files are generated by Django (those are the files under migrations subdirectories).

Comment thread ruff.toml
"src/lando/version/__init__.py",
]

extend-exclude = ["src/lando/version/__init__.py", "src/lando/*/migrations/*"]
Copy link
Copy Markdown
Member

@shtrom shtrom May 6, 2026

Choose a reason for hiding this comment

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

nit: Do we need this both in the ruff.toml and pyproject.toml? Ideally, we should have as much as the config in pyproject.toml, and hopefully none in ruff.toml.

OTOH, if that doesn't work, I think it would be preferable to have the things in ruff.toml, and no duplication.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Keeping the exclude in only pyproject.toml didn't work so instead I'm keeping it in ruff.toml

@cgsheeh cgsheeh self-requested a review May 7, 2026 14:06
@Magnolia-Liu Magnolia-Liu requested review from shtrom and zzzeid May 7, 2026 14:06
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.

4 participants