Skip to content

Apply formatting to Python code#226

Open
cthoyt wants to merge 4 commits into
IUPAC-InChI:devfrom
cthoyt:format
Open

Apply formatting to Python code#226
cthoyt wants to merge 4 commits into
IUPAC-InChI:devfrom
cthoyt:format

Conversation

@cthoyt

@cthoyt cthoyt commented Jun 16, 2026

Copy link
Copy Markdown

Having standardized code formatting makes code more consistent, reduces burden on maintainers, and supports onboarding new contributors.

This PR does the following:

  1. Adds a global pyproject.toml with a bare-bones configuration for ruff, a Python code formatter and linter
  2. Applies ruff format . to all Python files in the project. This fixes spacing and formatting
  3. Applies ruff check --fix --unsafe-fixes . This fixes code style in a small number of places, configured by the pyproject.toml. Initially, this just includes fixing import sort order.
  4. Adds a CI configuration for checking that ruff has been correctly applied

@cthoyt cthoyt changed the title Apply bare-bones ruff format and ruff check Apply formatting to Python code Jun 16, 2026
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.

1 participant