From 3414b3c8628fa1480e5cc25825d9e25d7eec905c Mon Sep 17 00:00:00 2001 From: Joachim Metz Date: Sun, 17 Dec 2023 05:51:26 +0100 Subject: [PATCH] Updated pylintrc to version 3.0 --- .github/workflows/test_tox.yml | 4 ++-- .pylintrc | 13 +++++++----- appveyor.yml | 37 +++++++++++++++++++++++++--------- tox.ini | 2 +- 4 files changed, 39 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test_tox.yml b/.github/workflows/test_tox.yml index 775a100..a1a153f 100644 --- a/.github/workflows/test_tox.yml +++ b/.github/workflows/test_tox.yml @@ -60,8 +60,8 @@ jobs: strategy: matrix: include: - - python-version: '3.11' - toxenv: 'py311,coverage' + - python-version: '3.10' + toxenv: 'coverage' container: image: ubuntu:22.04 steps: diff --git a/.pylintrc b/.pylintrc index 446e1e6..877a22b 100644 --- a/.pylintrc +++ b/.pylintrc @@ -1,4 +1,4 @@ -# Pylint 2.17.x configuration file +# Pylint 3.0.x configuration file # # This file is generated by l2tdevtools update-dependencies.py, any dependency # related changes should be made in dependencies.ini. @@ -85,7 +85,6 @@ limit-inference-results=100 # List of plugins (as comma separated values of python module names) to load, # usually to register additional checkers. -# load-plugins= load-plugins=pylint.extensions.docparams # Pickle collected data for later comparisons. @@ -93,7 +92,7 @@ persistent=yes # Minimum Python version to use for version dependent checks. Will default to # the version used to run pylint. -py-version=3.11 +py-version=3.12 # Discover python modules and packages in the file system subtree. # recursive=no @@ -441,6 +440,7 @@ confidence=HIGH, # --enable=similarities". If you want to run only the classes checker, but have # no Warning level messages displayed, use "--disable=all --enable=classes # --disable=W". + disable=assignment-from-none, bad-inline-option, consider-using-f-string, @@ -468,6 +468,8 @@ disable=assignment-from-none, too-many-return-statements, too-many-statements, unsubscriptable-object, + use-implicit-booleaness-not-comparison-to-string, + use-implicit-booleaness-not-comparison-to-zero, useless-object-inheritance, useless-suppression, use-symbolic-message-instead @@ -522,8 +524,9 @@ evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor # used to format the message information. See doc for all details. msg-template= -# Set the output format. Available formats are text, parseable, colorized, json -# and msvs (visual studio). You can also give a reporter class, e.g. +# Set the output format. Available formats are: text, parseable, colorized, +# json2 (improved json format), json (old json format) and msvs (visual +# studio). You can also give a reporter class, e.g. # mypackage.mymodule.MyReporterClass. #output-format= diff --git a/appveyor.yml b/appveyor.yml index 13b76f0..f10b274 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,34 +1,53 @@ environment: matrix: - - DESCRIPTION: "Windows with 32-bit Python 3.11" + - DESCRIPTION: "Run tests on Windows with 32-bit Python 3.11" MACHINE_TYPE: "x86" APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 PYTHON: "C:\\Python311" PYTHON_VERSION: "3.11" L2TBINARIES_TRACK: "dev" - - DESCRIPTION: "Windows with 64-bit Python 3.11" + TARGET: tests + - DESCRIPTION: "Run tests on Windows with 64-bit Python 3.11" MACHINE_TYPE: "amd64" APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 PYTHON: "C:\\Python311-x64" PYTHON_VERSION: "3.11" L2TBINARIES_TRACK: "dev" - - DESCRIPTION: "Mac OS with Python 3.11" + TARGET: tests + - DESCRIPTION: "Build wheel on Windows with 32-bit Python 3.11" + MACHINE_TYPE: "amd64" + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + PYTHON: "C:\\Python311-x64" + PYTHON_VERSION: "3.11" + L2TBINARIES_TRACK: "dev" + TARGET: wheel + - DESCRIPTION: "Build wheel on Windows with 64-bit Python 3.11" + MACHINE_TYPE: "amd64" + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + PYTHON: "C:\\Python311-x64" + PYTHON_VERSION: "3.11" + L2TBINARIES_TRACK: "dev" + TARGET: wheel + - DESCRIPTION: "Run tests on Mac OS with Python 3.11" APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey HOMEBREW_NO_INSTALL_CLEANUP: 1 + TARGET: tests install: -- cmd: "%PYTHON%\\python.exe -m pip install -U pip setuptools twine wheel" +- cmd: "%PYTHON%\\python.exe -m pip install -U build pip setuptools twine wheel" - ps: If ($isWindows) { .\config\appveyor\install.ps1 } - sh: config/appveyor/install.sh build_script: -- cmd: "%PYTHON%\\python.exe setup.py bdist_wheel" +- cmd: IF [%TARGET%]==[wheel] ( + "%PYTHON%\\python.exe" -m build --wheel ) test_script: -- cmd: "%PYTHON%\\python.exe run_tests.py" -- cmd: IF EXIST "tests\\end-to-end.py" ( - set PYTHONPATH=. && - "%PYTHON%\\python.exe" "tests\\end-to-end.py" --debug -c "config\\end-to-end.ini" ) +- cmd: IF [%TARGET%]==[tests] ( + "%PYTHON%\\python.exe" run_tests.py && + IF EXIST "tests\\end-to-end.py" ( + set PYTHONPATH=. && + "%PYTHON%\\python.exe" "tests\\end-to-end.py" --debug -c "config\\end-to-end.ini" ) ) - sh: config/appveyor/runtests.sh artifacts: diff --git a/tox.ini b/tox.ini index 36626e3..6179037 100644 --- a/tox.ini +++ b/tox.ini @@ -45,7 +45,7 @@ setenv = deps = -rrequirements.txt -rtest_requirements.txt - pylint >= 2.17.0, < 2.18.0 + pylint >= 3.0.0, < 3.1.0 yamllint >= 1.26.0 commands = pylint --version