Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
python-version: 3.8
- name: Install Lint Dependencies
run: |
pip install pyflakes==2.3.0 black==20.8b1 --no-cache-dir
pip install pyflakes==2.3.0 black==20.8b1 pytype==2021.5.25 --no-cache-dir
sudo wget -O /usr/local/bin/buildifier https://github.com/bazelbuild/buildtools/releases/download/4.0.1/buildifier-linux-amd64
sudo chmod +x /usr/local/bin/buildifier
- name: Run PyFlakes
Expand All @@ -31,3 +31,5 @@ jobs:
clangFormatVersion: 12
- name: Lint bazel files
run: buildifier -mode=check -r ./
- name: Type check with PyType
run: pytype --jobs auto
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.pytype
.lce_configure.bazelrc
.DS_Store
.ipynb_checkpoints
Expand Down
10 changes: 10 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[pytype]

inputs = larq_compute_engine
# Keep going past errors to analyse as many files as possible.
keep_going = True
# Don't check use of imported modules, because we have no type-stubs for TF.
strict_import = True
# Disable import errors since our pybind modules are not available during type check and we don't supply type stubs
disable = import-error
python_version = 3.8