From 8bd46a976bcfd9100336fe1ab32db05cd480e2f6 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Thu, 17 Mar 2022 10:14:01 -0700 Subject: [PATCH] pick/core: drop the main_sha field It isn't actually used, so we don't need it. --- bin/pick/core.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/pick/core.py b/bin/pick/core.py index 766749c471f..d805a7be987 100644 --- a/bin/pick/core.py +++ b/bin/pick/core.py @@ -42,7 +42,6 @@ if typing.TYPE_CHECKING: nominated: bool nomination_type: typing.Optional[int] resolution: typing.Optional[int] - main_sha: typing.Optional[str] because_sha: typing.Optional[str] IS_FIX = re.compile(r'^\s*fixes:\s*([a-f0-9]{6,40})', flags=re.MULTILINE | re.IGNORECASE) @@ -118,7 +117,6 @@ class Commit: nominated: bool = attr.ib(False) nomination_type: typing.Optional[NominationType] = attr.ib(None) resolution: Resolution = attr.ib(Resolution.UNRESOLVED) - main_sha: typing.Optional[str] = attr.ib(None) because_sha: typing.Optional[str] = attr.ib(None) def to_json(self) -> 'CommitDict': @@ -131,7 +129,7 @@ class Commit: @classmethod def from_json(cls, data: 'CommitDict') -> 'Commit': - c = cls(data['sha'], data['description'], data['nominated'], main_sha=data['main_sha'], because_sha=data['because_sha']) + c = cls(data['sha'], data['description'], data['nominated'], because_sha=data['because_sha']) if data['nomination_type'] is not None: c.nomination_type = NominationType(data['nomination_type']) if data['resolution'] is not None: