From a73d39add1449ab022a44ba48efdbf4f810bc760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Rom=C3=A1n?= Date: Tue, 27 Oct 2026 11:58:26 -0700 Subject: [PATCH] build(deps): pre-commit autoupdate --- .github/workflows/ci.yml | 4 +-- .github/workflows/pip-compile-upgrade.yml | 10 +++--- .github/workflows/pre-commit-autoupdate.yml | 2 +- .github/workflows/publish.yml | 4 +-- .github/workflows/tox.yml | 4 +-- .pre-commit-config.yaml | 13 ++++---- .pylintrc | 31 ++++++++++++++++--- .../common/script/builtin/__init__.py | 9 ++++-- src/org/python/core/__init__.py | 3 +- src/system/mongodb/types.py | 4 +-- .../common/script/builtin/__init__.pyi | 3 +- stubs/stubs/org/python/core/__init__.pyi | 3 +- 12 files changed, 56 insertions(+), 34 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1392dd5..9fdc180 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,13 +10,13 @@ on: jobs: pre-commit: - uses: coatl-dev/workflows/.github/workflows/pre-commit.yml@92e51b14907b5aac1a8af1fcd9c2a1a5369dc47a # v7.0.32 + uses: coatl-dev/workflows/.github/workflows/pre-commit.yml@d7cf5f9059f9a5fa365b8c9e06ff63f5d968ddb0 # v7.1.0 with: checkout-ref: ${{ github.ref }} skip-hooks: 'pylint' pylint: - uses: coatl-dev/workflows/.github/workflows/pylint.yml@92e51b14907b5aac1a8af1fcd9c2a1a5369dc47a # v7.0.32 + uses: coatl-dev/workflows/.github/workflows/pylint.yml@d7cf5f9059f9a5fa365b8c9e06ff63f5d968ddb0 # v7.1.0 with: path: src checkout-ref: ${{ github.ref }} diff --git a/.github/workflows/pip-compile-upgrade.yml b/.github/workflows/pip-compile-upgrade.yml index 97f207e..78f24e3 100644 --- a/.github/workflows/pip-compile-upgrade.yml +++ b/.github/workflows/pip-compile-upgrade.yml @@ -19,12 +19,12 @@ jobs: ref: ${{ matrix.branch }} - name: Upgrade package requirements - uses: coatl-dev/actions/pip-compile-upgrade@283f0790110a211f3255faeda31417d81823fd02 # v7.1.1 + uses: coatl-dev/actions/pip-compile-upgrade@499c77f2bc6f909d372849058517ca2e39ce16d4 # v7.1.3 with: path: requirements.txt - name: Upgrade stubs requirements - uses: coatl-dev/actions/uv-pip-compile-upgrade@283f0790110a211f3255faeda31417d81823fd02 # v7.1.1 + uses: coatl-dev/actions/uv-pip-compile-upgrade@499c77f2bc6f909d372849058517ca2e39ce16d4 # v7.1.3 with: path: requirements.txt python-version: '3.12' @@ -32,13 +32,13 @@ jobs: - name: Detect changes id: git-diff - uses: coatl-dev/actions/simple-git-diff@283f0790110a211f3255faeda31417d81823fd02 # v7.1.1 + uses: coatl-dev/actions/simple-git-diff@499c77f2bc6f909d372849058517ca2e39ce16d4 # v7.1.3 with: path: ${{ github.workspace }} - name: Import GPG key if: ${{ steps.git-diff.outputs.diff == 'true' }} - uses: coatl-dev/actions/gpg-import@283f0790110a211f3255faeda31417d81823fd02 # v7.1.1 + uses: coatl-dev/actions/gpg-import@499c77f2bc6f909d372849058517ca2e39ce16d4 # v7.1.3 with: passphrase: ${{ secrets.COATL_BOT_GPG_PASSPHRASE }} private-key: ${{ secrets.COATL_BOT_GPG_PRIVATE_KEY }} @@ -63,7 +63,7 @@ jobs: - name: Create pull request if: ${{ steps.git-diff.outputs.diff == 'true' }} - uses: coatl-dev/actions/pr-create@283f0790110a211f3255faeda31417d81823fd02 # v7.1.1 + uses: coatl-dev/actions/pr-create@499c77f2bc6f909d372849058517ca2e39ce16d4 # v7.1.3 with: gh-token: ${{ secrets.COATL_BOT_GH_TOKEN }} base-branch: '${{ matrix.branch }}' diff --git a/.github/workflows/pre-commit-autoupdate.yml b/.github/workflows/pre-commit-autoupdate.yml index c484f41..830f3ba 100644 --- a/.github/workflows/pre-commit-autoupdate.yml +++ b/.github/workflows/pre-commit-autoupdate.yml @@ -11,7 +11,7 @@ jobs: matrix: branch: ['8.1', '8.3'] fail-fast: false - uses: coatl-dev/workflows/.github/workflows/pre-commit-autoupdate.yml@92e51b14907b5aac1a8af1fcd9c2a1a5369dc47a # v7.0.32 + uses: coatl-dev/workflows/.github/workflows/pre-commit-autoupdate.yml@d7cf5f9059f9a5fa365b8c9e06ff63f5d968ddb0 # v7.1.0 with: autoupdate-branch: '${{ matrix.branch }}' checkout-ref: ${{ matrix.branch }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2801e5e..a388435 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,12 +20,12 @@ jobs: ref: ${{ github.event.release.tag_name }} - name: Upload package to PyPI - uses: coatl-dev/actions/pypi-upload@283f0790110a211f3255faeda31417d81823fd02 # v7.1.1 + uses: coatl-dev/actions/pypi-upload@499c77f2bc6f909d372849058517ca2e39ce16d4 # v7.1.3 with: password: ${{ secrets.PYPI_API_TOKEN_IGNITION_API_PKG }} - name: Upload stubs to PyPI - uses: coatl-dev/actions/pypi-upload@283f0790110a211f3255faeda31417d81823fd02 # v7.1.1 + uses: coatl-dev/actions/pypi-upload@499c77f2bc6f909d372849058517ca2e39ce16d4 # v7.1.3 with: python-version: '3.12' password: ${{ secrets.PYPI_API_TOKEN_IGNITION_API_STUBS }} diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index f956679..d509072 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -7,12 +7,12 @@ on: jobs: tox-package: - uses: coatl-dev/workflows/.github/workflows/tox-docker.yml@92e51b14907b5aac1a8af1fcd9c2a1a5369dc47a # v7.0.32 + uses: coatl-dev/workflows/.github/workflows/tox-docker.yml@d7cf5f9059f9a5fa365b8c9e06ff63f5d968ddb0 # v7.1.0 with: checkout-ref: ${{ inputs.checkout-ref }} tox-stubs: - uses: coatl-dev/workflows/.github/workflows/tox.yml@92e51b14907b5aac1a8af1fcd9c2a1a5369dc47a # v7.0.32 + uses: coatl-dev/workflows/.github/workflows/tox.yml@d7cf5f9059f9a5fa365b8c9e06ff63f5d968ddb0 # v7.1.0 with: python-versions: | 3.9 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 008a08b..f0dc036 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,21 +6,22 @@ repos: name: sort-all files: ^src/ - repo: https://github.com/bwhmather/ssort - rev: 0.17.0 + rev: 0.19.0 hooks: - id: ssort files: ^src/ - repo: https://github.com/psf/black-pre-commit-mirror - rev: 26.5.1 + rev: 26.10.1 hooks: - id: black - repo: https://github.com/hakancelikdev/unimport - rev: 1.4.0 + rev: 1.5.0 hooks: - id: unimport + language_version: python3.12 files: ^src/ - repo: https://github.com/PyCQA/isort - rev: 9.0.2 + rev: 10.0.0b1 hooks: - id: isort name: isort-package @@ -41,10 +42,10 @@ repos: hooks: - id: flake8 name: flake8-package + language_version: python3.12 args: [--config=tox.ini] files: ^src/ additional_dependencies: [pydoclint] - language_version: python3.12 - repo: https://github.com/PyCQA/flake8 rev: 7.4.1 hooks: @@ -62,7 +63,7 @@ repos: exclude: ^src/(ch|com|org)/ args: [--config=tox.ini] - repo: https://github.com/commitizen-tools/commitizen - rev: v4.19.0 + rev: v4.19.3 hooks: - id: commitizen - id: commitizen-branch diff --git a/.pylintrc b/.pylintrc index bec5c7a..ac1caa0 100644 --- a/.pylintrc +++ b/.pylintrc @@ -41,6 +41,13 @@ fail-on= # Specify a score threshold under which the program will exit with error. fail-under=10 +# The files to lint. The flag can also be omitted as pylint will try to lint +# any file passed as argument. This can be used to set files to a directory in +# a configuration file and invoke pylint by only typing pylint on the command +# line. Any file passed as argument will overwrite any file set in the +# configuration file. +files= + # Interpret the stdin as a python script, whose filename needs to be passed as # the module_or_package argument. #from-stdin= @@ -93,7 +100,7 @@ prefer-stubs=no # Minimum Python version to use for version dependent checks. Will default to # the version used to run pylint. -py-version=3.14 +py-version=3.15 # Discover python modules and packages in the file system subtree. recursive=no @@ -337,6 +344,10 @@ expected-line-ending-format= # Regexp for a line that is allowed to be longer than the limit. ignore-long-lines=^\s*(# )??$ +# Regexp for a part of a line that will not be counted when calculating the +# line length. +#ignore-pattern-in-long-lines= + # Number of spaces of indent required inside a hanging or continued line. indent-after-paren=4 @@ -389,6 +400,9 @@ import-graph= # to the given file (report RP0402 must not be disabled). int-import-graph= +# Force import order to recognize a module as part of a first party library. +known-first-party= + # Force import order to recognize a module as part of the standard # compatibility libraries. known-standard-library= @@ -505,9 +519,9 @@ evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor msg-template= # Set the output format. Available formats are: 'text', 'parseable', -# 'colorized', 'json2' (improved json format), 'json' (old json format), msvs -# (visual studio) and 'github' (GitHub actions). You can also give a reporter -# class, e.g. mypackage.mymodule.MyReporterClass. +# 'colorized', 'json2' (improved json format), 'json' (old json format), 'msvs' +# (visual studio), 'github' (GitHub actions) and 'junit' (JUnit XML). You can +# also give a reporter class, e.g. mypackage.mymodule.MyReporterClass. #output-format= # Tells whether to display a full report or only the messages. @@ -531,7 +545,8 @@ ignore-imports=yes # Signatures are removed from the similarity computation ignore-signatures=yes -# Minimum lines number of a similarity. +# Minimum lines number of a similarity. Setting it to 0 will disable the check, +# but you should use disable=duplicate-code instead. min-similarity-lines=4 @@ -605,6 +620,12 @@ ignored-checks-for-mixins=no-member, # qualified names. ignored-classes=optparse.Values,thread._local,_thread._local,argparse.Namespace +# Couples of functions with side effects that are often believed to return +# something and the equivalent function that does return something, separated +# by a comma. Used to hint at the right function to use in the 'assignment- +# from-no-return' message. +known-side-effects-only-functions=reverse:reversed,sort:sorted + # Show a hint with possible names when a member name was not found. The aspect # of finding the hint is based on edit distance. missing-member-hint=yes diff --git a/src/com/inductiveautomation/ignition/common/script/builtin/__init__.py b/src/com/inductiveautomation/ignition/common/script/builtin/__init__.py index 9844ddf..080e6b0 100644 --- a/src/com/inductiveautomation/ignition/common/script/builtin/__init__.py +++ b/src/com/inductiveautomation/ignition/common/script/builtin/__init__.py @@ -11,9 +11,14 @@ from typing import Any, Dict, List, Optional, Tuple, Union from java.io import OutputStream, Writer -from java.lang import ArrayIndexOutOfBoundsException, Class +from java.lang import ( + ArrayIndexOutOfBoundsException, + Class, + IllegalArgumentException, + Object, + UnsupportedOperationException, +) from java.lang import Exception as JavaException -from java.lang import IllegalArgumentException, Object, UnsupportedOperationException from java.util import Locale from com.inductiveautomation.ignition.common import BasicDataset, Dataset diff --git a/src/org/python/core/__init__.py b/src/org/python/core/__init__.py index a643a0e..de2ee32 100644 --- a/src/org/python/core/__init__.py +++ b/src/org/python/core/__init__.py @@ -38,9 +38,8 @@ from enum import Enum from java.io import PrintWriter from java.lang import Class, Object, RuntimeException, StringBuilder, Throwable -from java.util import Collection +from java.util import Collection, ListIterator, Properties from java.util import Iterator as JIterator -from java.util import ListIterator, Properties from org.python.expose import TypeBuilder diff --git a/src/system/mongodb/types.py b/src/system/mongodb/types.py index 7d6a1c1..53e107a 100644 --- a/src/system/mongodb/types.py +++ b/src/system/mongodb/types.py @@ -2,9 +2,6 @@ from org.bson.types import ( Binary, -) -from org.bson.types import BSONTimestamp as Timestamp -from org.bson.types import ( Code, CodeWithScope, CodeWScope, @@ -14,6 +11,7 @@ ObjectId, Symbol, ) +from org.bson.types import BSONTimestamp as Timestamp __all__ = [ "Binary", diff --git a/stubs/stubs/com/inductiveautomation/ignition/common/script/builtin/__init__.pyi b/stubs/stubs/com/inductiveautomation/ignition/common/script/builtin/__init__.pyi index b165ded..c68ad66 100644 --- a/stubs/stubs/com/inductiveautomation/ignition/common/script/builtin/__init__.pyi +++ b/stubs/stubs/com/inductiveautomation/ignition/common/script/builtin/__init__.pyi @@ -9,9 +9,8 @@ from com.inductiveautomation.ignition.common.opc import BrowseElementType from com.inductiveautomation.ignition.common.script.abc import AbstractJythonSequence from com.inductiveautomation.ignition.common.script.message import Request from java.io import OutputStream, Writer -from java.lang import Class +from java.lang import Class, Object from java.lang import Exception as JavaException -from java.lang import Object from java.util import Locale from org.json import JSONObject from org.python.core import PyFunction, PyList, PyObject, PySequence diff --git a/stubs/stubs/org/python/core/__init__.pyi b/stubs/stubs/org/python/core/__init__.pyi index b171eb9..e4a077b 100644 --- a/stubs/stubs/org/python/core/__init__.pyi +++ b/stubs/stubs/org/python/core/__init__.pyi @@ -4,9 +4,8 @@ from typing import Any, Iterable, Iterator, List, Mapping, Optional, Tuple, Unio from enum import Enum from java.io import PrintWriter from java.lang import Class, Object, RuntimeException, StringBuilder -from java.util import Collection +from java.util import Collection, ListIterator, Properties from java.util import Iterator as JIterator -from java.util import ListIterator, Properties from org.python.expose import TypeBuilder class PyObject(Object):