pycharm-odoo icon indicating copy to clipboard operation
pycharm-odoo copied to clipboard

Add special type inference for http.request proxy object

Open trinhanhngoc opened this issue 2 years ago • 0 comments

Type of http.request is actually LocalProxy but odoo-stubs fakes it to Request to make PyCharm provide code completion for request's attributes. This leads two problems:

  1. Type checking warning: image
  2. Users who for some reason do not use odoo-stubs will not benefit from code completion.

Since Python does not currently support proxy type hinting, I need to put some magic into the Odoo plugin itself.

trinhanhngoc avatar Jan 14 '23 09:01 trinhanhngoc