PATCH Pylint and readthedocs patch test
Signed-off-by: dherrada <dylan.herrada@adafruit.com>
This commit is contained in:
parent
3cd0c365c8
commit
b519791d86
5 changed files with 26 additions and 13 deletions
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
@ -42,9 +42,9 @@ jobs:
|
|||
# (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.)
|
||||
run: |
|
||||
source actions-ci/install.sh
|
||||
- name: Pip install pylint, Sphinx, pre-commit
|
||||
- name: Pip install Sphinx, pre-commit
|
||||
run: |
|
||||
pip install --force-reinstall pylint Sphinx sphinx-rtd-theme pre-commit
|
||||
pip install --force-reinstall Sphinx sphinx-rtd-theme pre-commit
|
||||
- name: Library version
|
||||
run: git describe --dirty --always --tags
|
||||
- name: Pre-commit hooks
|
||||
|
|
|
@ -18,17 +18,25 @@ repos:
|
|||
- id: end-of-file-fixer
|
||||
- id: trailing-whitespace
|
||||
- repo: https://github.com/pycqa/pylint
|
||||
rev: pylint-2.7.1
|
||||
rev: v2.11.1
|
||||
hooks:
|
||||
- id: pylint
|
||||
name: pylint (library code)
|
||||
types: [python]
|
||||
exclude: "^(docs/|examples/|setup.py$)"
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: pylint_examples
|
||||
name: pylint (examples code)
|
||||
args:
|
||||
- --disable=consider-using-f-string
|
||||
exclude: "^(docs/|examples/|tests/|setup.py$)"
|
||||
- id: pylint
|
||||
name: pylint (example code)
|
||||
description: Run pylint rules on "examples/*.py" files
|
||||
entry: /usr/bin/env bash -c
|
||||
args: ['([[ ! -d "examples" ]] || for example in $(find . -path "./examples/*.py"); do pylint --disable=missing-docstring,invalid-name,consider-using-f-string $example; done)']
|
||||
language: system
|
||||
types: [python]
|
||||
files: "^examples/"
|
||||
args:
|
||||
- --disable=missing-docstring,invalid-name,consider-using-f-string,duplicate-code
|
||||
- id: pylint
|
||||
name: pylint (test code)
|
||||
description: Run pylint rules on "tests/*.py" files
|
||||
types: [python]
|
||||
files: "^tests/"
|
||||
args:
|
||||
- --disable=missing-docstring,consider-using-f-string,duplicate-code
|
||||
|
|
|
@ -252,7 +252,7 @@ ignore-docstrings=yes
|
|||
ignore-imports=yes
|
||||
|
||||
# Minimum lines number of a similarity.
|
||||
min-similarity-lines=12
|
||||
min-similarity-lines=4
|
||||
|
||||
|
||||
[BASIC]
|
||||
|
|
|
@ -4,4 +4,4 @@
|
|||
|
||||
python:
|
||||
version: 3
|
||||
requirements_file: requirements.txt
|
||||
requirements_file: docs/requirements.txt
|
||||
|
|
5
docs/requirements.txt
Normal file
5
docs/requirements.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
|
||||
#
|
||||
# SPDX-License-Identifier: Unlicense
|
||||
|
||||
sphinx>=4.0.0
|
Loading…
Reference in a new issue