Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Feature/poll rewrite #204

Closed
wants to merge 54 commits into from
Closed

Feature/poll rewrite #204

wants to merge 54 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 11, 2022

Description
Poll rewrite

Issue
Closes #140 #162

@ghost ghost requested review from a team and Defelo as code owners April 11, 2022 10:27
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Apr 11, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8f9609c
Status: ✅  Deploy successful!
Preview URL: https://f54b2f53.pydrocsid-cogs.pages.dev
Branch Preview URL: https://feature-poll-rewrite.pydrocsid-cogs.pages.dev

View logs

@ghost ghost changed the base branch from develop to mypy April 11, 2022 11:28
@Defelo Defelo assigned Defelo and ghost Apr 11, 2022
@Defelo Defelo deleted the branch develop April 11, 2022 23:32
@Defelo Defelo closed this Apr 11, 2022
@Defelo Defelo reopened this Apr 11, 2022
@Defelo Defelo changed the base branch from mypy to develop April 11, 2022 23:35
@ghost ghost requested a review from DEL7A May 19, 2022 14:19
general/polls/models.py Show resolved Hide resolved
general/polls/cog.py Outdated Show resolved Hide resolved
general/polls/cog.py Outdated Show resolved Hide resolved

parsed_options: list[tuple[str, str]] = [(obj.emoji, t.select.label(ix)) for ix, obj in enumerate(options, start=1)]

try:
Copy link
Member

Choose a reason for hiding this comment

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

use an if condition instead of this try-excpet-thing here (check for permissions first)

Copy link
Author

Choose a reason for hiding this comment

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

problem with that is, that its not about the permission, its about the maximum pins per channel https://docs.pycord.dev/en/master/api.html?highlight=HTTPException%20pin#discord.Message.pin

general/polls/cog.py Outdated Show resolved Hide resolved
general/polls/cog.py Outdated Show resolved Hide resolved
general/polls/cog.py Outdated Show resolved Hide resolved
@ghost ghost requested a review from LoCrealloc June 6, 2022 20:01
Copy link

@Ari24-cb24 Ari24-cb24 left a comment

Choose a reason for hiding this comment

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

Simplify code
Here's my comment so where is my money now?

general/polls/cog.py Outdated Show resolved Hide resolved
Copy link

@Ari24-cb24 Ari24-cb24 left a comment

Choose a reason for hiding this comment

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

I want my money please

general/polls/cog.py Outdated Show resolved Hide resolved
Copy link
Member

@LoCrealloc LoCrealloc left a comment

Choose a reason for hiding this comment

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

there you got at least some minor things to fix; have fun

general/polls/cog.py Outdated Show resolved Hide resolved
general/polls/models.py Outdated Show resolved Hide resolved
if _weight and weight < (_weight := float(_weight)):
weight = _weight

return weight
Copy link
Member

Choose a reason for hiding this comment

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

please dont calll it weight and _weight, thats very unreadable

@codeclimate
Copy link

codeclimate bot commented Jun 20, 2022

Code Climate has analyzed commit 8f9609c and detected 0 issues on this pull request.

View more on Code Climate.

@ghost ghost closed this Jun 27, 2022
@ghost ghost deleted the feature/poll_rewrite branch June 27, 2022 20:18
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

Anonymous polls
5 participants