From c0dbeae2897adc05ca2915a610169b069d26ed9d Mon Sep 17 00:00:00 2001 From: Andrey Khrolenok Date: Wed, 23 Sep 2020 01:12:21 +0300 Subject: [PATCH] Fix new project structure bugs --- .pre-commit-config.yaml | 6 +-- custom_components/average/manifest.json | 16 +++---- hass-integration-manifest.schema.json | 56 ------------------------- 3 files changed, 12 insertions(+), 66 deletions(-) delete mode 100644 hass-integration-manifest.schema.json diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ce3fdde..d2c7baa 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: args: - --safe - --quiet - files: ^(custom_components|script)/.+\.py$ + files: ^custom_components/.+\.py$ - repo: https://gitlab.com/pycqa/flake8 rev: 3.8.1 hooks: @@ -19,7 +19,7 @@ repos: additional_dependencies: - flake8-docstrings==1.5.0 - pydocstyle==5.0.2 - files: ^(custom_components)/.+\.py$ + files: ^custom_components/.+\.py$ - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.5.0 hooks: @@ -38,7 +38,7 @@ repos: # shell. - id: mypy name: mypy - entry: script/run-in-env.sh mypy + entry: bin/run-in-env mypy language: script types: [python] require_serial: true diff --git a/custom_components/average/manifest.json b/custom_components/average/manifest.json index f19342e..99d50c1 100644 --- a/custom_components/average/manifest.json +++ b/custom_components/average/manifest.json @@ -1,8 +1,10 @@ { - "domain": "average", - "name": "Average", - "documentation": "https://github.com/Limych/ha-average", - "requirements": [], - "dependencies": [], - "codeowners": ["@Limych"] -} + "codeowners": [ + "@Limych" + ], + "dependencies": [], + "documentation": "https://github.com/Limych/ha-average", + "domain": "average", + "name": "Average", + "requirements": [] +} \ No newline at end of file diff --git a/hass-integration-manifest.schema.json b/hass-integration-manifest.schema.json deleted file mode 100644 index 784a914..0000000 --- a/hass-integration-manifest.schema.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://github.com/Limych/ha-average/blob/master/hass-integration-manifest.schema.json", - "title": "Home Assistant Integration Manifest", - "description": "Manifest of integration for Home Assistant smart home system", - "type": "object", - "properties": { - "domain": { - "type": "string", - "description": "The unique domain name of this integration. Cannot be changed" - }, - "name": { - "type": "string", - "description": "The name of the integration" - }, - "documentation": { - "type": "string", - "description": "URL of the website containing documentation on how to use that integration" - }, - "requirements": { - "type": "array", - "description": "List of required Python libraries or modules for this integration", - "items": { - "type": "string" - }, - "minItems": 0, - "uniqueItems": true - }, - "dependencies": { - "type": "array", - "description": "List of the other Home Assistant integrations that need to Home Assistant to set up successfully prior to the integration being loaded", - "items": { - "type": "string" - }, - "minItems": 0, - "uniqueItems": true - }, - "codeowners": { - "type": "array", - "description": "List of GitHub usernames or team names of people that are responsible for this integration", - "items": { - "type": "string" - }, - "minItems": 0, - "uniqueItems": true - } - }, - "required": [ - "domain", - "name", - "documentation", - "requirements", - "dependencies", - "codeowners" - ] -}