https://pantsbuild.org/ logo
#development
Title
# development
a

aloof-angle-91616

07/24/2020, 4:10 AM
it could be very interesting to have some sort of static analysis (specifically for the pants codebase, which uses absolute imports) that checks whether a python class is unused, or unused except in test targets (we would use the
ast
module for this)
h

hundreds-father-404

07/24/2020, 4:11 AM
This would be cool. Kinda like Flake8 warning about unused variables
a

aloof-angle-91616

07/24/2020, 4:12 AM
yes! also it's possible to import something transitively in python because there are no explicit exports and i think we always want to warn about that, there's an issue
h

hundreds-father-404

07/24/2020, 4:13 AM
MyPy warns about what I think you’re mentioning. MyPy requires that you explicitly re-export via
import as
👍 1
a

aloof-angle-91616

07/24/2020, 4:13 AM
omfg
bae
love my boy guido
🐍 1
❤️ 1
h

hundreds-father-404

07/24/2020, 4:13 AM
MyPy was transformational to me liking Python
untyped code is too clever for me to reason about what’s going on
a

aloof-angle-91616

07/24/2020, 4:14 AM
i'm using coffeescript with flow types now and i love it for the same reason as i love mypy
❤️ 1
untyped code is being lazy
you can be clever with typed code
just might require a mypy PR
h

hundreds-father-404

07/24/2020, 4:14 AM
I love Flow!! Their intersection types are 🔥
coffeescript still requires comment types but i don't mind that since the colon syntax is used for object literals