We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using a context manager for the ErrorCollector() class could help reduce boilerplate and make our code more readable. We'd be going from:
ErrorCollector()
errors = ErrorCollector() for item in items: if item does not meet condition: errors.append(ValueError("Item does not meet condition") ) if errors: raise ValueError(errors)
to:
with ErrorCollector(): for item in items: if item does not meet condition: raise ValueError("Item does not meet condition")
The text was updated successfully, but these errors were encountered:
phackstock
No branches or pull requests
Using a context manager for the
ErrorCollector()
class could help reduce boilerplate and make our code more readable.We'd be going from:
to:
The text was updated successfully, but these errors were encountered: