mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Remove ignore-wrong-coordinator-module in pylint CI (#117479)
This commit is contained in:
parent
6116caa7ed
commit
73ed49e4b7
4
.github/workflows/ci.yaml
vendored
4
.github/workflows/ci.yaml
vendored
@ -611,14 +611,14 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
python --version
|
python --version
|
||||||
pylint --ignore-missing-annotations=y --ignore-wrong-coordinator-module=y homeassistant
|
pylint --ignore-missing-annotations=y homeassistant
|
||||||
- name: Run pylint (partially)
|
- name: Run pylint (partially)
|
||||||
if: needs.info.outputs.test_full_suite == 'false'
|
if: needs.info.outputs.test_full_suite == 'false'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
python --version
|
python --version
|
||||||
pylint --ignore-missing-annotations=y --ignore-wrong-coordinator-module=y homeassistant/components/${{ needs.info.outputs.integrations_glob }}
|
pylint --ignore-missing-annotations=y homeassistant/components/${{ needs.info.outputs.integrations_glob }}
|
||||||
|
|
||||||
mypy:
|
mypy:
|
||||||
name: Check mypy
|
name: Check mypy
|
||||||
|
@ -19,24 +19,9 @@ class HassEnforceCoordinatorModule(BaseChecker):
|
|||||||
"Used when derived data update coordinator should be placed in its own module.",
|
"Used when derived data update coordinator should be placed in its own module.",
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
options = (
|
|
||||||
(
|
|
||||||
"ignore-wrong-coordinator-module",
|
|
||||||
{
|
|
||||||
"default": False,
|
|
||||||
"type": "yn",
|
|
||||||
"metavar": "<y or n>",
|
|
||||||
"help": "Set to ``no`` if you wish to check if derived data update coordinator "
|
|
||||||
"is placed in its own module.",
|
|
||||||
},
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
def visit_classdef(self, node: nodes.ClassDef) -> None:
|
def visit_classdef(self, node: nodes.ClassDef) -> None:
|
||||||
"""Check if derived data update coordinator is placed in its own module."""
|
"""Check if derived data update coordinator is placed in its own module."""
|
||||||
if self.linter.config.ignore_wrong_coordinator_module:
|
|
||||||
return
|
|
||||||
|
|
||||||
root_name = node.root().name
|
root_name = node.root().name
|
||||||
|
|
||||||
# we only want to check component update coordinators
|
# we only want to check component update coordinators
|
||||||
|
Loading…
x
Reference in New Issue
Block a user