Skip to content

Commit 64e40e2

Browse files
authored
upgrade deps, remove unused, format (#54)
1 parent 366abc7 commit 64e40e2

12 files changed

Lines changed: 40 additions & 45 deletions

requirements.build.txt

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,10 @@
11
-r requirements.txt
2-
build==0.6.0.post1
3-
packaging==23.1
4-
pep517==0.13.0
5-
pyinstaller==6.3.0
6-
black==23.7.0
7-
certifi==2023.7.22
8-
charset-normalizer==3.2.0
9-
idna==3.4
10-
isort==5.12.0
11-
lazy-object-proxy==1.9.0
12-
mccabe==0.7.0
13-
mypy==1.7.1
2+
build==1.2.1
3+
pyinstaller==6.10.0
4+
black==24.8.0
5+
mypy==1.11.2
146
mypy-extensions==1.0.0
15-
pylint==3.0.3
16-
pyparsing==3.1.1
17-
six==1.16.0
18-
toml==0.10.2
19-
tomli==2.0.1
20-
types-python-dateutil==2.8.19.14
21-
types-requests==2.31.0.2
22-
typing-extensions==4.7.1
23-
urllib3==2.0.4
24-
websocket-client==1.6.1
25-
wrapt==1.15.0
7+
pylint==3.2.7
8+
types-python-dateutil==2.9.0.20240906
9+
types-requests==2.32.0.20240905
10+
typing-extensions==4.12.2

requirements.txt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
docker==7.0.0
2-
python-dateutil==2.8.2
3-
pyelftools==0.30
4-
5-
# Pinned due to https://github.com/docker/docker-py/issues/3256
6-
requests==2.31.0
1+
docker==7.1.0
2+
python-dateutil==2.9.0.post0
3+
pyelftools==0.31

tests/test_strip.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,14 @@ def test_strip(self) -> None:
5555
dist_dir = path.join(tmp_dir, "dist")
5656
shutil.copytree(src_dir, rec_dir)
5757
replacements = {"flags=()": "flags=(nostrip)"}
58-
with open(
59-
path.join(src_dir, "package"), "rt", encoding="utf-8"
60-
) as infile, open(
61-
path.join(rec_dir, "package"), "wt", encoding="utf-8"
62-
) as outfile:
58+
with (
59+
open(
60+
path.join(src_dir, "package"), "rt", encoding="utf-8"
61+
) as infile,
62+
open(
63+
path.join(rec_dir, "package"), "wt", encoding="utf-8"
64+
) as outfile,
65+
):
6366
for line in infile:
6467
for src, target in replacements.items():
6568
line = line.replace(src, target)

toltec/bash.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ def _parse_func(lexer: shlex.shlex) -> Tuple[int, int]:
344344
assert lexer.get_token() == "{"
345345
brace_depth = 1
346346

347-
start_byte = lexer.instream.tell()
347+
start_byte = lexer.instream.tell() # type: ignore
348348

349349
while brace_depth > 0:
350350
token = lexer.get_token()
@@ -355,7 +355,7 @@ def _parse_func(lexer: shlex.shlex) -> Tuple[int, int]:
355355
elif token == "}":
356356
brace_depth -= 1
357357

358-
end_byte = lexer.instream.tell() - 1
358+
end_byte = lexer.instream.tell() - 1 # type: ignore
359359
return start_byte, end_byte
360360

361361

toltec/hooks/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Built in hooks
33
"""
4+
45
__all__ = [
56
"patch_rm2fb",
67
"strip",

toltec/hooks/install_lib.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
After the artifacts are packaged, this hook will look for known install-lib
55
methods and add them to scripts if found.
66
"""
7+
78
import logging
89

910
from typing import Set, Iterable

toltec/hooks/patch_rm2fb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
binaries. This behavior is only enabled if the recipe declares the
99
'patch_rm2fb' flag.
1010
"""
11+
1112
import os
1213
import logging
1314
import shlex

toltec/hooks/reload_oxide_apps.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
/opt/etc/draft or /opt/usr/share/applications and adds reload-oxide-apps to
66
configure, postupgrade, and postremove
77
"""
8+
89
import os
910
import logging
1011

toltec/hooks/strip.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
hook looks for ELF-files in the build directory and strips them. This
66
behavior is disabled if the recipe declares the 'nostrip' flag.
77
"""
8+
89
import os
910
import logging
1011
import shlex

toltec/ipk.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,11 @@ def write(
143143
:param pkg_dir: directory containing the package tree to include in the
144144
data sub-archive, leave empty to generate an empty data archive
145145
"""
146-
with BytesIO() as control, BytesIO() as data, _targz_open(
147-
file, epoch
148-
) as archive:
146+
with (
147+
BytesIO() as control,
148+
BytesIO() as data,
149+
_targz_open(file, epoch) as archive,
150+
):
149151
root_info = tarfile.TarInfo("./")
150152
root_info.type = tarfile.DIRTYPE
151153
archive.addfile(_clean_info(None, epoch, root_info))

0 commit comments

Comments
 (0)