Skip to content

Commit

Permalink
Update python version to 3.9+ in github actions
Browse files Browse the repository at this point in the history
  And update pylint version to 2.9.6+ with lint fixes
  • Loading branch information
ligangty committed Jul 10, 2024
1 parent 49418f6 commit f29692f
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/linters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
python-version: [ "3.8" ]
python-version: [ "3.9", "3.10", "3.11", "3.12" ]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:

strategy:
matrix:
python-version: [ "3.8" ]
python-version: [ "3.9", "3.10", "3.11", "3.12" ]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unittests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
Expand Down
7 changes: 6 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ disable=I,
useless-import-alias, # nice to have
useless-super-delegation, # nice to have
wrong-import-order,
wrong-import-position
wrong-import-position,
use-implicit-booleaness-not-comparison-to-zero,
use-implicit-booleaness-not-comparison-to-string,
unspecified-encoding,
broad-exception-raised,
consider-using-f-string

[REPORTS]

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ future. And Ronda service will be hosted in AWS S3.

## Prerequisites

* python 3.5+
* python 3.9+
* git

### [Optional] Install AWS CLI tool
Expand Down
4 changes: 3 additions & 1 deletion charon/pkgs/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ def __init__(self, title: str, header: str, items: Set[str]):
self.items = items

def generate_index_file_content(self, package_type: str) -> str:
template = None
if package_type == PACKAGE_TYPE_MAVEN:
template = Template(MAVEN_INDEX_TEMPLATE)
elif package_type == PACKAGE_TYPE_NPM:
template = Template(NPM_INDEX_TEMPLATE)
return template.render(index=self)
if template:
return template.render(index=self)


def generate_indexes(
Expand Down
1 change: 1 addition & 0 deletions charon/pkgs/npm.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ def _scan_metadata_paths_from_archive(
path=path, target_dir=tmp_root, is_for_upload=True,
pkg_root=pkg_root, registry=registry
)
package = None
if len(valid_paths) > 1:
version = _scan_for_version(valid_paths[1])
package = NPMPackageMetadata(version, True)
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ deps = -r requirements-dev.txt
commands = python3 -m pytest --cov=charon {posargs:"tests"}

[testenv:pylint]
deps = pylint==2.9.6
deps = pylint>=2.9.6
commands = python3 -m pylint charon tests

[testenv:flake8]
Expand Down

0 comments on commit f29692f

Please sign in to comment.