Skip to content

Commit fe968ff

Browse files
authored
Merge pull request #24 from siemens/tweaks
Tweak in CI and dependencies
2 parents d51b5ef + a72bcd1 commit fe968ff

File tree

5 files changed

+16
-10
lines changed

5 files changed

+16
-10
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ autoformat:
9393
verify:
9494
reuse lint
9595
ruff check .
96-
pylint .
96+
pylint . --ignore-paths="^venv"
9797
PYTHONPATH=./resources pyright
9898
# on Windows Powershell: `$env:PYTHONPATH = "./resources"; pyright`
9999

requirements-dev.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
# SPDX-License-Identifier: Apache-2.0
44

55
safety>= 3.3.1, < 4.0.0
6-
pylint>= 3.3.8, < 4.0.0
6+
pylint>= 4.0.2, < 5.0.0
77
black>= 25.0.0, < 26.0.0
88
ruff>= 0.12.12, < 1.0.0
9-
robotframework-robocop==6.6.1
10-
robotframework-tidy==4.17.0
11-
pyright==1.1.405
9+
robotframework-robocop==6.9.2
10+
robotframework-tidy==4.18.0
11+
pyright==1.1.407
1212
codespell==2.4.1
13-
reuse==5.0.2
13+
reuse==6.2.0

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

5-
cryptography==45.0.7
5+
cryptography==46.0.3
66
pyasn1==0.6.1
77
pyasn1-alt-modules==0.4.6
88
robotframework==7.3.2

resources/keyutils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,11 @@ def load_private_key_from_file( # noqa: D417 for RF docs
460460
pass
461461

462462
try:
463-
if b"SPDX-License-Identifier:" in pem_data:
463+
# The reuse tool will also look for its marker in the entire body of the
464+
# file, not just the header - so in the line below it would've been
465+
# triggered because `in pem_data:` is not a valid license name.
466+
# Hence we don't include the complete marker, but only its prefix.
467+
if b"SPDX-License" in pem_data:
464468
pem_data2 = _extract_and_format_key(filepath)
465469
else:
466470
pem_data2 = pem_data

scripts/write_stats.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from pq_logic.hybrid_key_factory import HybridKeyFactory
77
from pq_logic.pq_key_factory import PQKeyFactory
88
from resources.keyutils import generate_key
9+
from tabulate import tabulate
910

1011
df_pq = pd.DataFrame(columns=["name", "public_key_size", "private_key_size", "ct_length", "claimed_nist_level"])
1112
df_hybrid = pd.DataFrame(columns=["name", "public_key_size", "private_key_size", "ct_length"])
@@ -31,7 +32,8 @@
3132

3233
for method in options:
3334
key = generate_key(algorithm=alg_name, **method)
34-
entry = {"name": key.name, "public_key_size": key.public_key().key_size, "private_key_size": key.key_size, "ct_length": key.ct_length}
35+
entry = {"name": key.name, "public_key_size": key.public_key().key_size,
36+
"private_key_size": key.key_size, "ct_length": key.ct_length}
3537
data[alg_name].append(entry)
3638

3739
df_pq = pd.DataFrame(pq_data).sort_values(by="claimed_nist_level")
@@ -49,7 +51,7 @@
4951
with open(f"./data/stats/hybrid_table_{alg_name}.tex", "w") as f:
5052
f.write(latex_hybrid)
5153

52-
from tabulate import tabulate
54+
5355

5456
pq_str = tabulate(pq_data, headers="keys", tablefmt="grid")
5557
with open("./data/stats/pq_table.txt", "w") as f:

0 commit comments

Comments
 (0)