Skip to content

Commit

Permalink
Merge pull request #24 from astrandb/AddPreCommit
Browse files Browse the repository at this point in the history
Add pre-commit tool
  • Loading branch information
astrandb authored Apr 13, 2023
2 parents bfbf423 + e6a6fca commit fbe074a
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 6 deletions.
30 changes: 30 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-json
exclude: (.vscode|.devcontainer)
- id: pretty-format-json
args: ["--autofix", "--no-ensure-ascii", "--top-keys=domain,name"]
files: manifest.json
- id: pretty-format-json
args: ["--autofix", "--no-ensure-ascii", "--top-keys=name"]
files: hacs.json
- id: pretty-format-json
args: ["--autofix", "--no-ensure-ascii", "--no-sort-keys"]
files: (/strings\.json$|translations/.+\.json$)
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
args:
- --quiet
files: ^((custom_components|homeassistant|pylint|script|tests)/.+)?[^/]+\.py$
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
11 changes: 6 additions & 5 deletions custom_components/weatherlink/translations/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@
"wind_direction": {
"name": "Vindriktning",
"state": {
"north" : "Nord",
"northnortheast" : "Nordnordost",
"northeast" : "Nordost",
"eastnortheast" : "Ostnordost",
"north": "Nord",
"northnortheast": "Nordnordost",
"northeast": "Nordost",
"eastnortheast": "Ostnordost",
"east": "Ost",
"eastsoutheast": "Ostsydost",
"southeast": "Sydost",
"southsoutheast": "Sydsydost",
Expand Down Expand Up @@ -79,4 +80,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ colorlog
flake8
isort
wheel

pre-commit
homeassistant

0 comments on commit fbe074a

Please sign in to comment.