首页 > 解决方案 > 如何使 Python 变量的 vs 代码建议更加模糊?

问题描述

我为它编写 python 代码Odoo,它在运行时使用某种reflection或更改的类。这会导致类具有未在类定义中显示的属性和行为(例如:类是“可迭代的”)。

例如,参加这个课程:

class Project(models.Model):
    _name = 'project.project'

    pre_sales_engineer_id = fields.Many2one("res.users", "Presales Engineer")

    def do_something_with_pre_sales(self):
        for record in self:
            record.  # here (after the dot) I would like the auto complete to suggest "pre_sales_engineer_id"

在上面的方法中,我评论了我想要/期望的内容。

我认为这种自动完成功能在过去的某个时候是一个功能,但我不确定。

标签: visual-studio-codeautocomplete

解决方案


推荐阅读