-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adjusted eols Also updated .gitattributes and extensions.json * Linter fix Sorted imports using ruff. Auto spacing using ruff. Relative imports in tests. Added None return type in tests.
- Loading branch information
Showing
21 changed files
with
1,105 additions
and
1,073 deletions.
There are no files selected for viewing
Empty file.
Empty 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
.git | ||
config | ||
.devcontainer | ||
.vscode | ||
**/__pycache__ | ||
.git | ||
config | ||
.devcontainer | ||
.vscode | ||
**/__pycache__ |
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,17 +1,17 @@ | ||
name: Validate | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
validate: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: "actions/checkout@v2" | ||
- name: HACS validation | ||
uses: "hacs/action@main" | ||
with: | ||
category: "integration" | ||
name: Validate | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
validate: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: "actions/checkout@v2" | ||
- name: HACS validation | ||
uses: "hacs/action@main" | ||
with: | ||
category: "integration" |
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,57 +1,57 @@ | ||
repos: | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.38.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py39-plus] | ||
- repo: https://github.com/psf/black | ||
rev: 22.8.0 | ||
hooks: | ||
- id: black | ||
args: | ||
- --safe | ||
- --quiet | ||
files: ^((homeassistant|pylint|script|tests)/.+)?[^/]+\.py$ | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.1.0 | ||
hooks: | ||
- id: codespell | ||
args: | ||
- --ignore-words-list=hass,alot,datas,dof,dur,ether,farenheit,hist,iff,iif,ines,ist,lightsensor,mut,nd,pres,referer,rime,ser,serie,te,technik,ue,uint,visability,wan,wanna,withing,iam,incomfort,ba,haa,pullrequests | ||
- --skip="./.*,*.csv,*.json" | ||
- --quiet-level=2 | ||
exclude_types: [csv, json] | ||
exclude: ^tests/fixtures/|homeassistant/generated/ | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 4.0.1 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: | ||
- pycodestyle==2.8.0 | ||
- pyflakes==2.4.0 | ||
- flake8-docstrings==1.6.0 | ||
- pydocstyle==6.1.1 | ||
- flake8-comprehensions==3.10.0 | ||
- flake8-noqa==1.2.8 | ||
- mccabe==0.6.1 | ||
files: ^(homeassistant|script|tests)/.+\.py$ | ||
- repo: https://github.com/PyCQA/bandit | ||
rev: 1.7.4 | ||
hooks: | ||
- id: bandit | ||
args: | ||
- --quiet | ||
- --format=custom | ||
- --configfile=tests/bandit.yaml | ||
files: ^(homeassistant|script|tests)/.+\.py$ | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: check-executables-have-shebangs | ||
stages: [manual] | ||
- id: check-json | ||
exclude: (.vscode|.devcontainer) | ||
repos: | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.38.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py39-plus] | ||
- repo: https://github.com/psf/black | ||
rev: 22.8.0 | ||
hooks: | ||
- id: black | ||
args: | ||
- --safe | ||
- --quiet | ||
files: ^((homeassistant|pylint|script|tests)/.+)?[^/]+\.py$ | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.1.0 | ||
hooks: | ||
- id: codespell | ||
args: | ||
- --ignore-words-list=hass,alot,datas,dof,dur,ether,farenheit,hist,iff,iif,ines,ist,lightsensor,mut,nd,pres,referer,rime,ser,serie,te,technik,ue,uint,visability,wan,wanna,withing,iam,incomfort,ba,haa,pullrequests | ||
- --skip="./.*,*.csv,*.json" | ||
- --quiet-level=2 | ||
exclude_types: [csv, json] | ||
exclude: ^tests/fixtures/|homeassistant/generated/ | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 4.0.1 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: | ||
- pycodestyle==2.8.0 | ||
- pyflakes==2.4.0 | ||
- flake8-docstrings==1.6.0 | ||
- pydocstyle==6.1.1 | ||
- flake8-comprehensions==3.10.0 | ||
- flake8-noqa==1.2.8 | ||
- mccabe==0.6.1 | ||
files: ^(homeassistant|script|tests)/.+\.py$ | ||
- repo: https://github.com/PyCQA/bandit | ||
rev: 1.7.4 | ||
hooks: | ||
- id: bandit | ||
args: | ||
- --quiet | ||
- --format=custom | ||
- --configfile=tests/bandit.yaml | ||
files: ^(homeassistant|script|tests)/.+\.py$ | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: check-executables-have-shebangs | ||
stages: [manual] | ||
- id: check-json | ||
exclude: (.vscode|.devcontainer) |
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
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,21 +1,21 @@ | ||
MIT License | ||
Copyright (c) 2020 Indu Prakash @iprak | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
MIT License | ||
|
||
Copyright (c) 2020 Indu Prakash @iprak | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 @@ | ||
"""Dummy __init__.py to make imports with pytest-homeassistant-custom-component work.""" | ||
"""Dummy __init__.py to make imports with pytest-homeassistant-custom-component work.""" |
Empty 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
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,4 +1,4 @@ | ||
# Describes the format of available services for yahoofinance | ||
|
||
refresh_symbols: | ||
# Describes the format of available services for yahoofinance | ||
|
||
refresh_symbols: | ||
description: Refresh data for all the symbols. |
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,7 +1,13 @@ | ||
# Set the default behavior, in case people don't have core.autocrlf set. | ||
* text eol=lf | ||
|
||
# Declare files that will always have CRLF line endings on checkout. | ||
*.py text eol=lf | ||
|
||
*.sh text eol=lf | ||
# Ensure Docker script files uses LF to support Docker for Windows. | ||
# Ensure "git config --global core.autocrlf input" before you clone | ||
* text eol=lf | ||
*.py whitespace=error | ||
|
||
*.ico binary | ||
*.jpg binary | ||
*.png binary | ||
*.zip binary | ||
*.mp3 binary | ||
*.pcm binary | ||
|
||
Dockerfile.dev linguist-language=Dockerfile |
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,4 +1,4 @@ | ||
{ | ||
"name": "Yahoo Finance", | ||
"render_readme": true | ||
{ | ||
"name": "Yahoo Finance", | ||
"render_readme": true | ||
} |
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,4 +1,4 @@ | ||
"""Tests for Yahoo Finance component.""" | ||
|
||
TEST_SYMBOL = "BABA" | ||
TEST_CRUMB = "!123" | ||
"""Tests for Yahoo Finance component.""" | ||
|
||
TEST_SYMBOL = "BABA" | ||
TEST_CRUMB = "!123" |
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,9 +1,9 @@ | ||
{ | ||
"finance": { | ||
"result": null, | ||
"error": { | ||
"code": "Bad Request", | ||
"description": "Missing required query parameter=symbols" | ||
} | ||
} | ||
{ | ||
"finance": { | ||
"result": null, | ||
"error": { | ||
"code": "Bad Request", | ||
"description": "Missing required query parameter=symbols" | ||
} | ||
} | ||
} |
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,17 +1,17 @@ | ||
# https://bandit.readthedocs.io/en/latest/config.html | ||
|
||
tests: | ||
- B108 | ||
- B306 | ||
- B307 | ||
- B313 | ||
- B314 | ||
- B315 | ||
- B316 | ||
- B317 | ||
- B318 | ||
- B319 | ||
- B320 | ||
- B325 | ||
- B602 | ||
- B604 | ||
# https://bandit.readthedocs.io/en/latest/config.html | ||
|
||
tests: | ||
- B108 | ||
- B306 | ||
- B307 | ||
- B313 | ||
- B314 | ||
- B315 | ||
- B316 | ||
- B317 | ||
- B318 | ||
- B319 | ||
- B320 | ||
- B325 | ||
- B602 | ||
- B604 |
Oops, something went wrong.