Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Type TAllowedParameterValue more completely #669

Open
@wyattscarpenter

Description

@wyattscarpenter

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. 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 meType of parameter "sql_params_dict" is partially unknown.

I 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

list[TAllowedParameterValue],dict[TAllowedParameterValue,TAllowedParameterValue],tuple[TAllowedParameterValue, ...]]

However, there may be more or fewer restrictions on those types. I didn't look into it very hard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp