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

Ruff format mk2 #3044

Merged
merged 9 commits into from
Feb 7, 2024
Merged

Ruff format mk2 #3044

merged 9 commits into from
Feb 7, 2024

Conversation

jhale
Copy link
Member

@jhale jhale commented Feb 7, 2024

  • Format, still some line too long errors?
  • Modify CI.
  • Remove flake8 and isort from image.
  • Format C++ part.
  • Fix remaining check issues.

module_name = f"_petsc_cffi_{worker}"
if MPI.COMM_WORLD.Get_rank() == 0:
ffibuilder = cffi.FFI()
ffibuilder.cdef("""typedef int... PetscInt;
ffibuilder.cdef(
Copy link
Member

Choose a reason for hiding this comment

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

Am I reading this right: ruff also formatted the C code in the string, not only the python code around it?

That is not an issue here, but we may want to be aware of this when applying ruff format e.g. to ffcx, which I guess has more parts like this one.

Copy link
Contributor

Choose a reason for hiding this comment

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

In general though, I think it is bad that ruff edits the contents of triple quotes.

@chrisrichardson
Copy link
Contributor

Not really happy about the multi-line imports, formatting around the : slice operator, and reformatting of triple quoted text. But I guess we'll just have to live with it.

@jhale jhale added this pull request to the merge queue Feb 7, 2024
Merged via the queue into main with commit 8a73be4 Feb 7, 2024
19 checks passed
@jhale jhale deleted the jhale/ruff-format-2 branch February 7, 2024 13:19
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.

3 participants