Additional python PEP 8 fixes

This commit is contained in:
Gaute Lindkvist 2019-09-23 15:26:49 +02:00
parent 10a532a3b5
commit 0125b13241
5 changed files with 12 additions and 2 deletions

View File

@ -19,6 +19,7 @@ from rips.grid import Grid
from rips.pdmobject import PdmObject
from rips.view import View
class Case(PdmObject):
"""ResInsight case class

View File

@ -9,6 +9,7 @@ import rips.generated.Case_pb2 as Case_pb2
import rips.generated.Grid_pb2 as Grid_pb2
import rips.generated.Grid_pb2_grpc as Grid_pb2_grpc
class Grid:
"""Grid Information. Not meant to be constructed separately

View File

@ -8,6 +8,7 @@ from rips.case import Case
import rips.generated.Commands_pb2 as Cmd
class GridCaseGroup(PdmObject):
"""ResInsight Grid Case Group class

View File

@ -23,6 +23,14 @@ class PdmObject:
self._channel)
self._commands = CmdRpc.CommandsStub(channel)
def pb2_object(self):
""" Private method"""
return self._pb2_object
def channel(self):
""" Private method"""
return self._channel
def address(self):
"""Get the unique address of the PdmObject

View File

@ -15,10 +15,9 @@ class View(PdmObject):
"""
def __init__(self, pdm_object):
PdmObject.__init__(self, pdm_object.pb2_object(), pdm_object.channel())
self.view_id = pdm_object.get_value("ViewId")
PdmObject.__init__(self, pdm_object._pb2_object, pdm_object._channel)
def show_grid_box(self):
"""Check if the grid box is meant to be shown in the view"""
return self.get_value("ShowGridBox")