|
49 | 49 | from codex32.gf32 import _inverse as _gf32_inverse |
50 | 50 | from codex32.gf32 import _multiply as _gf32_multiply |
51 | 51 | from codex32.profiles import Profile, _optional_profile_rules |
52 | | -from codex32.profiles.ms32 import MasterSeed, _has_generation_padding, _has_legacy_generation_padding |
| 52 | +from codex32.profiles.ms32 import MasterSeed, _has_generation_padding |
53 | 53 |
|
54 | 54 |
|
55 | 55 | @dataclass(frozen=True, slots=True) |
@@ -747,16 +747,10 @@ def _allowed(context: CorrectionContext, candidate: CorrectionCandidate) -> bool |
747 | 747 | ) |
748 | 748 |
|
749 | 749 |
|
750 | | -def _legacy_padding_match(candidate: CorrectionCandidate) -> bool | None: |
751 | | - artifact = candidate.artifact |
752 | | - return _has_legacy_generation_padding(artifact) if isinstance(artifact, MasterSeed) else None |
753 | | - |
754 | | - |
755 | 750 | def _candidate_order(candidate: CorrectionCandidate) -> tuple[object, ...]: |
756 | 751 | return ( |
757 | 752 | candidate.addend_hamming_weight, |
758 | 753 | candidate.crc_padding_match is not True, |
759 | | - _legacy_padding_match(candidate) is not True, |
760 | 754 | candidate.artifact.text.lower(), |
761 | 755 | tuple((edit.reverse_index, edit.kind, edit.observed, edit.replacement) for edit in candidate.edits), |
762 | 756 | ) |
@@ -808,10 +802,7 @@ def _best( |
808 | 802 | tied = [item for item in tied if len(item.artifact.text) in (48, 74)] |
809 | 803 | hamming = min(item.addend_hamming_weight for item in tied) |
810 | 804 | tied = [item for item in tied if item.addend_hamming_weight == hamming] |
811 | | - hints: tuple[Callable[[CorrectionCandidate], bool | None], ...] = ( |
812 | | - (lambda item: item.crc_padding_match), |
813 | | - _legacy_padding_match, |
814 | | - ) |
| 805 | + hints: tuple[Callable[[CorrectionCandidate], bool | None], ...] = (lambda item: item.crc_padding_match,) |
815 | 806 | if fingerprint_match is not None: |
816 | 807 | hints += (fingerprint_match,) |
817 | 808 | for hint in hints: |
|
0 commit comments