如何在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
我已经尝试过的.
我有以下模型:
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吗?
我正在尝试将 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)