Skip to content

Commit 17f0720

Browse files
committed
Move IssueInfo.data initialization from __post_init_post_parse__ to _get_input_()
1 parent 161e691 commit 17f0720

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/collect-user-submission.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,15 @@ class IssueInfo:
2828
gh_event_path: pydantic.FilePath
2929
submission: Submission = pydantic.Field(default=None)
3030

31-
def __post_init_post_parse__(self):
32-
with open(self.gh_event_path) as f:
33-
self.data = json.load(f)
34-
3531
def create_submission(self):
3632
self._get_inputs()
3733
self._create_submission_input()
3834
return self
3935

4036
def _get_inputs(self):
37+
with open(self.gh_event_path) as f:
38+
self.data = json.load(f)
39+
4140
self.author = self.data['issue']['user']['login']
4241
self.title = self.data['issue']['title']
4342
self.body = self.data['issue']['body']

0 commit comments

Comments
 (0)