File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -766,6 +766,12 @@ def apply(
766766 'streaming jobs.' % full_label )
767767 self .applied_labels .add (full_label )
768768
769+ if pvalueish is None :
770+ full_label = self ._current_transform ().full_label
771+ raise TypeCheckError (
772+ f'Transform "{ full_label } " was applied to the output of '
773+ f'an object of type None.' )
774+
769775 pvalueish , inputs = transform ._extract_input_pvalues (pvalueish )
770776 try :
771777 if not isinstance (inputs , dict ):
@@ -805,9 +811,6 @@ def apply(
805811 self ._assert_not_applying_PDone (pvalueish , transform )
806812
807813 pvalueish_result = self .runner .apply (transform , pvalueish , self ._options )
808- if pvalueish_result is None :
809- pvalueish_result = pvalue .PDone (self )
810- pvalueish_result .producer = current
811814
812815 if type_options is not None and type_options .pipeline_type_check :
813816 transform .type_check_outputs (pvalueish_result )
Original file line number Diff line number Diff line change @@ -172,9 +172,7 @@ class ParentTransform(PTransform):
172172 def expand (self , pcoll ):
173173 return pcoll | DoNothingTransform ()
174174
175- with pytest .raises (
176- TypeCheckError ,
177- match = r".*applied to the output.*ParentTransform/DoNothingTransform" ):
175+ with pytest .raises (TypeCheckError , match = r".*applied to the output" ):
178176 with TestPipeline () as pipeline :
179177 _ = pipeline | ParentTransform () | beam .Map (lambda x : x + 1 )
180178
You can’t perform that action at this time.
0 commit comments