Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pylint-dev/pylint
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.13.9
Choose a base ref
...
head repository: pylint-dev/pylint
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.14.0
Choose a head ref
Loading
Showing 1,756 changed files with 34,126 additions and 16,419 deletions.
9 changes: 9 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -7,6 +7,12 @@ include =
pylint/*
omit =
*/test/*
# TODO: 3.0: Remove these after these files have been removed
pylint/config/configuration_mixin.py
pylint/config/option.py
pylint/config/option_manager_mixin.py
pylint/config/option_parser.py
pylint/config/options_provider_mixin.py
exclude_lines =
# Re-enable default pragma
pragma: no cover
@@ -17,3 +23,6 @@ exclude_lines =
# Type checking code not executed during pytest runs
if TYPE_CHECKING:
@overload

# Abstract methods are not exectued during pytest runs
raise NotImplementedError()
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/BUG-REPORT.yml
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ body:
placeholder: |
# Leave this blank if the configuration is not relevant!
[MASTER]
[MAIN]
load-plugins=
pylint.extensions.code_style
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/QUESTION.yml
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ body:
[issue search]: https://github.com/PyCQA/pylint/issues?q=is%3Aissue+is%3Aopen+
[Discussions]: https://discord.gg/Egy6P8AMB5
[Discussions]: https://discord.com/invite/Egy6P8AMB5
- type: textarea
id: question
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: 💬 Discord
url: https://discord.gg/Egy6P8AMB5
url: https://discord.com/invite/Egy6P8AMB5
about: Astroid and pylint informal dev discussion
20 changes: 11 additions & 9 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -3,12 +3,13 @@ Thank you for submitting a PR to pylint!
To ease the process of reviewing your PR, do make sure to complete the following boxes.
- [ ] Add a ChangeLog entry describing what your PR does.
- [ ] If it's a new feature, or an important bug fix, add a What's New entry in
`doc/whatsnew/<current release.rst>`.
- [ ] Write a good description on what the PR does.
- [ ] Add an entry to the change log describing the change in
`doc/whatsnew/2/2.15/index.rst` (or ``doc/whatsnew/2/2.14/full.rst``
if the change needs backporting in 2.14). If necessary you can write
details or offer examples on how the new change is supposed to work.
- [ ] If you used multiple emails or multiple names when contributing, add your mails
and preferred name in ``script/.contributors_aliases.json``
and preferred name in ``script/.contributors_aliases.json``
-->

## Type of Changes
@@ -24,9 +25,10 @@ To ease the process of reviewing your PR, do make sure to complete the following

## Description

<!--
If this PR fixes a particular issue, use the following to automatically close that issue
once this PR gets merged:
-->
<!-- If this PR references an issue without fixing it: -->

Refs #XXXX

<!-- If this PR fixes an issue, use the following to automatically close when we merge: -->

Closes #XXX
Closes #XXXX
192 changes: 192 additions & 0 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
name: Checks

on:
push:
branches:
- main
- 2.*
pull_request: ~

env:
# Also change CACHE_VERSION in the other workflows
CACHE_VERSION: 8
DEFAULT_PYTHON: 3.8
PRE_COMMIT_CACHE: ~/.cache/pre-commit

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
prepare-base:
name: Prepare base dependencies
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
python-key: ${{ steps.generate-python-key.outputs.key }}
pre-commit-key: ${{ steps.generate-pre-commit-key.outputs.key }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.0.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v3.1.2
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Generate partial Python venv restore key
id: generate-python-key
run: >-
echo "::set-output name=key::base-venv-${{ env.CACHE_VERSION }}-${{
hashFiles('setup.cfg', 'requirements_test.txt', 'requirements_test_min.txt')
}}"
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.2
with:
path: venv
key: >-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
steps.generate-python-key.outputs.key }}
restore-keys: |
${{ runner.os }}-${{ steps.python.outputs.python-version }}-base-venv-${{ env.CACHE_VERSION }}-
- name: Create Python virtual environment
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
python -m venv venv
. venv/bin/activate
python -m pip install -U pip setuptools wheel
pip install -U -r requirements_test.txt
pip install -U -r doc/requirements.txt
- name: Generate pre-commit restore key
id: generate-pre-commit-key
run: >-
echo "::set-output name=key::pre-commit-${{ env.CACHE_VERSION }}-${{
hashFiles('.pre-commit-config.yaml') }}"
- name: Restore pre-commit environment
id: cache-precommit
uses: actions/cache@v3.0.2
with:
path: ${{ env.PRE_COMMIT_CACHE }}
key: >-
${{ runner.os }}-${{ steps.generate-pre-commit-key.outputs.key }}
restore-keys: |
${{ runner.os }}-pre-commit-${{ env.CACHE_VERSION }}-
- name: Install pre-commit dependencies
if: steps.cache-precommit.outputs.cache-hit != 'true'
run: |
. venv/bin/activate
pre-commit install --install-hooks
pylint:
name: pylint
runs-on: ubuntu-latest
timeout-minutes: 10
needs: prepare-base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.0.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v3.1.2
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.2
with:
path: venv
key:
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
needs.prepare-base.outputs.python-key }}
- name: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python venv from cache"
exit 1
- name: Restore pre-commit environment
id: cache-precommit
uses: actions/cache@v3.0.2
with:
path: ${{ env.PRE_COMMIT_CACHE }}
key: ${{ runner.os }}-${{ needs.prepare-base.outputs.pre-commit-key }}
- name: Fail job if pre-commit cache restore failed
if: steps.cache-precommit.outputs.cache-hit != 'true'
run: |
echo "Failed to restore pre-commit environment from cache"
exit 1
- name: Install enchant and aspell
run: |
sudo apt-get update
sudo apt-get install enchant aspell-en
- name: Run pylint checks
run: |
. venv/bin/activate
pip install -e .
pre-commit run --hook-stage manual pylint-with-spelling --all-files
spelling:
name: spelling tests
runs-on: ubuntu-latest
timeout-minutes: 5
needs: prepare-base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.0.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v3.1.2
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.2
with:
path: venv
key:
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
needs.prepare-base.outputs.python-key }}
- name: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python venv from cache"
exit 1
- name: Run spelling checks
run: |
. venv/bin/activate
pytest tests/ -k unittest_spelling
documentation:
name: documentation
runs-on: ubuntu-latest
timeout-minutes: 10
needs: prepare-base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.0.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v3.1.2
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.2
with:
path: venv
key:
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
needs.prepare-base.outputs.python-key }}
- name: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python venv from cache"
exit 1
- name: Run checks on documentation code examples
run: |
. venv/bin/activate
pytest doc/test_messages_documentation.py
- name: Check documentation build and links
run: |
. venv/bin/activate
cd doc
make html
Loading