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

Trivial linting #48

Merged
merged 1 commit into from
Aug 19, 2024
Merged

Trivial linting #48

merged 1 commit into from
Aug 19, 2024

Conversation

lulu-berlin
Copy link
Member

@lulu-berlin lulu-berlin commented Aug 19, 2024

I noticed some linting issues while working on #47. I got warnings both in my IDE and when running pytest and I assume that some of these warnings (like the string escaping issue with regular expressions) actually reach production.

Changes:

  • Autoformat the code with black for better readability
  • Replace == True with is True
  • Remove redundant parentheses in conditional statements
  • Replace if not x in y: with if x not in y:
  • Replace != None with is not None
  • Use raw string (r"...") with regular expressions to avoid escaping issues (as recommended in the documentation of the re module).

@vlinkz

- Autoformat the code with `black` for better readability
- Replace `== True` with `is True`
- Remove redundant parentheses in conditional statements
- Replace `if not x in y:` with `if x not in y:`
- Replace `!= None` with `is not None`
- Use raw string (r"...") with regular expressions to avoid escaping
  issues (as recommended in the documentation of the `re` module).
@vlinkz vlinkz merged commit 9b68a96 into NixOS:calamares Aug 19, 2024
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