Skip to content

Commit f29692f

Browse files
committed
Update python version to 3.9+ in github actions
And update pylint version to 2.9.6+ with lint fixes
1 parent 49418f6 commit f29692f

File tree

7 files changed

+15
-7
lines changed

7 files changed

+15
-7
lines changed

.github/workflows/linters.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
python-version: [ "3.8" ]
18+
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
1919

2020
steps:
2121
- uses: actions/checkout@v3
@@ -46,7 +46,7 @@ jobs:
4646

4747
strategy:
4848
matrix:
49-
python-version: [ "3.8" ]
49+
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
5050

5151
steps:
5252
- uses: actions/checkout@v3

.github/workflows/unittests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
python-version: ["3.8", "3.9"]
19+
python-version: ["3.9", "3.10", "3.11", "3.12"]
2020

2121
steps:
2222
- uses: actions/checkout@v3

.pylintrc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ disable=I,
6464
useless-import-alias, # nice to have
6565
useless-super-delegation, # nice to have
6666
wrong-import-order,
67-
wrong-import-position
67+
wrong-import-position,
68+
use-implicit-booleaness-not-comparison-to-zero,
69+
use-implicit-booleaness-not-comparison-to-string,
70+
unspecified-encoding,
71+
broad-exception-raised,
72+
consider-using-f-string
6873

6974
[REPORTS]
7075

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ future. And Ronda service will be hosted in AWS S3.
77

88
## Prerequisites
99

10-
* python 3.5+
10+
* python 3.9+
1111
* git
1212

1313
### [Optional] Install AWS CLI tool

charon/pkgs/indexing.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,13 @@ def __init__(self, title: str, header: str, items: Set[str]):
5555
self.items = items
5656

5757
def generate_index_file_content(self, package_type: str) -> str:
58+
template = None
5859
if package_type == PACKAGE_TYPE_MAVEN:
5960
template = Template(MAVEN_INDEX_TEMPLATE)
6061
elif package_type == PACKAGE_TYPE_NPM:
6162
template = Template(NPM_INDEX_TEMPLATE)
62-
return template.render(index=self)
63+
if template:
64+
return template.render(index=self)
6365

6466

6567
def generate_indexes(

charon/pkgs/npm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@ def _scan_metadata_paths_from_archive(
485485
path=path, target_dir=tmp_root, is_for_upload=True,
486486
pkg_root=pkg_root, registry=registry
487487
)
488+
package = None
488489
if len(valid_paths) > 1:
489490
version = _scan_for_version(valid_paths[1])
490491
package = NPMPackageMetadata(version, True)

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ deps = -r requirements-dev.txt
1111
commands = python3 -m pytest --cov=charon {posargs:"tests"}
1212

1313
[testenv:pylint]
14-
deps = pylint==2.9.6
14+
deps = pylint>=2.9.6
1515
commands = python3 -m pylint charon tests
1616

1717
[testenv:flake8]

0 commit comments

Comments
 (0)