Skip to content

Conversation

@larsks
Copy link
Member

@larsks larsks commented Mar 25, 2025

Bring this repository in line with other ESI repositories and introduce our
standard linting and ruff-based formatting of Python code.

NB: This PR is based on #66

larsks added 3 commits March 25, 2025 08:35
The `is` operator checks for identity, not equality. To check for an empty
list, one should use either:

    if roles == []:

Or just take advantage of the fact that an empty list is `False` when used
in a boolean expression, and write:

    if not roles:

This commit takes the second option.
Bring this repository in line with other ESI repositories and introduce our
standard linting and ruff-based formatting of Python code.
Correct all the errors reported by pre-commit.
@larsks larsks changed the title feature/lint and format Add pre-commit config and workflow Mar 25, 2025
@larsks larsks requested a review from tzumainn March 25, 2025 12:55
Copy link
Contributor

@tzumainn tzumainn left a comment

Choose a reason for hiding this comment

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

Looks good - thanks!

@tzumainn tzumainn merged commit 65ef869 into CCI-MOC:master Mar 25, 2025
5 checks passed
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