Skip to content

vote_score upload#1

Open
kooonine wants to merge 1 commit into
masterfrom
koonine
Open

vote_score upload#1
kooonine wants to merge 1 commit into
masterfrom
koonine

Conversation

@kooonine

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread dao_vote/dao_vote.py
code = code + str(len(self._list))
self._list.put(code)
self._list_information[code] = \
f'{{"contents":"{contents}","date":"{self.now()}",' \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dict 타입으로 선언하고 json 스트링으로 변환해서 넣는 방식이 가독성면에서 더 좋을것 같습니다.

Comment thread dao_vote/dao_vote.py
@external
def vote(self, code: str, vote_res: int) -> None:
if self.user_is():
if not vote_res == 1 or vote_res == 2:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if not vote_res == 1 or vote_res == 2:
if not (vote_res == 1 or vote_res == 2):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants