Title: Type TAllowedParameterValue more completely · Issue #669 · databricks/databricks-sql-python · GitHub
Open Graph Title: Type TAllowedParameterValue more completely · Issue #669 · databricks/databricks-sql-python
X Title: Type TAllowedParameterValue more completely · Issue #669 · databricks/databricks-sql-python
Description: Currently, the type definition of TAllowedParameterValue is TAllowedParameterValue = Union[ str, int, float, datetime.datetime, datetime.date, bool, decimal.Decimal, None, list, dict, tuple, ] list, dict, and tuple are incomplete types. ...
Open Graph Description: Currently, the type definition of TAllowedParameterValue is TAllowedParameterValue = Union[ str, int, float, datetime.datetime, datetime.date, bool, decimal.Decimal, None, list, dict, tuple, ] list...
X Description: Currently, the type definition of TAllowedParameterValue is TAllowedParameterValue = Union[ str, int, float, datetime.datetime, datetime.date, bool, decimal.Decimal, None, list, dict, tuple, ] list...
Opengraph URL: https://github.com/databricks/databricks-sql-python/issues/669
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Type TAllowedParameterValue more completely","articleBody":"[Currently](https://github.com/databricks/databricks-sql-python/blob/fd81c5a6e1b7b46e865738e7462bce85f4ffb5b4/src/databricks/sql/parameters/native.py#L57), the type definition of TAllowedParameterValue is\n\n```py\nTAllowedParameterValue = Union[\n str,\n int,\n float,\n datetime.datetime,\n datetime.date,\n bool,\n decimal.Decimal,\n None,\n list,\n dict,\n tuple,\n]\n```\n\nlist, dict, and tuple are incomplete types. That means when I try to write a wrapper function around cursor.execute using that type as the type of a parameter sql_params_dict, pyright strict yells at me `Type of parameter \"sql_params_dict\" is partially unknown`.\n\nI think this can easily be fixed. My guess is, this could simply be a recursive type definition, and those last three lines could be changed to\n\n```py\n list[TAllowedParameterValue],\n dict[TAllowedParameterValue, TAllowedParameterValue],\n tuple[TAllowedParameterValue, ...]\n]\n```\n\nHowever, there may be more or fewer restrictions on those types. I didn't look into it very hard.","author":{"url":"https://github.com/wyattscarpenter","@type":"Person","name":"wyattscarpenter"},"datePublished":"2025-08-08T11:43:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/669/databricks-sql-python/issues/669"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5965f48c-66c3-1583-55af-b63e4fbd3f36 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A256:2735DF:4008A4B:593EB65:69713C41 |
| html-safe-nonce | cce1c0b64ddc2d2aea428e1202a68c049bf0b03bae68d90d968fa0187b51ad24 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMjU2OjI3MzVERjo0MDA4QTRCOjU5M0VCNjU6Njk3MTNDNDEiLCJ2aXNpdG9yX2lkIjoiNTU0NDY5MjU1OTE1OTMxMTQyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7a29237564a3e396978a60c7c3b1f04e714b31ca4ba1e5bae4b1346259d31ea6 |
| hovercard-subject-tag | issue:3303732150 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/databricks/databricks-sql-python/669/issue_layout |
| twitter:image | https://avatars.githubusercontent.com/u/4998052?s=400&v=4 |
| twitter:card | summary |
| og:image | https://avatars.githubusercontent.com/u/4998052?s=400&v=4 |
| og:image:alt | Currently, the type definition of TAllowedParameterValue is TAllowedParameterValue = Union[ str, int, float, datetime.datetime, datetime.date, bool, decimal.Decimal, None, list, dict, tuple, ] list... |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | wyattscarpenter |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7899979feb505886f0f29e8086a739254f3a850fd3dbc9fb63ce4ec27831b1fb |
| turbo-cache-control | no-preview |
| go-import | github.com/databricks/databricks-sql-python git https://github.com/databricks/databricks-sql-python.git |
| octolytics-dimension-user_id | 4998052 |
| octolytics-dimension-user_login | databricks |
| octolytics-dimension-repository_id | 493695132 |
| octolytics-dimension-repository_nwo | databricks/databricks-sql-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 493695132 |
| octolytics-dimension-repository_network_root_nwo | databricks/databricks-sql-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 998d3ef09faa982f8d83ad111166244ae4625572 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width