@@ -34,9 +34,13 @@ def __init__(self, *, blocks_in=None, blocks_out=None, strict=False):
3434 raise ValueError ("unknown outgoing content_keys" + str (unknown ))
3535 if strict :
3636 if set (blocks_in .record_keys ) != set (blocks_out .record_keys ):
37- raise ValueError ("record keys must match when using both blocks in and blocks out" )
37+ raise ValueError (
38+ "record keys must match when using both blocks in and blocks out"
39+ )
3840 if set (blocks_in .content_keys ) != set (blocks_out .content_keys ):
39- raise ValueError ("content keys must match when using both blocks in and blocks out" )
41+ raise ValueError (
42+ "content keys must match when using both blocks in and blocks out"
43+ )
4044 self .blocks_in = blocks_in
4145 self .blocks_out = blocks_out
4246 if self .blocks_in is not None :
@@ -113,7 +117,9 @@ def transform(
113117 raise KeyError ("missing required columns: " + str (missing_cols ))
114118 if check_blocks_out_keying :
115119 # table should be keyed by record_keys
116- if not data_algebra .cdata .table_is_keyed_by_columns (X , self .blocks_out .record_keys ):
120+ if not data_algebra .cdata .table_is_keyed_by_columns (
121+ X , self .blocks_out .record_keys
122+ ):
117123 raise ValueError ("table is not keyed by blocks_out.record_keys" )
118124 # convert to block records
119125 with sqlite3 .connect (":memory:" ) as conn :
@@ -159,24 +165,30 @@ def compose(self, other):
159165 blocks_out = data_algebra .cdata .RecordSpecification (
160166 control_table = rso ,
161167 record_keys = rk ,
162- control_table_keys = s2 .blocks_out .control_table_keys ))
168+ control_table_keys = s2 .blocks_out .control_table_keys ,
169+ )
170+ )
163171 else :
164172 if out .shape [0 ] < 2 :
165173 return RecordMap (
166174 blocks_in = data_algebra .cdata .RecordSpecification (
167175 control_table = rsi ,
168176 record_keys = rk ,
169- control_table_keys = s1 .blocks_in .control_table_keys ))
177+ control_table_keys = s1 .blocks_in .control_table_keys ,
178+ )
179+ )
170180 else :
171181 return RecordMap (
172182 blocks_in = data_algebra .cdata .RecordSpecification (
173183 control_table = rsi ,
174184 record_keys = rk ,
175- control_table_keys = s1 .blocks_in .control_table_keys ),
185+ control_table_keys = s1 .blocks_in .control_table_keys ,
186+ ),
176187 blocks_out = data_algebra .cdata .RecordSpecification (
177188 control_table = rso ,
178189 record_keys = rk ,
179- control_table_keys = s2 .blocks_out .control_table_keys )
190+ control_table_keys = s2 .blocks_out .control_table_keys ,
191+ ),
180192 )
181193
182194 def __rrshift__ (self , other ): # override other >> self
0 commit comments