hundreds-father-404
03/19/2020, 6:06 PMflake8-pantsbuild
to do this. I believe it’s possible to have lints like `check that no type hints for a frozen dataclass use Set
, FrozenSet
, List
, Iterable
, etc`.
I love the idea of that living in flake8-pantsbuild
so that only rule authors use the lints and we don’t hardcode the lints into Pants itself.
We can’t catch 100% of the issues, but even if we could automate catching 20%, that would be a big win. This is particularly important as we think about plugin authors starting to write their own rules. They won’t have core Pants committers there to look out for common gotchas in code reviewlint.pythonstyle
and for rules validationhundreds-breakfast-49010
03/19/2020, 6:13 PMhundreds-father-404
03/19/2020, 6:24 PMClassDef
nodes, then visit their attribute Nodes and see if their type hints are any of the prohibited values”
I’m not sure how ASTVisitor pairs with both type hints and dataclasses. Would be interesting.aloof-angle-91616
03/19/2020, 6:26 PMhundreds-father-404
03/19/2020, 6:26 PMaloof-angle-91616
03/19/2020, 6:27 PM