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

Replace black with ruff #46

Merged
merged 2 commits into from
Feb 26, 2024
Merged

Replace black with ruff #46

merged 2 commits into from
Feb 26, 2024

Conversation

aholmes
Copy link
Member

@aholmes aholmes commented Feb 26, 2024

This change:

  • Replaces black with ruff==0.2.2 in /pyproject.toml
  • Defines inclusion/exclusion rules for ruff
  • Includes default values for formatting
  • Updates CICD to use ruff
  • Specifies to use ruff's --preview mode
  • Reformats some files to account for the differences between black and ruff

- Use `--preview` styles and version lock 0.2.2 so the style stays consistent.
@aholmes aholmes added enhancement New feature or request dependencies Pull requests that update a dependency file labels Feb 26, 2024
@aholmes aholmes requested a review from a team as a code owner February 26, 2024 22:56
Copy link
Member

@nwiltsie nwiltsie left a comment

Choose a reason for hiding this comment

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

Overall looks good - I deeply dislike the multiline ternary, but it seems like a fix might be in the works for that.

Comment on lines +285 to +287
max_age=app.config["PERMANENT_SESSION_LIFETIME"]
if app.config["PERMANENT_SESSION"]
else None,
Copy link
Member

Choose a reason for hiding this comment

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

Oof I don't like this. I don't expect a fix, I just want to register my dismay.

Copy link
Member Author

Choose a reason for hiding this comment

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

I am 100% with you; I think it's a readability nightmare (but so is Python's ternary anyway ...).

@aholmes aholmes merged commit 651a649 into main Feb 26, 2024
6 checks passed
@aholmes aholmes deleted the aholmes-replace-black-with-ruff branch February 26, 2024 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants