pre-commit yapf version is too low to automatically format python code in a good way.
Created by: TomorrowIsAnOtherDay
current code
def _get_inputs(self):
return [fluid.layers.data(
name='state', shape=[self.hist_len, self.img_height, self.img_width], dtype='float32'),
fluid.layers.data(
name='action', shape=[1], dtype='int32'),
fluid.layers.data(
name='reward', shape=[], dtype='float32'),
fluid.layers.data(
name='next_s', shape=[self.hist_len, self.img_height, self.img_width], dtype='float32'),
fluid.layers.data(
name='isOver', shape=[], dtype='bool')]
formatted by yapf 0.13(version currently used by paddle)
return [
fluid.layers.data(
name='state',
shape=[self.hist_len, self.img_height, self.img_width],
dtype='float32'), fluid.layers.data(
name='action', shape=[1], dtype='int32'), fluid.layers.data(
name='reward', shape=[], dtype='float32'),
fluid.layers.data(
name='next_s',
shape=[self.hist_len, self.img_height, self.img_width],
dtype='float32'), fluid.layers.data(
name='isOver', shape=[], dtype='bool')
]
formatted by yapf 0.22
return [
fluid.layers.data(
name='state',
shape=[self.hist_len, self.img_height, self.img_width],
dtype='float32'),
fluid.layers.data(name='action', shape=[1], dtype='int32'),
fluid.layers.data(name='reward', shape=[], dtype='float32'),
fluid.layers.data(
name='next_s',
shape=[self.hist_len, self.img_height, self.img_width],
dtype='float32'),
fluid.layers.data(name='isOver', shape=[], dtype='bool')
]
Can we upgrade yapf version?