villebro commented on a change in pull request #16463:
URL: https://github.com/apache/superset/pull/16463#discussion_r696501257
##########
File path: superset/annotation_layers/annotations/commands/create.py
##########
@@ -52,7 +52,7 @@ def run(self) -> Model:
return annotation
def validate(self) -> None:
- exceptions: List[ValidationError] = list()
+ exceptions: List[ValidationError] = []
Review comment:
Ok, this made me chuckle. I don't remember which linter and when, but
didn't some linter up until fairly recently complain about using `[]` and
recommend using `list()` instead? 😆 See `use-list-literal (R1734)` and
`use-dict-literal (R1735)` in
http://pylint.pycqa.org/en/latest/technical_reference/features.html
(FYI: I much prefer `[]` and `{}` over `list()` and `dict()` respectively,
so I'm really happy about this change)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]