Commit 80e9a88
committed
refactor: Further condense delegation methods across components
Update component call sites to use target components directly instead
of routing through DiffStix wrapper methods, reducing indirection.
Changes:
- Updated markdown_generator.py: Call _hierarchy_builder.get_groupings() directly
- Updated json_generator.py: Call _hierarchy_builder.get_groupings() directly
- Updated change_detector.py: Call _contributor_tracker.update_contributors() directly
- Removed internal-only wrapper methods from diff_stix.py:
- load_domain() - only called internally, now uses _data_loader directly
- parse_extra_data() - only called by data_loader component
- Kept public API wrapper methods for backward compatibility:
- get_groupings(), update_contributors(), get_parent_stix_object()
- placard(), get_contributor_section(), get_statistics_section()
- get_markdown_string(), get_layers_dict(), get_changes_dict()
- find_technique_mitigation_changes(), find_technique_detection_changes()
Impact:
- diff_stix.py: 556 → 532 lines (4.3% reduction, 24 lines removed)
- Total from original: 1,462 → 532 lines (63.6% reduction, 930 lines removed)
- Reduced coupling between components
- Clearer component boundaries and responsibilities
- Maintained backward compatibility for public API1 parent 893da42 commit 80e9a88
File tree
4 files changed
+3
-27
lines changed- mitreattack/diffStix
- core
- formatters
4 files changed
+3
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | 381 | | |
392 | 382 | | |
393 | 383 | | |
| |||
408 | 398 | | |
409 | 399 | | |
410 | 400 | | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | 401 | | |
426 | 402 | | |
427 | 403 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
0 commit comments