aboutsummaryrefslogtreecommitdiff
path: root/circuitpython/tools/adabot/patches/0001-Removed-pylint-process-from-github-workflow.patch
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2022-06-19 19:47:51 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2022-06-19 19:47:51 +0530
commit4fd287655a72b9aea14cdac715ad5b90ed082ed2 (patch)
tree65d393bc0e699dd12d05b29ba568e04cea666207 /circuitpython/tools/adabot/patches/0001-Removed-pylint-process-from-github-workflow.patch
parent0150f70ce9c39e9e6dd878766c0620c85e47bed0 (diff)
add circuitpython code
Diffstat (limited to 'circuitpython/tools/adabot/patches/0001-Removed-pylint-process-from-github-workflow.patch')
-rw-r--r--circuitpython/tools/adabot/patches/0001-Removed-pylint-process-from-github-workflow.patch75
1 files changed, 75 insertions, 0 deletions
diff --git a/circuitpython/tools/adabot/patches/0001-Removed-pylint-process-from-github-workflow.patch b/circuitpython/tools/adabot/patches/0001-Removed-pylint-process-from-github-workflow.patch
new file mode 100644
index 0000000..8f4d8fd
--- /dev/null
+++ b/circuitpython/tools/adabot/patches/0001-Removed-pylint-process-from-github-workflow.patch
@@ -0,0 +1,75 @@
+From 223f4eea34853e043ab9e00cbcf8fb0fd6451aff Mon Sep 17 00:00:00 2001
+From: dherrada <dylan.herrada@adafruit.com>
+Date: Tue, 2 Mar 2021 16:46:17 -0500
+Subject: [PATCH] Removed pylint process from github workflow
+
+---
+ .github/workflows/build.yml | 8 ++------
+ .pre-commit-config.yaml | 15 +++++++++++++++
+ .pylintrc | 2 +-
+ 3 files changed, 18 insertions(+), 7 deletions(-)
+
+diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
+index 59baa53..621d5ef 100644
+--- a/.github/workflows/build.yml
++++ b/.github/workflows/build.yml
+@@ -42,18 +42,14 @@ 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
+ run: |
+ pre-commit run --all-files
+- - name: PyLint
+- run: |
+- pylint $( find . -path './adafruit*.py' )
+- ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace $( find . -path "./examples/*.py" ))
+ - name: Build assets
+ run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location .
+ - name: Archive bundles
+diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
+index 07f886c..354c761 100644
+--- a/.pre-commit-config.yaml
++++ b/.pre-commit-config.yaml
+@@ -17,3 +17,18 @@ repos:
+ - id: check-yaml
+ - id: end-of-file-fixer
+ - id: trailing-whitespace
++- repo: https://github.com/pycqa/pylint
++ rev: pylint-2.7.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)
++ 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 $example; done)']
++ language: system
+diff --git a/.pylintrc b/.pylintrc
+index 5c31f66..9ed669e 100644
+--- a/.pylintrc
++++ b/.pylintrc
+@@ -250,7 +250,7 @@ ignore-comments=yes
+ ignore-docstrings=yes
+
+ # Ignore imports when computing similarities.
+-ignore-imports=no
++ignore-imports=yes
+
+ # Minimum lines number of a similarity.
+ min-similarity-lines=4
+--
+2.24.3 (Apple Git-128)
+