Skip to content

Finish Typing/Linting Pyttb Initial Support #194

New issue

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

Merged
merged 12 commits into from
Jul 10, 2023

Conversation

ntjohnson1
Copy link
Collaborator

@ntjohnson1 ntjohnson1 commented Jul 9, 2023

Resolves: #63

  • Adds typing and linting to the remaining components of pyttb.
  • Fixes a formatting error in our docstrings I introduced. Now all our parameters shouldn't have a hard coded type and display properly. Our type hints provide types to documentation.
  • Always follow up improvements possible for our typing. General direction of allowing the most general input and the most specific output. But at least we have pinned what we currently support. Adding some helper type definitions to unify the look/feel of our interfaces is probably a good next step but probably not critical path for 2.0.
  • Lots of mostly non-functional changes. Might be easier to review by commit where I explained what typing/linting changes I addressed.

📚 Documentation preview 📚: https://pyttb--194.org.readthedocs.build/en/194/

ntjohnson1 added 12 commits July 8, 2023 14:13
* Module doc string
* Lines too long
* F-strings
* shadowed built in name iter
* Line too long
* Module doc string
* Ignore things that need refactor
* f-strings
* unused variables
* Compare literal or falsey
* No else after break
* Set bool to output directly
* Eliminate shadowing built in iter
* Refactor helpers to snake_case
* Storing isinstance to variable doesn't narrow types
   * This introduces some duplication, but needs more cleanup generally
* I have <name>: <description> but description has to go on next line
* Confirmed none of our parameters have string constructed types (rely on mypy instead)
@ntjohnson1 ntjohnson1 marked this pull request as ready for review July 9, 2023 15:01
@ntjohnson1 ntjohnson1 requested a review from dmdunla July 9, 2023 15:01
@dmdunla dmdunla merged commit b7b43d2 into sandialabs:main Jul 10, 2023
@ntjohnson1 ntjohnson1 deleted the algorithm_typing branch July 10, 2023 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add pylint and typing across pyttb
2 participants