Skip to content

Commit

Permalink
refactor(ia): import PyStringMap from org.python.core (#262)
Browse files Browse the repository at this point in the history
use coatl-dev/workflows@v3
replace Python 3.11 with 3.12
  • Loading branch information
cesarcoatl authored Feb 22, 2024
1 parent 9dd284d commit 824318f
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ on:

jobs:
pre-commit:
uses: coatl-dev/workflows/.github/workflows/pre-commit.yml@v2
uses: coatl-dev/workflows/.github/workflows/pre-commit.yml@v3
with:
skip-hooks: 'pylint'

pylint:
needs: pre-commit
uses: coatl-dev/workflows/.github/workflows/pylint.yml@v2
uses: coatl-dev/workflows/.github/workflows/pylint.yml@v3
3 changes: 2 additions & 1 deletion .github/workflows/pip-compile-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ on:

jobs:
pip-compile-upgrade:
uses: coatl-dev/workflows/.github/workflows/pip-compile-upgrade.yml@v2
uses: coatl-dev/workflows/.github/workflows/pip-compile-upgrade.yml@v3
with:
path: requirements.txt
python-version: '2.7'
secrets:
gh-token: ${{ secrets.COATL_BOT_GH_TOKEN }}
gpg-sign-passphrase: ${{ secrets.COATL_BOT_GPG_PASSPHRASE }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ on:

jobs:
tox:
uses: coatl-dev/workflows/.github/workflows/tox-docker.yml@v2
uses: coatl-dev/workflows/.github/workflows/tox-docker.yml@v3
with:
python-version: '3.12'
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit-autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
pre-commit-autoupdate:
uses: coatl-dev/workflows/.github/workflows/pre-commit-autoupdate.yml@v2
uses: coatl-dev/workflows/.github/workflows/pre-commit-autoupdate.yml@v3
with:
skip-repos: 'flake8'
secrets:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@ on:

jobs:
pre-commit:
uses: coatl-dev/workflows/.github/workflows/pre-commit.yml@v2
uses: coatl-dev/workflows/.github/workflows/pre-commit.yml@v3
with:
skip-hooks: 'pylint'

pylint:
needs: pre-commit
uses: coatl-dev/workflows/.github/workflows/pylint.yml@v2
uses: coatl-dev/workflows/.github/workflows/pylint.yml@v3

tox:
needs:
- pre-commit
- pylint
uses: coatl-dev/workflows/.github/workflows/tox-docker.yml@v2
uses: coatl-dev/workflows/.github/workflows/tox-docker.yml@v3

pypi-publish:
needs:
- pre-commit
- pylint
- tox
uses: coatl-dev/workflows/.github/workflows/pypi-upload.yml@v2
uses: coatl-dev/workflows/.github/workflows/pypi-upload.yml@v3
with:
python-version: '2.7'
secrets:
Expand Down
4 changes: 2 additions & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,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
Expand Down Expand Up @@ -428,7 +428,7 @@ disable=consider-using-f-string,
unnecessary-pass,
unused-argument,
useless-object-inheritance,
useless-super-delegation,
useless-parent-delegation,
wrong-import-order,

# Enable the message, report, category or checker with the given id(s). You can
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

__all__ = ["ScriptFunction", "ScriptManager"]

from copy import PyStringMap
from typing import Any, List, Mapping, Optional, Set

from com.codahale.metrics import Timer
Expand All @@ -11,7 +10,7 @@
from java.io import OutputStream
from java.lang import Class, Object
from java.util import UUID
from org.python.core import PyObject, PySystemState
from org.python.core import PyObject, PyStringMap, PySystemState


class ScriptFunction(object):
Expand Down
2 changes: 1 addition & 1 deletion src/org/python/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import print_function

from copy import PyStringMap
from copy import PyStringMap # pylint: disable=no-name-in-module

__all__ = [
"CodeFlag",
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ allowlist_externals =
base_python = python2.7

[py3]
base_python = python3.11
base_python = python3.12

[type]
base_python = {[py3]base_python}
Expand Down

0 comments on commit 824318f

Please sign in to comment.