From 57524edb874a2dbb30ad2adba3d092f39757c4c4 Mon Sep 17 00:00:00 2001 From: David McDonald <49174690+dgmcdona@users.noreply.github.com> Date: Thu, 3 Apr 2025 09:58:35 -0500 Subject: [PATCH] Remove unnecessary quotes from type hints Co-authored-by: ikelos --- volatility3/framework/symbols/windows/extensions/mft.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/volatility3/framework/symbols/windows/extensions/mft.py b/volatility3/framework/symbols/windows/extensions/mft.py index 86580be16..9dd7f1a6a 100644 --- a/volatility3/framework/symbols/windows/extensions/mft.py +++ b/volatility3/framework/symbols/windows/extensions/mft.py @@ -10,7 +10,7 @@ from volatility3.framework import objects, constants, exceptions class MFTEntry(objects.StructType): """This represents the base MFT Record""" - def get_signature(self) -> "objects.String": + def get_signature(self) -> objects.String: signature = self.Signature.cast("string", max_length=4, encoding="latin-1") return signature @@ -18,7 +18,7 @@ class MFTEntry(objects.StructType): class MFTFileName(objects.StructType): """This represents an MFT $FILE_NAME Attribute""" - def get_full_name(self) -> "objects.String": + def get_full_name(self) -> objects.String: output = self.Name.cast( "string", encoding="utf16", max_length=self.NameLength * 2, errors="replace" ) @@ -28,7 +28,7 @@ class MFTFileName(objects.StructType): class MFTAttribute(objects.StructType): """This represents an MFT ATTRIBUTE""" - def get_resident_filename(self) -> Optional["objects.String"]: + def get_resident_filename(self) -> Optional[objects.String]: # 4MB chosen as cutoff instead of 4KB to allow for recovery from format /L created file systems # Length as 512 as its 256*2, which is the maximum size for an entire file path, so this is even generous if ( @@ -51,7 +51,7 @@ class MFTAttribute(objects.StructType): except exceptions.InvalidAddressException: return None - def get_resident_filecontent(self) -> Optional["objects.Bytes"]: + def get_resident_filecontent(self) -> Optional[objects.Bytes]: # smear observed in mass testing of samples # 4MB chosen as cutoff instead of 4KB to allow for recovery from format /L created file systems if (