Skip to content

Commit

Permalink
Merge branch 'main' into issue-6895
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Jun 13, 2022
2 parents 2b4382c + c21261e commit 1f33e33
Show file tree
Hide file tree
Showing 103 changed files with 861 additions and 337 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: actions/checkout@v3.0.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v3.1.2
uses: actions/setup-python@v4.0.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Generate partial Python venv restore key
Expand All @@ -41,7 +41,7 @@ jobs:
}}"
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.3
uses: actions/cache@v3.0.4
with:
path: venv
key: >-
Expand All @@ -64,7 +64,7 @@ jobs:
hashFiles('.pre-commit-config.yaml') }}"
- name: Restore pre-commit environment
id: cache-precommit
uses: actions/cache@v3.0.3
uses: actions/cache@v3.0.4
with:
path: ${{ env.PRE_COMMIT_CACHE }}
key: >-
Expand All @@ -87,12 +87,12 @@ jobs:
uses: actions/checkout@v3.0.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v3.1.2
uses: actions/setup-python@v4.0.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.3
uses: actions/cache@v3.0.4
with:
path: venv
key:
Expand All @@ -105,7 +105,7 @@ jobs:
exit 1
- name: Restore pre-commit environment
id: cache-precommit
uses: actions/cache@v3.0.3
uses: actions/cache@v3.0.4
with:
path: ${{ env.PRE_COMMIT_CACHE }}
key: ${{ runner.os }}-${{ needs.prepare-base.outputs.pre-commit-key }}
Expand Down Expand Up @@ -134,12 +134,12 @@ jobs:
uses: actions/checkout@v3.0.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v3.1.2
uses: actions/setup-python@v4.0.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.3
uses: actions/cache@v3.0.4
with:
path: venv
key:
Expand All @@ -165,12 +165,12 @@ jobs:
uses: actions/checkout@v3.0.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v3.1.2
uses: actions/setup-python@v4.0.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.3
uses: actions/cache@v3.0.4
with:
path: venv
key:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/primer-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@v3.0.2
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.1.2
uses: actions/setup-python@v4.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Generate partial Python venv restore key
Expand All @@ -46,7 +46,7 @@ jobs:
}}"
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.3
uses: actions/cache@v3.0.4
with:
path: venv
key: >-
Expand Down Expand Up @@ -75,12 +75,12 @@ jobs:
uses: actions/checkout@v3.0.2
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.1.2
uses: actions/setup-python@v4.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.3
uses: actions/cache@v3.0.4
with:
path: venv
key:
Expand Down Expand Up @@ -110,12 +110,12 @@ jobs:
uses: actions/checkout@v3.0.2
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.1.2
uses: actions/setup-python@v4.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.3
uses: actions/cache@v3.0.4
with:
path: venv
key:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/primer_comment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: actions/checkout@v3.0.2
- name: Set up Python 3.10
id: python
uses: actions/setup-python@v3.1.2
uses: actions/setup-python@v4.0.0
with:
python-version: "3.10"

Expand All @@ -45,7 +45,7 @@ jobs:
}}"
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.3
uses: actions/cache@v3.0.4
with:
path: venv
key: >-
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
- name: Compare outputs
run: |
. venv/bin/activate
python tests/primer/primer_tool.py compare \
python tests/primer/__main__.py compare \
--commit=${{ github.event.workflow_run.head_sha }} \
--base-file=output_${{ steps.python.outputs.python-version }}_main.txt \
--new-file=output_${{ steps.python.outputs.python-version }}_pr.txt
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/primer_run_main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: actions/checkout@v3.0.2
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.1.2
uses: actions/setup-python@v4.0.0
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -49,7 +49,7 @@ jobs:
'astroid_sha.txt') }}"
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.3
uses: actions/cache@v3.0.4
with:
path: venv
key: >-
Expand All @@ -72,12 +72,12 @@ jobs:
id: commitstring
run: |
. venv/bin/activate
python tests/primer/primer_tool.py prepare --make-commit-string
output=$(python tests/primer/primer_tool.py prepare --read-commit-string)
python tests/primer/__main__.py prepare --make-commit-string
output=$(python tests/primer/__main__.py prepare --read-commit-string)
echo "::set-output name=commitstring::$output"
- name: Restore projects cache
id: cache-projects
uses: actions/cache@v3.0.3
uses: actions/cache@v3.0.4
with:
path: tests/.pylint_primer_tests/
key: >-
Expand All @@ -86,7 +86,7 @@ jobs:
- name: Regenerate cache
run: |
. venv/bin/activate
python tests/primer/primer_tool.py prepare --clone
python tests/primer/__main__.py prepare --clone
- name: Upload output diff
uses: actions/upload-artifact@v3
with:
Expand All @@ -98,7 +98,7 @@ jobs:
run: |
. venv/bin/activate
pip install -e .
python tests/primer/primer_tool.py run --type=main 2>warnings.txt
python tests/primer/__main__.py run --type=main 2>warnings.txt
WARNINGS=$(head -c 65000 < warnings.txt)
if [[ $WARNINGS ]]
then echo "::warning ::$WARNINGS"
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/primer_run_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.1.2
uses: actions/setup-python@v4.0.0
with:
python-version: ${{ matrix.python-version }}
- uses: actions/setup-node@v3
Expand All @@ -64,7 +64,7 @@ jobs:
'astroid_sha.txt') }}"
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.3
uses: actions/cache@v3.0.4
with:
path: venv
key: >-
Expand Down Expand Up @@ -141,11 +141,11 @@ jobs:
id: commitstring
run: |
. venv/bin/activate
output=$(python tests/primer/primer_tool.py prepare --read-commit-string)
output=$(python tests/primer/__main__.py prepare --read-commit-string)
echo "::set-output name=commitstring::$output"
- name: Restore projects cache
id: cache-projects
uses: actions/cache@v3.0.3
uses: actions/cache@v3.0.4
with:
path: tests/.pylint_primer_tests/
key: >-
Expand All @@ -154,7 +154,7 @@ jobs:
- name: Check cache
run: |
. venv/bin/activate
python tests/primer/primer_tool.py prepare --check
python tests/primer/__main__.py prepare --check
# Merge the 'main' commit of last successful run
- name: Pull 'main'
Expand All @@ -169,7 +169,7 @@ jobs:
run: |
. venv/bin/activate
pip install -e .
python tests/primer/primer_tool.py run --type=pr 2>warnings.txt
python tests/primer/__main__.py run --type=pr 2>warnings.txt
WARNINGS=$(head -c 65000 < warnings.txt)
if [[ $WARNINGS ]]
then echo "::warning ::$WARNINGS"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v3.0.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v3.1.2
uses: actions/setup-python@v4.0.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Install requirements
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: actions/checkout@v3.0.2
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.1.2
uses: actions/setup-python@v4.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Generate partial Python venv restore key
Expand All @@ -40,7 +40,7 @@ jobs:
}}"
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.3
uses: actions/cache@v3.0.4
with:
path: venv
key: >-
Expand Down Expand Up @@ -84,12 +84,12 @@ jobs:
uses: actions/checkout@v3.0.2
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.1.2
uses: actions/setup-python@v4.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.3
uses: actions/cache@v3.0.4
with:
path: venv
key:
Expand Down Expand Up @@ -128,12 +128,12 @@ jobs:
uses: actions/checkout@v3.0.2
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.1.2
uses: actions/setup-python@v4.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.3
uses: actions/cache@v3.0.4
with:
path: venv
key:
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
uses: actions/checkout@v3.0.2
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.1.2
uses: actions/setup-python@v4.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Generate partial Python venv restore key
Expand All @@ -195,7 +195,7 @@ jobs:
}}"
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.3
uses: actions/cache@v3.0.4
with:
path: venv
key: >-
Expand Down Expand Up @@ -230,7 +230,7 @@ jobs:
uses: actions/checkout@v3.0.2
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.1.2
uses: actions/setup-python@v4.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Generate partial Python venv restore key
Expand All @@ -241,7 +241,7 @@ jobs:
}}"
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.3
uses: actions/cache@v3.0.4
with:
path: venv
key: >-
Expand Down Expand Up @@ -274,7 +274,7 @@ jobs:
uses: actions/checkout@v3.0.2
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.1.2
uses: actions/setup-python@v4.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Generate partial Python venv restore key
Expand All @@ -285,7 +285,7 @@ jobs:
}}"
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.3
uses: actions/cache@v3.0.4
with:
path: venv
key: >-
Expand Down
2 changes: 2 additions & 0 deletions doc/data/messages/b/bad-inline-option/bad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# 2:[bad-inline-option]
# pylint: disable line-too-long
1 change: 0 additions & 1 deletion doc/data/messages/b/bad-inline-option/details.rst

This file was deleted.

2 changes: 1 addition & 1 deletion doc/data/messages/b/bad-inline-option/good.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# This is a placeholder for correct code for this message.
# pylint: disable=line-too-long
5 changes: 5 additions & 0 deletions doc/data/messages/c/consider-iterating-dictionary/bad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FRUITS = {"apple": 1, "pear": 5, "peach": 10}


for fruit in FRUITS.keys(): # [consider-iterating-dictionary]
print(fruit)

This file was deleted.

6 changes: 5 additions & 1 deletion doc/data/messages/c/consider-iterating-dictionary/good.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# This is a placeholder for correct code for this message.
FRUITS = {"apple": 1, "pear": 5, "peach": 10}


for fruit in FRUITS:
print(fruit)
5 changes: 5 additions & 0 deletions doc/data/messages/e/empty-comment/bad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# +1:[empty-comment]
#

# +1:[empty-comment]
x = 0 #
1 change: 0 additions & 1 deletion doc/data/messages/e/empty-comment/details.rst

This file was deleted.

0 comments on commit 1f33e33

Please sign in to comment.