Skip to content
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

Type annotations and models #155

Merged
merged 2 commits into from
Mar 27, 2024
Merged

Type annotations and models #155

merged 2 commits into from
Mar 27, 2024

Conversation

crazyscientist
Copy link
Contributor

  • Added more type annotations
  • Use E factory in models instead of extension code

* Added more type annotations
* Use `E` factory in models instead of extension code
Copy link

github-actions bot commented Mar 27, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  osctiny
  osc.py
  osctiny/extensions
  bs_requests.py
  staging.py
  osctiny/models
  __init__.py
  staging.py 55-61
  osctiny/utils
  base.py
  changelog.py
Project Total  

This report was generated by python-coverage-comment-action

@der-gabe der-gabe self-assigned this Mar 27, 2024
@der-gabe
Copy link
Member

Hey, while we're at it...

Would you mind adding a return type annotation of -> str to the __str__ and __unicode__ methods of the Entry class in osctiny/utils/changelog.py

I would have done so myself, but GitHub doesn't let me add comments and suggestions outside of the context of changes and I didn't just want to push my own commit into a branch I'm reviewing...

pylint.rc Show resolved Hide resolved
@crazyscientist
Copy link
Contributor Author

Would you mind adding a return type annotation of -> str to the str and unicode methods of the Entry class in osctiny/utils/changelog.py

I was hoping you would not notice that oversight because __str__ and __unicode__ are kind of obvious, but it certainly would be most consequent. 👍 Done.

@der-gabe
Copy link
Member

I have to admit that the use of ElementMaker is a bit tricky to understand, but I get it now and it does reduce some code duplication (if not total LOC, alas), so I'm fine with it.

LGTM!

@der-gabe der-gabe merged commit d9b8a2e into master Mar 27, 2024
18 checks passed
@crazyscientist crazyscientist deleted the model-improvements branch May 31, 2024 12:46
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.

2 participants