Add mypy check, add missing types and fix type issues
This commit is contained in:
7
.github/workflows/python_check.yml
vendored
7
.github/workflows/python_check.yml
vendored
@@ -24,12 +24,17 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install flake8 pylint black
|
||||
python -m pip install -r requirements.txt
|
||||
python -m pip install -r requirements_dev.txt
|
||||
- name: Lint with flake8
|
||||
run: |
|
||||
# stop the build if there are Python syntax errors or undefined names
|
||||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics
|
||||
- name: Type check with mypy
|
||||
run: |
|
||||
touch "$(python -c 'import inspect, homeassistant, os; print(os.path.dirname(inspect.getfile(homeassistant)))')"/py.typed
|
||||
mypy -p custom_components.hon
|
||||
# - name: Analysing the code with pylint
|
||||
# run: |
|
||||
# pylint --max-line-length 88 $(git ls-files '*.py')
|
||||
|
Reference in New Issue
Block a user