Skip to content

Commit 91b3e56

Browse files
committed
Lint
1 parent e8f8b86 commit 91b3e56

20 files changed

Lines changed: 53 additions & 34 deletions

‎esp_parser/__init__.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050
def parse_esp(raw_bytes: BytesIO) -> Iterator[Union[RecordType, "Group"]]:
5151
"""
5252
Recursively parse an ESP file.
53+
54+
:param raw_bytes:
5355
"""
5456

5557
# this package

‎esp_parser/__main__.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@ def dump_to_modules(esp_file: "PathPlus", output_file: Union["PathPlus", str, No
102102
init_file_source.append(f"from .{submodule} import create_{submodule.lower()}")
103103

104104
init_file_source.append(f"def {plugin_name}():")
105-
init_file_source.append("\treturn [", )
105+
init_file_source.append("\treturn [")
106106

107107
for submodule in submodules:
108-
init_file_source.append(f"\t\t*create_{submodule.lower()}(),", )
108+
init_file_source.append(f"\t\t*create_{submodule.lower()}(),")
109109

110-
init_file_source.append("\t]", )
110+
init_file_source.append("\t]")
111111

112112
(output_dir / "__init__.py").write_text(reformat(str(init_file_source), (output_dir / "__init__.py")))
113113

‎esp_parser/records/_achr.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def parse_subrecords(cls, raw_bytes: BytesIO) -> Iterator[RecordType]:
250250
b"XRDS",
251251
b"XRGB",
252252
b"XRGD",
253-
b"XSCL"
253+
b"XSCL",
254254
}:
255255
yield getattr(cls, record_type.decode()).parse(raw_bytes)
256256
elif record_type in {b"SCHR", b"SCDA", b"SCTX", b"SCRO", b"SLSD", b"SCVR"}:

‎esp_parser/records/_ammo.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def parse_subrecords(cls, raw_bytes: BytesIO) -> Iterator[RecordType]:
203203
b"RCIL",
204204
b"SCRI",
205205
b"YNAM",
206-
b"ZNAM"
206+
b"ZNAM",
207207
}:
208208
yield getattr(cls, record_type.decode()).parse(raw_bytes)
209209
elif record_type in Model.members:

‎esp_parser/records/_armo.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def parse_subrecords(cls, raw_bytes: BytesIO) -> Iterator[RecordType]:
261261
b"SNAM",
262262
b"TNAM",
263263
b"YNAM",
264-
b"ZNAM"
264+
b"ZNAM",
265265
}:
266266
yield getattr(cls, record_type.decode()).parse(raw_bytes)
267267
elif record_type in subrecords.Model.members:

‎esp_parser/records/_navm.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ class NvvxVertex(NamedTuple):
101101
def unpack(cls: Type[Self], raw_bytes: BytesIO) -> Self:
102102
"""
103103
Unpack bytes for the :class:`~.NAVM.NvvxVertex`.
104+
105+
:param raw_bytes:
104106
"""
105107

106108
return cls(*struct.unpack("<fff", raw_bytes.read(12)))
@@ -168,6 +170,8 @@ class NvtrTriangle(NamedTuple):
168170
def unpack(cls: Type[Self], raw_bytes: BytesIO) -> Self:
169171
"""
170172
Unpack bytes for the :class:`~.NAVM.NvtrTriangle`.
173+
174+
:param raw_bytes:
171175
"""
172176

173177
return cls(*struct.unpack("<hhhhhhI", raw_bytes.read(16)))
@@ -265,6 +269,8 @@ class NvdpDoor(NamedTuple):
265269
def unpack(cls: Type[Self], raw_bytes: BytesIO) -> Self:
266270
"""
267271
Unpack bytes for the :class:`~.NAVM.NvtrTriangle`.
272+
273+
:param raw_bytes:
268274
"""
269275

270276
return cls(*struct.unpack("<4sH2s", raw_bytes.read(8)))

‎esp_parser/records/_pgre.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def parse_subrecords(cls, raw_bytes: BytesIO) -> Iterator[RecordType]:
272272
b"XRGB",
273273
b"XRGD",
274274
b"XRNK",
275-
b"XSCL"
275+
b"XSCL",
276276
}:
277277
yield getattr(cls, record_type.decode()).parse(raw_bytes)
278278
else:

‎esp_parser/records/_race.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def parse_subrecords(cls, raw_bytes: BytesIO) -> Iterator[RecordType]:
241241
b"UNAM",
242242
b"VTCK",
243243
b"XNAM",
244-
b"YNAM"
244+
b"YNAM",
245245
}:
246246
yield getattr(cls, record_type.decode()).parse(raw_bytes)
247247
else:

‎esp_parser/records/_scol.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ class DataItem(NamedTuple):
6969
def unpack(cls: Type[Self], raw_bytes: BytesIO) -> Self:
7070
"""
7171
Unpack bytes for the :class:`~.SCOL.DataItem`.
72+
73+
:param raw_bytes:
7274
"""
7375

7476
return cls(*struct.unpack("<fffffff", raw_bytes.read(28)))

‎esp_parser/records/_watr.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def parse_subrecords(cls, raw_bytes: BytesIO) -> Iterator[RecordType]:
125125
b"MNAM",
126126
b"NNAM",
127127
b"SNAM",
128-
b"XNAM"
128+
b"XNAM",
129129
}:
130130
yield getattr(cls, record_type.decode()).parse(raw_bytes)
131131
else:

0 commit comments

Comments
 (0)