Skip to content

Commit

Permalink
add mypy to github workflow and start fixing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gnmerritt committed Sep 12, 2022
1 parent c679f9f commit f3c6a71
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@ jobs:
pip install netifaces
pip install python-dotenv
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-mypy.txt ]; then pip install -r requirements-mypy.txt; fi
pip install .
- 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
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Type check with mypy
run: mypy -p BAC0
- name: Test with pytest
run: |
coverage run --source BAC0 -m pytest -v
Expand All @@ -55,7 +58,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.test-name }}


# coveralls:
# name: Indicate completion to coveralls.io
# needs: build
Expand Down
1 change: 1 addition & 0 deletions BAC0/core/devices/mixins/CommandableMixin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python
# type: ignore

"""
Rebuilt Commandable
Expand Down
1 change: 1 addition & 0 deletions BAC0/core/io/Simulate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/python
# type: ignore
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015 by Christian Tremblay, P.Eng <[email protected]>
Expand Down
Empty file added BAC0/tools/__init__.py
Empty file.

0 comments on commit f3c6a71

Please sign in to comment.