I wrote this Python function with what I thought were reasonable MyPy types: [code]…
- User
I wrote this Python function with what I thought were reasonable
MyPytypes:def _program_upload_group_for_processing( self, id: int, statuses: list[Status] ) -> DBProgramUploadGroup | Literal[False]:However, Python complains with
TypeError: 'function' object is not subscriptablewhen is reacheslist[status]. What gives? I've used this type of annotation elsewhere in the app (though I don't think in function arguments). What's the right way? - Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.