From edba864c1f02f169007c8b5e661571f70cec684f Mon Sep 17 00:00:00 2001 From: Matthew Richards Date: Mon, 25 Jan 2021 11:26:15 +0000 Subject: [PATCH] #119: Add flake8 file ignore due to DB backend camelCase attribute names --- .flake8 | 5 ++++- datagateway_api/common/database/models.py | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.flake8 b/.flake8 index eef539f2..0c1dae02 100644 --- a/.flake8 +++ b/.flake8 @@ -6,5 +6,8 @@ max-complexity = 17 max-line-length = 80 application-import-names = datagateway_api,test,util import-order-style = google -per-file-ignores = test/*:S101,util/icat_db_generator.py:S311 +per-file-ignores = + test/*: S101 + util/icat_db_generator.py: S311 + datagateway_api/common/database/models.py: N815,A003 enable-extensions=G diff --git a/datagateway_api/common/database/models.py b/datagateway_api/common/database/models.py index 46702ec8..29f41a3c 100644 --- a/datagateway_api/common/database/models.py +++ b/datagateway_api/common/database/models.py @@ -215,7 +215,6 @@ class APPLICATION(Base, EntityHelper, metaclass=EntityMeta): __tablename__ = "APPLICATION" __table_args__ = (Index("UNQ_APPLICATION_0", "FACILITY_ID", "NAME", "VERSION"),) - # TODO - Disable N815 on this file, document why this is (comment in .flake8?) id = Column("ID", BigInteger, primary_key=True) createId = Column("CREATE_ID", String(255), nullable=False) createTime = Column("CREATE_TIME", DateTime, nullable=False)