Skip to content

Commit 992ba3e

Browse files
authored
Merge pull request #1424 from j-t-1/readability
Use generator expressions
2 parents 16de3fa + ae1079f commit 992ba3e

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

volatility3/cli/volshell/generic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def _display_data(
203203
connector = " "
204204
if chunk_size < 2:
205205
connector = ""
206-
ascii_data = connector.join([self._ascii_bytes(x) for x in valid_data])
206+
ascii_data = connector.join(self._ascii_bytes(x) for x in valid_data)
207207

208208
print(hex(offset), " ", hex_data, " ", ascii_data)
209209
offset += 16

volatility3/framework/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ def require_interface_version(*args) -> None:
4747
if args[1] > interface_version()[1]:
4848
raise RuntimeError(
4949
"Framework interface version {} is an older revision than the required version {}".format(
50-
".".join([str(x) for x in interface_version()[0:2]]),
51-
".".join([str(x) for x in args[0:2]]),
50+
".".join(str(x) for x in interface_version()[0:2]),
51+
".".join(str(x) for x in args[0:2]),
5252
)
5353
)
5454

volatility3/framework/configuration/requirements.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ def __init__(
532532
if version is None:
533533
raise TypeError("Version cannot be None")
534534
if description is None:
535-
description = f"Version {'.'.join([str(x) for x in version])} dependency on {component.__module__}.{component.__name__} unmet"
535+
description = f"Version {'.'.join(str(x) for x in version)} dependency on {component.__module__}.{component.__name__} unmet"
536536
super().__init__(
537537
name=name, description=description, default=default, optional=optional
538538
)

volatility3/framework/constants/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
VERSION_SUFFIX = ""
66

77
PACKAGE_VERSION = (
8-
".".join([str(x) for x in [VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH]])
8+
".".join(str(x) for x in [VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH])
99
+ VERSION_SUFFIX
1010
)
1111
"""The canonical version of the volatility3 package"""

volatility3/framework/plugins/linux/check_creds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def _generator(self):
5555

5656
for cred_addr, pids in creds.items():
5757
if len(pids) > 1:
58-
pid_str = ", ".join([str(pid) for pid in pids])
58+
pid_str = ", ".join(str(pid) for pid in pids)
5959

6060
fields = [
6161
format_hints.Hex(cred_addr),

volatility3/framework/plugins/windows/getservicesids.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def createservicesid(svc) -> str:
2626
## The use of struct here is OK. It doesn't make much sense
2727
## to leverage obj.Object inside this loop.
2828
dec.append(struct.unpack("<I", sha[i * 4 : i * 4 + 4])[0])
29-
return "S-1-5-80-" + "-".join([str(n) for n in dec])
29+
return "S-1-5-80-" + "-".join(str(n) for n in dec)
3030

3131

3232
class GetServiceSIDs(interfaces.plugins.PluginInterface):

0 commit comments

Comments
 (0)