ocket8888 commented on code in PR #7424:
URL: https://github.com/apache/trafficcontrol/pull/7424#discussion_r1163239381


##########
traffic_ops/testing/api_contract/v4/test_cdns.py:
##########
@@ -70,6 +70,10 @@ def test_cdn_contract(
                if not isinstance(cdn_response_template, dict):
                        raise TypeError(
                                f"Cdn response template data must be a dict, 
not '{type(cdn_response_template)}'")
+               response_template: dict[str, list[dict[str, object] | 
list[object] | primitive] |\
+                       dict[object, object] |\
+                       primitive
+               ] |\

Review Comment:
   I don't know why pytest doesn't fail on this, but when I try to do something 
like this in my terminal I get a `TypeError` because the syntax is incorrect:
   ```pycon
   Python 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0] on linux
   Type "help", "copyright", "credits" or "license" for more information.
   >>> a: None | a = None
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
   TypeError: unsupported operand type(s) for |: 'NoneType' and 'NoneType'
   >>> 
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to