Linting and Typing #65
Closed
ntjohnson1
started this conversation in
Ideas
Replies: 2 comments
-
Here's a post from the python subreddit that seems to align with the general direction/tooling. https://www.reddit.com/r/Python/comments/11pah4o/an_opinionated_python_boilerplate/ |
Beta Was this translation helpful? Give feedback.
0 replies
-
Closing discussion since the repo now has linting and typing coverage. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I used #54 as an example of the result for adding typing and linting to the tensor class. These are not coupled so we could take one without the other but wanted to make sure we discuss before applying either broadly across the code base.
Linting (I specifically like pylint but am open to alternatives)
To start with the linting can be opt in as we work our way across the code base. However the fixes will create churn that potentially complicates merging in changes occurring in parallel.
Pros:
Cons:
Typing (enforced with mypy since that's pretty standard)
Right now we don't have any typing so we could turn on mypy to enforce whatever we add so can do it incrementally. Today I think typing is only used for expressiveness and doesn't have any meaningful functional impact. Eventually that may change but I don't think there is any real roadmap around it. I know some tools build on top of typing but I don't think we were specifically targeting any of those.
Pros:
pyttb/pyttb/pyttb_utils.py
Lines 153 to 163 in e5cedce
Cons:
Beta Was this translation helpful? Give feedback.
All reactions