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

MECHA-253: Implement !reopen without refreshing all cases #260

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

MHajoha
Copy link
Member

@MHajoha MHajoha commented Jan 27, 2018

Been toying around with giving only the reopened case a new index rather than remaking the whole board from the API, but I have no way of testing my code.
See MECHA-253

@MHajoha MHajoha changed the title Implement !reopen without refreshing all cases MECHA-253: Implement !reopen without refreshing all cases Jan 29, 2018
Copy link
Contributor

@theunkn0wn1 theunkn0wn1 left a comment

Choose a reason for hiding this comment

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

Please remove the usage of a bare exception, catching everything can make debugging really difficult, obscuring what is a runtime error from what is an interpretation error.

Further, testing of this modification resulted in an API error, il look into if this was caused by the modification, a misconfiguration in my mecha environment, or an API bug.

try:
addNamesFromV2Response(result['included'])
except:
pass
Copy link
Contributor

Choose a reason for hiding this comment

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

Do not use a bare except block.

Further, why are we catching bare exceptions and not handling them?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep I agree that this is terribly bad style of code. This is just how this is done in the rest of the code and I couldn't (be bothered to) figure out what addNamesFromV2Response actually throws.

Copy link
Contributor

Choose a reason for hiding this comment

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

From what i can tell it shouldn't be raising an exception. and if it does methinks we would like to know about it. Catch/pass is awful code style. I would prefer if mecha raised an error rather than silence it, that's pretty much the only indication we get if something is broken.

There are a lot of things you may discover in mecha2's codebase that are just plain bad practice.
For now it would be appreciated that any method you introduce/modify you make attempt to clean up.

We will just have to maintain mecha2 until mecha3 is ready to go. (which may be a while)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah you're right, I'll have a look at fixing that except clause tomorrow.

Copy link
Member Author

Choose a reason for hiding this comment

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

Also, is Mecha3 already on its way to becoming a thing? As in a complete rewrite against pydle or similar?

@theunkn0wn1
Copy link
Contributor

theunkn0wn1 commented Feb 1, 2018 via email

@MHajoha
Copy link
Member Author

MHajoha commented Feb 1, 2018

Sounds great. I've been writing around at such a thing myself, though more out of personal interest than anything else. Perhaps you could make what you've done so far a repo of it's own for now, because I'd love to contribute.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants