Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#138 Add default log check(assert) requirements for LogCapture #143

Merged
merged 1 commit into from
Oct 9, 2020

Conversation

zolyfarkas-fb
Copy link
Contributor

No description provided.

Copy link
Member

@cjw296 cjw296 left a comment

Choose a reason for hiding this comment

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

So yeah, this is an example of a terrible commit message, and I'm adding this comment mainly to remind myself to not let this kind of crap get to master.

This PR adds a lot of functionality until this bad commit message, including some nasty gotchas around truthiness of Handler objects as used by logging internals.

Comment on lines +87 to +97
def __len__(self):
return len(self.records)

def __getitem__(self, index):
return self._actual_row(self.records[index])

def __contains__(self, what):
for i, item in enumerate(self):
if what == item:
self.records[i].checked = True
return True
Copy link
Member

Choose a reason for hiding this comment

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

It's pretty annoying that these were introduced here. This PR has a particularly poor commit message and these three methods actually have some quite significant impact in terms of how this Handler behaves with respect to some logging internals.

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.

None yet

2 participants