Skip to content

Commit

Permalink
Pylint corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertoAldea committed Nov 21, 2023
1 parent 5b1724b commit 792f5e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
19 changes: 2 additions & 17 deletions code/drv_db/src/wattrex_driver_db/drv_db_dao_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
####################### GENERIC IMPORTS #######################

####################### THIRD PARTY IMPORTS #######################
from sqlalchemy import (Column, Enum, PrimaryKeyConstraint, ForeignKeyConstraint, ForeignKey,
DateTime, String)
from sqlalchemy import Column, Enum, PrimaryKeyConstraint, ForeignKeyConstraint, DateTime, String
from sqlalchemy.dialects.mysql import MEDIUMINT, INTEGER, SMALLINT
from sqlalchemy.orm import declarative_base

Expand Down Expand Up @@ -66,7 +65,6 @@ class DrvDbCacheGenericMeasureC(Base):
Voltage = Column(MEDIUMINT(), nullable=False)
Current = Column(MEDIUMINT(), nullable=False)
Power = Column(INTEGER())

InstrID = Column(MEDIUMINT(unsigned=True), nullable=False)
PowerMode = Column(Enum(*DrvDbCyclingModeE.get_all_values()), nullable= False)

Expand All @@ -76,7 +74,7 @@ class DrvDbCacheExtendedMeasureC(Base):
'''
__tablename__ = 'ExtendedMeasures'
__table_args__ = (PrimaryKeyConstraint('ExpID', 'MeasID', 'UsedMeasID'),
ForeignKeyConstraint(['ExpID', 'MeasID'], [DrvDbCacheGenericMeasureC.ExpID,
ForeignKeyConstraint(['ExpID', 'MeasID'], [DrvDbCacheGenericMeasureC.ExpID,
DrvDbCacheGenericMeasureC.MeasID]),)

ExpID = Column(primary_key= True, nullable=False)
Expand All @@ -97,16 +95,3 @@ class DrvDbCacheStatusC(Base):
Status = Column(Enum(*DrvDbEquipStatusE.get_all_values()), nullable=False)
ErrorCode = Column(SMALLINT(unsigned=True), nullable=False)
DevID = Column(MEDIUMINT(unsigned=True), nullable=False)

# class DrvDbAlarmC(Base):
# '''
# Class method to create a base model of database Alarm table.
# '''
# __tablename__ = 'Alarm'
# __table_args__ = (ForeignKeyConstraint(['ExpID'], [DrvDbCacheExperimentC.ExpID]),)

# ExpID = Column(primary_key=True, nullable=False)
# AlarmID = Column(MEDIUMINT(unsigned=True), primary_key=True, nullable=False)
# Timestamp = Column(DateTime, nullable=False)
# Code = Column(MEDIUMINT(unsigned=True), nullable=False)
# Value = Column(MEDIUMINT(), nullable=False)
1 change: 0 additions & 1 deletion code/drv_db/src/wattrex_driver_db/drv_db_dao_master.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ class DrvDbMasterGenericMeasureC(DrvDbCacheGenericMeasureC): #pylint: disable=to
{'extend_existing': True},)

InstrID = Column(nullable=False)
PowerMode = Column(Enum(*DrvDbCyclingModeE.get_all_values()))

class DrvDbMasterExtendedMeasureC(DrvDbCacheExtendedMeasureC):
'''
Expand Down

0 comments on commit 792f5e1

Please sign in to comment.