Skip to content

Commit

Permalink
Re-enable pylint for some model files (apache#8770)
Browse files Browse the repository at this point in the history
* Allow id as a valid name for pylint

* Re-enable pylint for superset/models/core.py

* re-enable pylint for superset/models/sql_lab.py

* re-enable pylint for superset/models/schedules.py

* re-enable pylint for superset/models/helpers.py

* re-enable pylint for superset/models/annotations.py

* re-enable pylint on superset/models/tags.py

* a couple more fixes after black formatting...

* Add another inline pylint disable

* Fix black

* Move to inline disables for 'id' attribute on models

* Fix lint disables after black reformatted them
  • Loading branch information
Will Barrett authored and mistercrunch committed Dec 10, 2019
1 parent 6c130b3 commit adf2cc2
Show file tree
Hide file tree
Showing 6 changed files with 167 additions and 133 deletions.
5 changes: 2 additions & 3 deletions superset/models/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# pylint: disable=C,R,W
"""a collection of Annotation-related models"""
from flask_appbuilder import Model
from sqlalchemy import Column, DateTime, ForeignKey, Index, Integer, String, Text
Expand All @@ -28,7 +27,7 @@ class AnnotationLayer(Model, AuditMixinNullable):
"""A logical namespace for a set of annotations"""

__tablename__ = "annotation_layer"
id = Column(Integer, primary_key=True)
id = Column(Integer, primary_key=True) # pylint: disable=invalid-name
name = Column(String(250))
descr = Column(Text)

Expand All @@ -41,7 +40,7 @@ class Annotation(Model, AuditMixinNullable):
"""Time-related annotation"""

__tablename__ = "annotation"
id = Column(Integer, primary_key=True)
id = Column(Integer, primary_key=True) # pylint: disable=invalid-name
start_dttm = Column(DateTime)
end_dttm = Column(DateTime)
layer_id = Column(Integer, ForeignKey("annotation_layer.id"), nullable=False)
Expand Down
Loading

0 comments on commit adf2cc2

Please sign in to comment.