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

Updates Based on Integration Blueprint #171

Merged
merged 14 commits into from
Jan 11, 2024
Prev Previous commit
Next Next commit
Add Ruff Formatter
  • Loading branch information
cloneofghosts committed Jan 7, 2024
commit 3c700e05f6cc4a201565d6adbe60862612f2c351
12 changes: 10 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,13 @@ jobs:
- name: "Install requirements"
run: python3 -m pip install -r requirements.txt

- name: "Run"
run: python3 -m ruff check .
- name: "Format"
run: python3 -m ruff format .

- name: "Check"
run: python3 -m ruff check .

- name: "Auto Commit"
uses: stefanzweifel/git-auto-commit-action@v5.0.0
with:
commit_message: 'style fixes by ruff'
19 changes: 19 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,25 @@ ignore = [
"D411", # Missing blank line before section
"E501", # line too long
"E731", # do not assign a lambda expression, use a def

# May conflict with the formatter, https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"W191",
"E111",
"E114",
"E117",
"D206",
"D300",
"Q000",
"Q001",
"Q002",
"Q003",
"COM812",
"COM819",
"ISC001",
"ISC002",

# Disabled because ruff does not understand type of __all__ generated by a function
"PLE0605",
]

[flake8-pytest-style]
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Pull requests are the best way to propose changes to the codebase.
4. Test you contribution.
5. Issue that pull request!

## Any contributions you make will be under the MIT Software License
## Any contributions you make will be under the Apache-2.0 License

In short, when you submit code changes, your submissions are understood to be under the same [Apache-2.0](https://github.com/Pirate-Weather/pirate-weather-ha?tab=Apache-2.0-1-ov-file#readme) that covers the project. Feel free to contact the maintainers if that's a concern.

Expand Down