-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from gerard33/master
Add style checks
- Loading branch information
Showing
8 changed files
with
174 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Configured to be compliant with black | ||
[flake8] | ||
max-line-length = 88 | ||
# E501: line too long | ||
# W503: Line break occurred before a binary operator | ||
# E203: Whitespace before ':' | ||
# D202 No blank lines allowed after function docstring | ||
# W504 line break after binary operator | ||
ignore = | ||
E501, | ||
W503, | ||
E203, | ||
D202, | ||
W504 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
name: Push/Pull actions | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- master | ||
|
||
pull_request: | ||
|
||
jobs: | ||
validate: | ||
runs-on: "ubuntu-latest" | ||
name: Validate | ||
steps: | ||
- uses: "actions/checkout@v2" | ||
|
||
- name: HACS validation | ||
uses: "hacs/integration/action@master" | ||
env: | ||
SKIP_BRANDS_CHECK: "True" | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CATEGORY: "integration" | ||
|
||
- name: Hassfest validation | ||
uses: "home-assistant/actions/hassfest@master" | ||
|
||
style: | ||
runs-on: "ubuntu-latest" | ||
name: Check style formatting | ||
steps: | ||
- uses: "actions/checkout@v2" | ||
- uses: "actions/setup-python@v1" | ||
with: | ||
python-version: "3.x" | ||
- run: python3 -m pip install black | ||
- run: black . | ||
|
||
- run: | | ||
pip3 install flake8 flake8-docstrings | ||
flake8 --version | ||
flake8 . | ||
- run: | | ||
pip3 install isort | ||
isort --version | ||
isort --check-only --verbose | ||
- run: | | ||
pip3 install yamllint | ||
yamllint --version | ||
yamllint . | ||
- run: if git ls-files | xargs file | grep CRLF; then exit 1; fi |
14 changes: 9 additions & 5 deletions
14
.github/workflows/hacs_validate.yaml → .github/workflows/validate_via_cron.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
name: Validate with HACS | ||
--- | ||
name: Validate actions via cron | ||
|
||
on: | ||
push: | ||
pull_request: | ||
on: # yamllint disable-line rule:truthy | ||
schedule: | ||
- cron: "0 0 * * *" | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
validate: | ||
runs-on: "ubuntu-latest" | ||
name: Validate | ||
steps: | ||
- uses: "actions/checkout@v2" | ||
|
||
- name: HACS validation | ||
uses: "hacs/integration/action@master" | ||
env: | ||
SKIP_BRANDS_CHECK: "True" | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CATEGORY: "integration" | ||
|
||
- name: Hassfest validation | ||
uses: "home-assistant/actions/hassfest@master" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
fail_on_violations: true | ||
|
||
flake8: | ||
enabled: true | ||
config_file: .flake8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[settings] | ||
multi_line_output = 3 | ||
include_trailing_comma = True | ||
force_grid_wrap = 0 | ||
use_parentheses = True | ||
line_length = 88 | ||
not_skip = __init__.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
"""ICY E-Thermostaat init file""" | ||
"""ICY E-Thermostaat init file.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters