Skip to content

Correct use of any as a type to typing.Any - #1499

Open
benberryallwood wants to merge 3 commits into
databricks:mainfrom
benberryallwood:fix/correct-any-type-hints
Open

Correct use of any as a type to typing.Any#1499
benberryallwood wants to merge 3 commits into
databricks:mainfrom
benberryallwood:fix/correct-any-type-hints

Conversation

@benberryallwood

Copy link
Copy Markdown

Summary

Corrects all uses of the built-in function any in type hints to typing.Any.

Why

any is a built-in function, and is not a valid type. typing.Any is a special type which is consistent with every type.

This is flagged by mypy and ty, e.g.:

$ uvx ty check databricks/sdk/config.py

error[invalid-type-form]: Function `any` is not valid in a parameter annotation
  --> databricks/sdk/config.py:52:45
   |
52 |     def __set__(self, cfg: "Config", value: any):
   |                                             ^^^
   |

@github-actions

Copy link
Copy Markdown

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-py

Inputs:

  • PR number: 1499
  • Commit SHA: 86a52658f611a0893b9e7a834e68fb42f545a54c

Checks will be approved automatically on success.

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.

1 participant