Skip to content

refactor: yes#8

Open
Commenter25 wants to merge 9 commits into
secureblue:mainfrom
Commenter25:primarily-parsing-3-gitwrecked
Open

refactor: yes#8
Commenter25 wants to merge 9 commits into
secureblue:mainfrom
Commenter25:primarily-parsing-3-gitwrecked

Conversation

@Commenter25
Copy link
Copy Markdown

round-3.mp4

makes it easier to read top to bottom
avoids constantly repeating `bot_handler.send_reply(message, [...])` and makes the code a lot easier to read
especially now that the syntax is so cut down, it really doesn't make a lot of sense to have a whole extra function call to separate these. plus, "_validate_content_tokens" is rather confusing, it sounds more general than being a timeout specific function
in a similar vein, this isn't inherently timeout specific

changing the variable name is totally a nitpick, but imo it only makes sense in the context of handle_message, outside of it the thought becomes "what content?"
a whole lot of repetition here that makes it difficult to read. made much easier by removing all that and making the consistently-sized error code the first param

also, the structure was inconsistent and didn't match the format in zulip documentation. you can see the structure at the top, and what a successful message looks like at the bottom (notice msg is blank)

https://zulip.com/api/rest-error-handling
keeps things type-safe, ensures consistency, and reduces verbosity
@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

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.

1 participant