From 575c37b51bb83008c2619d378dfcd1ca5c36dddb Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 28 Jul 2020 00:28:32 -0400 Subject: [PATCH 1/3] ci: Add tee to debug reviewdog. --- .github/workflows/reviewdog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index d235cec9c2e5..15a3d864ee2b 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -29,7 +29,7 @@ jobs: REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | flake8 --docstring-convention=all | \ - reviewdog -f=pep8 -name=flake8 -reporter=github-check + reviewdog -f=pep8 -name=flake8 -tee -reporter=github-check eslint: name: eslint From 5cfec07f194483dba6e79516f9e4e58c82cf2370 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 28 Jul 2020 00:35:01 -0400 Subject: [PATCH 2/3] ci: Disable filtering of lint errors. For certain reporters, it's necessary to do this filtering because GitHub does not allow posting to unrelated files. The github-check reporter _should_ allow it though, and we want to catch things like unused imports that may not be in the diff. --- .github/workflows/reviewdog.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 15a3d864ee2b..a6fee8cfebfc 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -29,7 +29,8 @@ jobs: REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | flake8 --docstring-convention=all | \ - reviewdog -f=pep8 -name=flake8 -tee -reporter=github-check + reviewdog -f=pep8 -name=flake8 \ + -tee -reporter=github-check -filter-mode nofilter eslint: name: eslint @@ -40,6 +41,7 @@ jobs: - name: eslint uses: reviewdog/action-eslint@v1 with: + filter_mode: nofilter github_token: ${{ secrets.GITHUB_TOKEN }} reporter: github-check workdir: 'lib/matplotlib/backends/web_backend/' From 89d05cab6cc58f0328c3f7c9d586537b90eba650 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 28 Jul 2020 17:55:34 -0400 Subject: [PATCH 3/3] Silence an unused import warning. Since this is on a bugfix branch, don't remove the import in case it's in use. And fix a missing empty line. --- lib/matplotlib/bezier.py | 1 + lib/matplotlib/figure.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/matplotlib/bezier.py b/lib/matplotlib/bezier.py index 3fcd31d7dea3..f2960cfcd25e 100644 --- a/lib/matplotlib/bezier.py +++ b/lib/matplotlib/bezier.py @@ -10,6 +10,7 @@ import matplotlib.cbook as cbook + # same algorithm as 3.8's math.comb @np.vectorize @lru_cache(maxsize=128) diff --git a/lib/matplotlib/figure.py b/lib/matplotlib/figure.py index 2783666f1ed4..1080a1946622 100644 --- a/lib/matplotlib/figure.py +++ b/lib/matplotlib/figure.py @@ -28,7 +28,7 @@ from matplotlib.axes import Axes, SubplotBase, subplot_class_factory from matplotlib.blocking_input import BlockingMouseInput, BlockingKeyMouseInput -from matplotlib.gridspec import GridSpec, SubplotSpec +from matplotlib.gridspec import GridSpec, SubplotSpec # noqa: F401 import matplotlib.legend as mlegend from matplotlib.patches import Rectangle from matplotlib.text import Text