小编lat*_*sha的帖子

Visual Studio代码抑制pep8警告

如何在Visual Studio代码中抑制pep8警告?我想要做的是抑制E501警告我不希望得到警告我的代码长度超过80个字符.我正在使用Don Jayamanne的Python扩展,这是我的vscode配置文件

{
    "python.linting.pylintEnabled": false,
    "python.linting.pep8Enabled": true,
    "python.pythonPath": "/workspace/virtualenvs/abr/bin/python3",
    "python.linting.enabled": true
}
Run Code Online (Sandbox Code Playgroud)

我知道还有另外一个选项"python.linting.pep8Args":[]但是我无法让它工作.我在virtualenv上安装了pep8

我已经尝试过的.

  1. "python.linting.pep8Args":[' - signore = E501']
  2. "搜索所有视觉工作室代码设置"

pep8 visual-studio-code

34
推荐指数
5
解决办法
2万
查看次数

姜戈。将字段从模型映射到数据库表中的字段

我有以下模型:

class MyModel(models.Model):
    field_one = models.CharField(max_length=255)
    field_two = models.CharField(max_length=255)

    class Meta:
        db_table = "super_table"
Run Code Online (Sandbox Code Playgroud)

以及以下数据库表:

CREATE TABLE public.super_table
(
  id integer NOT NULL DEFAULT nextval('super_table_id_seq'::regclass),
  field_two character varying(255) NOT NULL,
  field_three character varying(255) NOT NULL,
)
Run Code Online (Sandbox Code Playgroud)

我可以以某种方式在我的field_one模型field_three中映射super_table吗?

django

3
推荐指数
1
解决办法
2100
查看次数

JavaFX BooleanProperty 和 Hibernate

我正在尝试将 JavaFX BooleanPropety 添加到我的模型中,该模型由 Hibernate 保留,但出​​现以下错误。

Caused by: org.hibernate.MappingException: Could not determine type for: javafx.beans.property.BooleanProperty.
Run Code Online (Sandbox Code Playgroud)

JavaFX StringProperty 保持得很好,所以我有点困惑。

我的模型类如下

@Entity
public class Currency {
    private String uuid;
    private BooleanProperty isDefault = new SimpleBooleanProperty();
    private StringProperty name = new SimpleStringProperty();
    private StringProperty code = new SimpleStringProperty();

    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid2")
    @Column(name = "id")
    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getName() {
        return name.get(); …
Run Code Online (Sandbox Code Playgroud)

hibernate javafx hibernate-mapping javafx-8

2
推荐指数
1
解决办法
856
查看次数