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

chore: Simplify boolean if expression ✨ #2944

Merged
merged 3 commits into from
Oct 28, 2023
Merged

Conversation

yezz123
Copy link
Contributor

@yezz123 yezz123 commented Nov 2, 2021

Pull Request Checklist

Simplifies boolean if expressions by removing unnecessary explicit references to True or False states.

Rather than using an if-expression to evaluate a boolean, you can just use it directly. This is shorter and clearer, if expressions of this form take a while to mentally parse.

  • Ensured tests pass and (if applicable) updated functional test output
  • Conformed to code style guidelines by running appropriate linting tools
  • Added tests for changed code
  • Updated documentation for changed code

pelican/plugins/_utils.py Outdated Show resolved Hide resolved
@yezz123 yezz123 requested review from justinmayer and ingwinlu June 19, 2023 06:02
@yezz123 yezz123 requested a review from justinmayer June 19, 2023 06:56
Copy link
Member

@justinmayer justinmayer 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 to me.

@avaris / @ingwinlu: Any further comments on this?

@boxydog
Copy link
Contributor

boxydog commented Oct 28, 2023

@avaris - This is a small PR, but I don't see bugs. It passes tests. Merge?

Copy link
Member

@avaris avaris left a comment

Choose a reason for hiding this comment

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

Good to go, but probably with a squash merge. Not the best commit messages...

Copy link
Member

@justinmayer justinmayer left a comment

Choose a reason for hiding this comment

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

Many thanks to @yezz123 for the enhancements and to @boxydog and @avaris for reviewing. 🎖️

@justinmayer justinmayer removed the request for review from ingwinlu October 28, 2023 20:04
@justinmayer justinmayer merged commit b812f2a into getpelican:master Oct 28, 2023
10 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.

5 participants