From 8a67f481cbdc2eaad7fa22cd1b73402b5b51966a Mon Sep 17 00:00:00 2001 From: Joachim Metz Date: Wed, 9 Oct 2024 06:15:00 +0200 Subject: [PATCH] Updated pylintrc to version 3.2 (#25) --- .github/workflows/test_docker.yml | 39 +++++++++++-------------------- .github/workflows/test_docs.yml | 4 ++-- .github/workflows/test_tox.yml | 16 +++++++------ .pylintrc | 24 ++++++++++++++----- setup.cfg | 2 +- tox.ini | 2 +- 6 files changed, 45 insertions(+), 42 deletions(-) diff --git a/.github/workflows/test_docker.yml b/.github/workflows/test_docker.yml index fe6b4f3..9cda41d 100644 --- a/.github/workflows/test_docker.yml +++ b/.github/workflows/test_docker.yml @@ -7,18 +7,18 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - version: ['39'] + version: ['39', '40'] container: image: registry.fedoraproject.org/fedora:${{ matrix.version }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up container run: | dnf install -y dnf-plugins-core langpacks-en - name: Install dependencies run: | dnf copr -y enable @gift/dev - dnf install -y @development-tools python3 python3-devel python3-setuptools + dnf install -y @development-tools python3 python3-build python3-devel python3-setuptools python3-wheel - name: Run tests env: LANG: C.utf8 @@ -27,25 +27,21 @@ jobs: - name: Run end-to-end tests run: | if test -f tests/end-to-end.py; then PYTHONPATH=. python3 ./tests/end-to-end.py --debug -c config/end-to-end.ini; fi - - name: Build source distribution + - name: Build source distribution (sdist) run: | - python3 ./setup.py sdist - - name: Build binary distribution + python3 -m build --no-isolation --sdist + - name: Build binary distribution (wheel) run: | - python3 ./setup.py bdist - - name: Run build and install test - run: | - python3 ./setup.py build - python3 ./setup.py install + python3 -m build --no-isolation --wheel test_ubuntu: runs-on: ubuntu-latest strategy: matrix: - version: ['22.04'] + version: ['24.04'] container: image: ubuntu:${{ matrix.version }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up container env: DEBIAN_FRONTEND: noninteractive @@ -58,7 +54,7 @@ jobs: run: | add-apt-repository -y ppa:gift/dev apt-get update -q - apt-get install -y build-essential python3 python3-dev python3-distutils python3-pip python3-setuptools python3-wheel + apt-get install -y build-essential python3 python3-build python3-dev python3-pip python3-setuptools python3-wheel - name: Run tests env: LANG: en_US.UTF-8 @@ -69,16 +65,9 @@ jobs: LANG: en_US.UTF-8 run: | if test -f tests/end-to-end.py; then PYTHONPATH=. python3 ./tests/end-to-end.py --debug -c config/end-to-end.ini; fi - - name: Update setuptools - run: | - python3 -m pip install -U setuptools - - name: Build source distribution - run: | - python3 ./setup.py sdist - - name: Build binary distribution + - name: Build source distribution (sdist) run: | - python3 ./setup.py bdist - - name: Run build and install test + python3 -m build --no-isolation --sdist + - name: Build binary distribution (wheel) run: | - python3 ./setup.py build - python3 ./setup.py install + python3 -m build --no-isolation --wheel diff --git a/.github/workflows/test_docs.yml b/.github/workflows/test_docs.yml index 144a5b6..287c423 100644 --- a/.github/workflows/test_docs.yml +++ b/.github/workflows/test_docs.yml @@ -19,7 +19,7 @@ jobs: container: image: ubuntu:22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up container env: DEBIAN_FRONTEND: noninteractive @@ -36,7 +36,7 @@ jobs: add-apt-repository -y ppa:deadsnakes/ppa add-apt-repository -y ppa:gift/dev apt-get update -q - apt-get install -y build-essential git python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-distutils python3-pip python3-setuptools + apt-get install -y build-essential git python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-distutils python3-lib2to3 python3-pip python3-setuptools - name: Install tox run: | python3 -m pip install tox diff --git a/.github/workflows/test_tox.yml b/.github/workflows/test_tox.yml index ab92871..7b32b6d 100644 --- a/.github/workflows/test_tox.yml +++ b/.github/workflows/test_tox.yml @@ -27,7 +27,7 @@ jobs: container: image: ubuntu:22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up container env: DEBIAN_FRONTEND: noninteractive @@ -44,7 +44,7 @@ jobs: add-apt-repository -y ppa:deadsnakes/ppa add-apt-repository -y ppa:gift/dev apt-get update -q - apt-get install -y build-essential git python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-distutils python3-pip python3-setuptools + apt-get install -y build-essential git python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-distutils python3-lib2to3 python3-pip python3-setuptools - name: Install tox run: | python3 -m pip install tox @@ -63,7 +63,7 @@ jobs: container: image: ubuntu:22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up container env: DEBIAN_FRONTEND: noninteractive @@ -80,7 +80,7 @@ jobs: add-apt-repository -y ppa:deadsnakes/ppa add-apt-repository -y ppa:gift/dev apt-get update -q - apt-get install -y build-essential git python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-distutils python3-pip python3-setuptools + apt-get install -y build-essential git python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-distutils python3-lib2to3 python3-pip python3-setuptools - name: Install tox run: | python3 -m pip install tox @@ -90,7 +90,9 @@ jobs: run: | tox -e${{ matrix.toxenv }} - name: Upload coverage report to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} lint: runs-on: ubuntu-latest strategy: @@ -101,7 +103,7 @@ jobs: container: image: ubuntu:22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up container env: DEBIAN_FRONTEND: noninteractive @@ -118,7 +120,7 @@ jobs: add-apt-repository -y ppa:deadsnakes/ppa add-apt-repository -y ppa:gift/dev apt-get update -q - apt-get install -y build-essential git python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-distutils python3-pip python3-setuptools + apt-get install -y build-essential git python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-distutils python3-lib2to3 python3-pip python3-setuptools - name: Install tox run: | python3 -m pip install tox diff --git a/.pylintrc b/.pylintrc index 877a22b..33d61a7 100644 --- a/.pylintrc +++ b/.pylintrc @@ -1,4 +1,4 @@ -# Pylint 3.0.x configuration file +# Pylint 3.2.x configuration file # # This file is generated by l2tdevtools update-dependencies.py, any dependency # related changes should be made in dependencies.ini. @@ -29,6 +29,7 @@ clear-cache-post-run=no # A comma-separated list of package or module names from where C extensions may # be loaded. Extensions are loading into the active Python interpreter and may # run arbitrary code. +# extension-pkg-allow-list= extension-pkg-allow-list= # A comma-separated list of package or module names from where C extensions may @@ -63,10 +64,11 @@ ignore-paths= # Emacs file locks ignore-patterns=^\.# -# List of module names for which member attributes should not be checked -# (useful for modules/projects where namespaces are manipulated during runtime -# and thus existing member attributes cannot be deduced by static analysis). It -# supports qualified module names, as well as Unix pattern matching. +# List of module names for which member attributes should not be checked and +# will not be imported (useful for modules/projects where namespaces are +# manipulated during runtime and thus existing member attributes cannot be +# deduced by static analysis). It supports qualified module names, as well as +# Unix pattern matching. ignored-modules= # Python code to execute, usually for sys.path manipulation such as @@ -85,11 +87,16 @@ 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. persistent=yes +# Resolve imports to .pyi stubs if available. May reduce no-member messages and +# increase not-an-iterable messages. +prefer-stubs=no + # Minimum Python version to use for version dependent checks. Will default to # the version used to run pylint. py-version=3.12 @@ -440,7 +447,6 @@ 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, @@ -478,6 +484,7 @@ disable=assignment-from-none, # either give multiple identifier separated by comma (,) or put this option # multiple time (only on the command line, not in the configuration file where # it should appear only once). See also the "--disable" option for examples. +# enable= enable=c-extension-no-member @@ -510,6 +517,11 @@ max-nested-blocks=5 # printed. never-returning-functions=sys.exit,argparse.parse_error +# Let 'consider-using-join' be raised when the separator to join on would be +# non-empty (resulting in expected fixes of the type: ``"- " + " - +# ".join(items)``) +suggest-join-with-non-empty-separator=yes + [REPORTS] diff --git a/setup.cfg b/setup.cfg index 15e0755..cc3aefd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = dfkinds -version = 20240317 +version = 20241008 description = Digital Forensics kinds (types and classes). long_description = dfKinds, or Digital Forensics kinds, provides data type and class definitions to provide consistent definitions of entities (or description of things) across different tools. long_description_content_type = text/plain diff --git a/tox.ini b/tox.ini index 8f50ec2..de75027 100644 --- a/tox.ini +++ b/tox.ini @@ -53,7 +53,7 @@ deps = -rrequirements.txt -rtest_requirements.txt docformatter - pylint >= 3.0.0, < 3.1.0 + pylint >= 3.2.0, < 3.3.0 setuptools commands = docformatter --version