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

Add json check and format to pre-commit #164

Merged
merged 2 commits into from
Sep 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/pullpush.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ jobs:
runs-on: "ubuntu-latest"
name: Check style formatting
steps:
- uses: "actions/checkout@v4"
- uses: "actions/setup-python@v4"
- uses: actions/checkout@v4.0.0
- uses: actions/setup-python@v4.7.0
with:
python-version: "3.x"
- run: pip install pre-commit==2.9.3
- run: pre-commit run --all-files
- run: if git ls-files | xargs file | grep CRLF; then exit 1; fi
python-version: 3.x
- uses: pre-commit/action@v3.0.0
4 changes: 2 additions & 2 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"default": true,
"line-length": false
"default": true,
"line-length": false
}
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ repos:
- id: mixed-line-ending
args:
- --fix=lf
- id: check-json
- id: pretty-format-json
args:
- --autofix
- --no-sort-keys

- repo: https://github.com/psf/black
rev: 23.7.0
Expand Down
22 changes: 13 additions & 9 deletions custom_components/avanza_stock/manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{
"domain": "avanza_stock",
"name": "Avanza Stock",
"codeowners": ["@claha"],
"dependencies": [],
"documentation": "https://github.com/custom-components/sensor.avanza_stock",
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/custom-components/sensor.avanza_stock/issues",
"requirements": ["pyavanza==0.6.0"],
"version": "1.4.0"
"domain": "avanza_stock",
"name": "Avanza Stock",
"codeowners": [
"@claha"
],
"dependencies": [],
"documentation": "https://github.com/custom-components/sensor.avanza_stock",
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/custom-components/sensor.avanza_stock/issues",
"requirements": [
"pyavanza==0.6.0"
],
"version": "1.4.0"
}
4 changes: 2 additions & 2 deletions hacs.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "Avanza Stock",
"render_readme": true
"name": "Avanza Stock",
"render_readme": true
}
4 changes: 2 additions & 2 deletions resources.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[
"https://raw.githubusercontent.com/custom-components/sensor.avanza_stock/master/custom_components/avanza_stock/__init__.py",
"https://raw.githubusercontent.com/custom-components/sensor.avanza_stock/master/custom_components/avanza_stock/manifest.json"
"https://raw.githubusercontent.com/custom-components/sensor.avanza_stock/master/custom_components/avanza_stock/__init__.py",
"https://raw.githubusercontent.com/custom-components/sensor.avanza_stock/master/custom_components/avanza_stock/manifest.json"
]