File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 "check-manifest>=0.42,<1" ,
3131 "flake8==7.3.0" ,
3232 "isort==6.0.1" ,
33- "mypy==1.15 " ,
33+ "mypy==2.1.0 " ,
3434 "sphinx>=8.1.0,<9" ,
3535 "sphinx_rtd_theme>=3.0.2,<4" ,
3636 "sphinx-argparse==0.5.2; python_version>='3.10'" ,
Original file line number Diff line number Diff line change @@ -61,7 +61,11 @@ def parse_money_value(input_value: Any) -> Money:
6161 amount = input_value .get ("amount" , None )
6262 currency = input_value .get ("currency" , None )
6363
64- if not is_finite (amount ) or not isinstance (currency , str ):
64+ if (
65+ not isinstance (amount , (int , float ))
66+ or not is_finite (amount )
67+ or not isinstance (currency , str )
68+ ):
6569 raise GraphQLError ("Cannot parse money value dict: " + inspect (input_value ))
6670
6771 return Money (float (amount ), currency )
Original file line number Diff line number Diff line change @@ -57,7 +57,11 @@ def parse_money_value(input_value: Any) -> Money:
5757 amount = input_value .get ("amount" , None )
5858 currency = input_value .get ("currency" , None )
5959
60- if not is_finite (amount ) or not isinstance (currency , str ):
60+ if (
61+ not isinstance (amount , (int , float ))
62+ or not is_finite (amount )
63+ or not isinstance (currency , str )
64+ ):
6165 raise GraphQLError ("Cannot parse money value dict: " + inspect (input_value ))
6266
6367 return Money (float (amount ), currency )
You can’t perform that action at this time.
0 commit comments