Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REF]: update to pylint 3.0.0, drop support for py3.7 #474

Merged
merged 3 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ['3.7', '3.8', '3.9', '3.10', '3.11']
python: ['3.8', '3.9', '3.10', '3.11']
os: [ubuntu-latest, windows-latest, macos-latest]
tox_env: [py]
include:
Expand All @@ -28,9 +28,6 @@ jobs:
- python: '3.10'
os: ubuntu-latest
tox_env: 'build'
exclude:
- python: '3.7'
os: windows-latest
steps:
- name: Set git to not change EoL
if: runner.os == 'Windows'
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pylint-plugin-utils==0.7
pylint==2.15.*
pylint>=3, <4
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, pin the pylint version in order to avoid adding new lints and creating new CI red without an explicit validation from our side and advice to our team and community

validators==0.20.0
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ summary = Pylint plugin for Odoo
long_description_content_type = text/markdown
license = APGL3
home_page = https://github.com/OCA/pylint-odoo
requires_python = >=3.7.2
requires_python = >=3.8
classifier =
Development Status :: 6 - Mature
Environment :: Console
Expand All @@ -18,7 +18,6 @@ classifier =
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Expand Down
2 changes: 1 addition & 1 deletion src/pylint_odoo/checkers/odoo_addons.py
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,7 @@ def _get_printf_str_args_kwargs(printf_str):
return tuple(args) or kwargs

@utils.only_required_for_messages("except-pass")
def visit_tryexcept(self, node):
def visit_try(self, node):
"""Visit block try except"""
for handler in node.handlers:
if not handler.name and len(handler.body) == 1 and isinstance(handler.body[0], nodes.node_classes.Pass):
Expand Down
3 changes: 1 addition & 2 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ def test_140_check_suppress_migrations(self):
pylint_res = self.run_pylint(path_modules, extra_params)
real_errors = pylint_res.linter.stats.by_msg
expected_errors = {
"invalid-name": 1,
moylop260 marked this conversation as resolved.
Show resolved Hide resolved
"unused-argument": 1,
}
self.assertDictEqual(real_errors, expected_errors)
Expand All @@ -291,7 +290,7 @@ def test_140_check_suppress_migrations(self):
pylint_res = self.run_pylint(path_modules, extra_params)
real_errors = pylint_res.linter.stats.by_msg
expected_errors = {
"invalid-name": 3,
"invalid-name": 1,
"unused-argument": 2,
}
self.assertDictEqual(real_errors, expected_errors)
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ envlist =
lint,
update-readme,
build,
py37,
py38,
py39,
py310,
Expand Down