mapfile-parser 2.9.1__cp39-cp39-musllinux_1_2_aarch64.whl → 2.9.3__cp39-cp39-musllinux_1_2_aarch64.whl

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.
@@ -5,7 +5,7 @@
5
5
 
6
6
  from __future__ import annotations
7
7
 
8
- __version_info__ = (2, 9, 1)
8
+ __version_info__ = (2, 9, 3)
9
9
  __version__ = ".".join(map(str, __version_info__)) # + "-dev0"
10
10
  __author__ = "Decompollaborate"
11
11
 
@@ -16,6 +16,12 @@ from .. import utils
16
16
  from ..internals import objdiff_report as report_internal
17
17
 
18
18
 
19
+ @dataclasses.dataclass
20
+ class SummaryTableConfig:
21
+ doUnits: bool = False
22
+ sort: bool = True
23
+ remaining: bool = False
24
+
19
25
  def doObjdiffReport(
20
26
  mapPath: Path,
21
27
  outputPath: Path,
@@ -27,6 +33,7 @@ def doObjdiffReport(
27
33
  nonmatchingsPath: Path|None=None,
28
34
  emitCategories: bool=False,
29
35
  quiet: bool=False,
36
+ summaryTableConfig: SummaryTableConfig|None=SummaryTableConfig(),
30
37
  ) -> int:
31
38
  if not mapPath.exists():
32
39
  print(f"Could not find mapfile at '{mapPath}'")
@@ -47,12 +54,16 @@ def doObjdiffReport(
47
54
  nonmatchingsPath=nonmatchingsPath,
48
55
  )
49
56
 
50
- if not quiet:
57
+ if not quiet and summaryTableConfig is not None and not emitCategories:
51
58
  report = report_internal.Report.readFile(outputPath)
52
59
  if report is None:
53
60
  utils.eprint(f"Unable to read back the generated report at {outputPath}")
54
61
  return 1
55
- table = report.asTableStr(sort=True)
62
+ table = report.asTableStr(
63
+ do_units=summaryTableConfig.doUnits,
64
+ sort=summaryTableConfig.sort,
65
+ remaining=summaryTableConfig.remaining,
66
+ )
56
67
  print(table, end="")
57
68
 
58
69
  # Output to GitHub Actions job summary, if available
@@ -241,18 +252,26 @@ tools:
241
252
  prefixes_to_trim:
242
253
  """, end="")
243
254
  for trim in prefixesToTrim:
244
- print(f" - \"{trim}\"")
255
+ print(f" - {trim}")
245
256
 
246
257
  def printCategories(categories: list[Category]):
247
258
  for cat in categories:
259
+ ide = cat.ide
260
+ name = cat.name
261
+ if ide[0] in "0123456789":
262
+ ide = f'"{ide}"'
263
+ if name[0] in "0123456789":
264
+ name = f'"{name}"'
248
265
  print(f"""\
249
- - id: "{cat.ide}"
250
- name: "{cat.name}"
266
+ - id: {ide}
267
+ name: {name}
251
268
  paths:
252
269
  """, end="")
253
270
  for p in cat.paths:
271
+ if p[0] in "0123456789":
272
+ p = f'"{p}"'
254
273
  print(f"""\
255
- - "{p}"
274
+ - {p}
256
275
  """, end="")
257
276
 
258
277
  print(" categories:")
@@ -323,7 +342,10 @@ def processArguments(args: argparse.Namespace, decompConfig: decomp_settings.Con
323
342
  nonmatchingsPath = args.nonmatchingspath
324
343
 
325
344
  emitCategories: bool = args.emit_categories
326
- quiet: bool= args.quiet
345
+ if not args.quiet:
346
+ summaryTableConfig = SummaryTableConfig()
347
+ else:
348
+ summaryTableConfig = None
327
349
 
328
350
  exit(doObjdiffReport(
329
351
  mapPath,
@@ -334,7 +356,7 @@ def processArguments(args: argparse.Namespace, decompConfig: decomp_settings.Con
334
356
  pathIndex=pathIndex,
335
357
  nonmatchingsPath=nonmatchingsPath,
336
358
  emitCategories=emitCategories,
337
- quiet=quiet
359
+ summaryTableConfig=summaryTableConfig,
338
360
  ))
339
361
 
340
362
  def addSubparser(subparser: argparse._SubParsersAction[argparse.ArgumentParser], decompConfig: decomp_settings.Config|None=None):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mapfile_parser
3
- Version: 2.9.1
3
+ Version: 2.9.3
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -55,7 +55,7 @@ If you use a `requirements.txt` file in your repository, then you can add
55
55
  this library with the following line:
56
56
 
57
57
  ```txt
58
- mapfile_parser>=2.9.1,<3.0.0
58
+ mapfile_parser>=2.9.3,<3.0.0
59
59
  ```
60
60
 
61
61
  #### Development version
@@ -94,7 +94,7 @@ cargo add mapfile_parser
94
94
  Or add the following line manually to your `Cargo.toml` file:
95
95
 
96
96
  ```toml
97
- mapfile_parser = "2.9.1"
97
+ mapfile_parser = "2.9.3"
98
98
  ```
99
99
 
100
100
  ## Versioning and changelog
@@ -1,14 +1,14 @@
1
- mapfile_parser-2.9.1.dist-info/METADATA,sha256=Lq8fzzA5TnRE2lnoilHWWY4ViJhf-Z-0s8J14knLJ3E,5810
2
- mapfile_parser-2.9.1.dist-info/WHEEL,sha256=q7wQuuLF3Wf37kPvdOw6GyhvyvSy97yv-4o7K0-XKZc,106
3
- mapfile_parser-2.9.1.dist-info/licenses/LICENSE,sha256=FT7oxTcFUtz2c5eYIYePfzj2UD3hvxtLTa3FWz_nJuM,1073
1
+ mapfile_parser-2.9.3.dist-info/METADATA,sha256=b9kqC03afAEThFIFSzNQQCJnIY5ocHAtFXd4w66zKBA,5810
2
+ mapfile_parser-2.9.3.dist-info/WHEEL,sha256=q7wQuuLF3Wf37kPvdOw6GyhvyvSy97yv-4o7K0-XKZc,106
3
+ mapfile_parser-2.9.3.dist-info/licenses/LICENSE,sha256=FT7oxTcFUtz2c5eYIYePfzj2UD3hvxtLTa3FWz_nJuM,1073
4
4
  mapfile_parser.libs/libgcc_s-e52197c3.so.1,sha256=vkPW1Auw6CH9Bjk7frmX3hry_1H9c0tRI0Ncyg71WUI,724137
5
- mapfile_parser/__init__.py,sha256=SZZ1j-ivjhezJBzyuRW-3ZATQZuaFOwNaasXMkZu1SY,855
5
+ mapfile_parser/__init__.py,sha256=cNi20NfghMMTY4ovVC7UI6V5amy16jrRkj_4yTSLh1c,855
6
6
  mapfile_parser/__main__.py,sha256=vErQTK2miHF7NseqLgI567tbFUjOrQ7UNxXOr_FwBhc,2176
7
7
  mapfile_parser/frontends/__init__.py,sha256=RIUBbM6crp4V4EeMQy0whTonYauh0Oi2oaxu1NfWNao,512
8
8
  mapfile_parser/frontends/bss_check.py,sha256=O50pVG8uCp7poEqtrCbh05eIC_TYq3OIaD5VCZz4xGQ,8328
9
9
  mapfile_parser/frontends/first_diff.py,sha256=P5CqdGM_X7-WCcW7ubktKI6fnhHxezc1R0aL4_v3bOA,8899
10
10
  mapfile_parser/frontends/jsonify.py,sha256=Xq4fha2wJ70WH0an4BXaLnwgjYhNgAwTvrZZZoicRNQ,2654
11
- mapfile_parser/frontends/objdiff_report.py,sha256=ltOhrZ3c-S-6mZjHpEvU_0-TSDZ7uXNgUBwbquT5bgQ,18128
11
+ mapfile_parser/frontends/objdiff_report.py,sha256=d3I9PgjFIbWIoz_ZDAz58CMOMDrHNEiXwLOAVIlTzUo,18902
12
12
  mapfile_parser/frontends/pj64_syms.py,sha256=mJwiVGKGBoNrI-6VB4UJSVz7mIlihivX3KvUGRtoyMY,2332
13
13
  mapfile_parser/frontends/progress.py,sha256=j-6OtUCx8af8f3mcy1njA8AEEkR3mYf9_caCh-gFWDY,4563
14
14
  mapfile_parser/frontends/sym_info.py,sha256=CGpMdOHUpZslvTe8RpGJ-xrYhEjkhuzYKSJS4FZ60WI,3536
@@ -17,10 +17,10 @@ mapfile_parser/frontends/upload_frogress.py,sha256=ei3pSz2rzVpDj-0CASnPuyqqhu5Lm
17
17
  mapfile_parser/internals/__init__.py,sha256=WW--q8KRIfYTQLOMvRO7PCMSf7uWk-I1T20KU0C2a_0,327
18
18
  mapfile_parser/internals/objdiff_report.py,sha256=sZh7rUHdoWJfZKQ3EIeuNH9LqdEis2t7heCo1OOwKJU,6214
19
19
  mapfile_parser/mapfile.py,sha256=498NSrZtorSe-W0BzxnMtq-d0xOBBcaj8fB9iRK4Tmg,38834
20
- mapfile_parser/mapfile_parser.cpython-39-aarch64-linux-gnu.so,sha256=JEwDeL6TQtdZ0nGHy9ZDBLPeoDse7IKsBUX1BT48-i4,3738793
20
+ mapfile_parser/mapfile_parser.cpython-39-aarch64-linux-gnu.so,sha256=CiXeph0XVJMGxR5Yrmx2D0LM54AZpEIdA-ogpZfzj2I,3738793
21
21
  mapfile_parser/mapfile_parser.pyi,sha256=AuaCWiMySw-oBr-AR2NSbYbhpVP8TGS16rMeey6wc28,11227
22
22
  mapfile_parser/mapfile_rs.py,sha256=0sVtLGvz5SMH5bKeTYu-3sM0f-_xXFRfDyY2g1GDh54,4078
23
23
  mapfile_parser/progress_stats.py,sha256=T9V52QIoNBtvsPAbYRlCOAio95Z8VxzZep8bCc1J-H0,2535
24
24
  mapfile_parser/progress_stats_rs.py,sha256=Rc9-PuZoKWVTO9TEIRk3Mpw0v6FdCFaJk2h7jUGyT_0,483
25
25
  mapfile_parser/utils.py,sha256=Bz6pcuR9lax72Y7avgbOIBlyN-1GcxfDxz5iBodr3n0,1517
26
- mapfile_parser-2.9.1.dist-info/RECORD,,
26
+ mapfile_parser-2.9.3.dist-info/RECORD,,