dissect.ntfs 3.16.dev1__tar.gz → 3.17.dev2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/.git-blame-ignore-revs +2 -0
  2. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/PKG-INFO +1 -1
  3. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/dissect/ntfs/__init__.py +2 -0
  4. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/dissect/ntfs/exceptions.py +3 -0
  5. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/dissect/ntfs/index.py +0 -1
  6. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/dissect/ntfs/mft.py +4 -2
  7. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/dissect/ntfs/util.py +3 -1
  8. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/dissect.ntfs.egg-info/PKG-INFO +1 -1
  9. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/pyproject.toml +20 -2
  10. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/tests/_docs/conf.py +2 -0
  11. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/tests/test_mft.py +0 -2
  12. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/.gitattributes +0 -0
  13. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/COPYRIGHT +0 -0
  14. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/LICENSE +0 -0
  15. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/MANIFEST.in +0 -0
  16. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/README.md +0 -0
  17. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/dissect/ntfs/attr.py +0 -0
  18. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/dissect/ntfs/c_ntfs.py +0 -0
  19. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/dissect/ntfs/c_ntfs.pyi +0 -0
  20. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/dissect/ntfs/ntfs.py +0 -0
  21. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/dissect/ntfs/secure.py +0 -0
  22. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/dissect/ntfs/stream.py +0 -0
  23. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/dissect/ntfs/usnjrnl.py +0 -0
  24. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/dissect.ntfs.egg-info/SOURCES.txt +0 -0
  25. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/dissect.ntfs.egg-info/dependency_links.txt +0 -0
  26. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/dissect.ntfs.egg-info/requires.txt +0 -0
  27. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/dissect.ntfs.egg-info/top_level.txt +0 -0
  28. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/setup.cfg +0 -0
  29. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/tests/__init__.py +0 -0
  30. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/tests/_data/boot_2m.bin.gz +0 -0
  31. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/tests/_data/mft.bin.gz +0 -0
  32. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/tests/_data/ntfs-cloud.bin.gz +0 -0
  33. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/tests/_data/ntfs.bin.gz +0 -0
  34. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/tests/_data/ntfs_fragmented_mft.csv.gz +0 -0
  35. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/tests/_data/sds.bin.gz +0 -0
  36. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/tests/_data/sds_complex.bin.gz +0 -0
  37. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/tests/_docs/Makefile +0 -0
  38. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/tests/_docs/__init__.py +0 -0
  39. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/tests/_docs/index.rst +0 -0
  40. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/tests/conftest.py +0 -0
  41. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/tests/test_attr.py +0 -0
  42. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/tests/test_exceptions.py +0 -0
  43. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/tests/test_index.py +0 -0
  44. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/tests/test_ntfs.py +0 -0
  45. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/tests/test_secure.py +0 -0
  46. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/tests/test_usnjrnl.py +0 -0
  47. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/tests/test_util.py +0 -0
  48. {dissect_ntfs-3.16.dev1 → dissect_ntfs-3.17.dev2}/tox.ini +0 -0
@@ -4,3 +4,5 @@
4
4
  #
5
5
  # Change linter to Ruff (#39)
6
6
  faaa48210bbfd5a0d6c731c963ce4be9ae8bf630
7
+ # Add stricter Ruff linting (#53)
8
+ 19d9d690e892966b4e49675c7424328b902f5564
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dissect.ntfs
3
- Version: 3.16.dev1
3
+ Version: 3.17.dev2
4
4
  Summary: A Dissect module implementing a parser for the NTFS file system, used by the Windows operating system
5
5
  Author-email: Dissect Team <dissect@fox-it.com>
6
6
  License-Expression: AGPL-3.0-or-later
@@ -1,3 +1,5 @@
1
+ from __future__ import annotations
2
+
1
3
  from dissect.ntfs.attr import Attribute, AttributeHeader, AttributeRecord
2
4
  from dissect.ntfs.c_ntfs import ATTRIBUTE_TYPE_CODE, NTFS_SIGNATURE
3
5
  from dissect.ntfs.index import Index, IndexEntry
@@ -1,3 +1,6 @@
1
+ from __future__ import annotations
2
+
3
+
1
4
  class Error(Exception):
2
5
  pass
3
6
 
@@ -118,7 +118,6 @@ class Index:
118
118
 
119
119
  def entries(self) -> Iterator[IndexEntry]:
120
120
  """Yield all :class:`IndexEntry`'s in this :class:`Index`."""
121
-
122
121
  for entry in self.root.entries():
123
122
  if entry.is_end:
124
123
  break
@@ -25,13 +25,15 @@ from dissect.ntfs.exceptions import (
25
25
  NotADirectoryError,
26
26
  NotAReparsePointError,
27
27
  )
28
- from dissect.ntfs.index import Index, IndexEntry
29
- from dissect.ntfs.util import AttributeCollection, AttributeMap, apply_fixup, segment_reference
28
+ from dissect.ntfs.index import Index
29
+ from dissect.ntfs.util import AttributeMap, apply_fixup, segment_reference
30
30
 
31
31
  if TYPE_CHECKING:
32
32
  from collections.abc import Iterator
33
33
 
34
+ from dissect.ntfs.index import IndexEntry
34
35
  from dissect.ntfs.ntfs import NTFS
36
+ from dissect.ntfs.util import AttributeCollection
35
37
 
36
38
 
37
39
  class Mft:
@@ -13,13 +13,15 @@ from dissect.ntfs.c_ntfs import (
13
13
  FILE_NUMBER_ROOT,
14
14
  SECTOR_SHIFT,
15
15
  SECTOR_SIZE,
16
- c_ntfs,
17
16
  )
18
17
  from dissect.ntfs.exceptions import FilenameNotAvailableError, VolumeNotAvailableError
19
18
  from dissect.ntfs.stream import CompressedRunlistStream
20
19
 
21
20
  if TYPE_CHECKING:
22
21
  from dissect.ntfs.attr import Attribute
22
+ from dissect.ntfs.c_ntfs import (
23
+ c_ntfs,
24
+ )
23
25
  from dissect.ntfs.mft import Mft
24
26
  from dissect.ntfs.ntfs import NTFS
25
27
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dissect.ntfs
3
- Version: 3.16.dev1
3
+ Version: 3.17.dev2
4
4
  Summary: A Dissect module implementing a parser for the NTFS file system, used by the Windows operating system
5
5
  Author-email: Dissect Team <dissect@fox-it.com>
6
6
  License-Expression: AGPL-3.0-or-later
@@ -94,7 +94,7 @@ select = [
94
94
  "SLOT",
95
95
  "SIM",
96
96
  "TID",
97
- "TCH",
97
+ "TC",
98
98
  "PTH",
99
99
  "PLC",
100
100
  "TRY",
@@ -102,8 +102,25 @@ select = [
102
102
  "PERF",
103
103
  "FURB",
104
104
  "RUF",
105
+ "D"
105
106
  ]
106
- ignore = ["E203", "B904", "UP024", "ANN002", "ANN003", "ANN204", "ANN401", "SIM105", "TRY003"]
107
+ ignore = [
108
+ "E203", "B904", "UP024", "ANN002", "ANN003", "ANN204", "ANN401", "SIM105", "TRY003", "PLC0415",
109
+ # Ignore some pydocstyle rules for now as they require a larger cleanup
110
+ "D1",
111
+ "D205",
112
+ "D301",
113
+ "D417",
114
+ # Seems bugged: https://github.com/astral-sh/ruff/issues/16824
115
+ "D402",
116
+ ]
117
+ future-annotations = true
118
+
119
+ [tool.ruff.lint.pydocstyle]
120
+ convention = "google"
121
+
122
+ [tool.ruff.lint.flake8-type-checking]
123
+ strict = true
107
124
 
108
125
  [tool.ruff.lint.per-file-ignores]
109
126
  "tests/_docs/**" = ["INP001"]
@@ -112,6 +129,7 @@ ignore = ["E203", "B904", "UP024", "ANN002", "ANN003", "ANN204", "ANN401", "SIM1
112
129
  [tool.ruff.lint.isort]
113
130
  known-first-party = ["dissect.ntfs"]
114
131
  known-third-party = ["dissect"]
132
+ required-imports = ["from __future__ import annotations"]
115
133
 
116
134
  [tool.setuptools.packages.find]
117
135
  include = ["dissect.*"]
@@ -1,3 +1,5 @@
1
+ from __future__ import annotations
2
+
1
3
  project = "dissect.ntfs"
2
4
 
3
5
  extensions = [
@@ -100,7 +100,6 @@ def test_mft_records_segment_number(mft_bin: BinaryIO) -> None:
100
100
 
101
101
  def test_mft_record_reparse_cloud(mft_bin: BinaryIO) -> None:
102
102
  """Test if the ``MftRecord.is_cloud_file()`` method works correctly."""
103
-
104
103
  fs = NTFS(mft=mft_bin)
105
104
 
106
105
  data = bytes.fromhex(
@@ -136,7 +135,6 @@ def test_mft_record_reparse_cloud(mft_bin: BinaryIO) -> None:
136
135
 
137
136
  def test_mft_record_reparse_cloud_full(ntfs_cloud_bin: BinaryIO) -> None:
138
137
  """Test if offline saved OneDrive MftRecords can be found and read succesfully."""
139
-
140
138
  fs = NTFS(ntfs_cloud_bin)
141
139
 
142
140
  record = fs.mft.get("OneDrive/example.txt")