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

Fix type hints #565

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Fix type hints #565

wants to merge 3 commits into from

Conversation

judahrand
Copy link
Contributor

@judahrand judahrand commented Feb 26, 2024

Changes

Fixes: #564

Tests

  • make test run locally
  • make fmt applied
  • relevant integration tests applied

Copy link
Contributor

@nfx nfx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also change the https://github.com/databricks/databricks-sdk-py/blob/main/.codegen/__init__.py.tmpl, because your changes will get overridden by the autorelease infra

@judahrand
Copy link
Contributor Author

I'm also noticing that this issue appear in a lot more of the codebase. I'll have a quick check through and see what else I can catch.

@codecov-commenter
Copy link

codecov-commenter commented Feb 26, 2024

Codecov Report

Attention: Patch coverage is 99.14966% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 58.08%. Comparing base (5255760) to head (c75094e).

Files Patch % Lines
databricks/sdk/runtime/dbutils_stub.py 0.00% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #565   +/-   ##
=======================================
  Coverage   58.08%   58.08%           
=======================================
  Files          45       45           
  Lines       29725    29726    +1     
=======================================
+ Hits        17265    17266    +1     
  Misses      12460    12460           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@judahrand judahrand force-pushed the fix/typing branch 2 times, most recently from 2a31bcc to dcff82a Compare February 26, 2024 11:22
@judahrand
Copy link
Contributor Author

@nfx I think this is ready for review. Lots of changes because there were a lot of missing Optionals and any isn't a valid Python type, one should use typing.Any

@mgyucht
Copy link
Contributor

mgyucht commented Feb 26, 2024

Thanks for contributing this.

As you can tell, we haven't enabled type checking for the repo yet. We appreciate these fixes in the meantime. Hopefully I'll be able to work on adding type checking sometime in the next month or two.

Copy link
Contributor

@mgyucht mgyucht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! As I mentioned, we appreciate these fixes while we haven't yet set up typechecking regression testing in the repo.

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.

[ISSUE] Lots of missing Optionals in the type hinting
4 participants