Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
robertwb committed Sep 20, 2023
1 parent b0d8013 commit 267bbf7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion sdks/python/apache_beam/yaml/yaml_transform_scope_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ def test_get_pcollection_output(self):
"PCollection[Square.None]", str(scope.get_pcollection("LogForTesting")))

self.assertTrue(
scope.get_pcollection("Square") == scope.get_pcollection("LogForTesting"))
scope.get_pcollection("Square") == scope.get_pcollection(
"LogForTesting"))

def test_create_ptransform(self):
with beam.Pipeline(options=beam.options.pipeline_options.PipelineOptions(
Expand Down Expand Up @@ -108,6 +109,7 @@ def test_create_ptransform(self):
**result_annotations, **target_annotations
})


class TestProvider(yaml_provider.InlineProvider):
def __init__(self, transform, name):
super().__init__({
Expand Down
8 changes: 4 additions & 4 deletions sdks/python/apache_beam/yaml/yaml_transform_unit_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import yaml

import apache_beam as beam
from apache_beam import PCollection
from apache_beam.yaml import YamlTransform
from apache_beam.yaml import yaml_provider
from apache_beam.yaml.yaml_provider import InlineProvider
Expand All @@ -30,7 +29,6 @@
from apache_beam.yaml.yaml_transform import ensure_errors_consumed
from apache_beam.yaml.yaml_transform import ensure_transforms_have_types
from apache_beam.yaml.yaml_transform import expand_composite_transform
from apache_beam.yaml.yaml_transform import expand_pipeline
from apache_beam.yaml.yaml_transform import extract_name
from apache_beam.yaml.yaml_transform import identify_object
from apache_beam.yaml.yaml_transform import normalize_inputs_outputs
Expand Down Expand Up @@ -969,7 +967,8 @@ def test_init_with_string(self):
result = YamlTransform(spec, providers_dict)
self.assertIn('p1', result._providers) # check for custom providers
self.assertIn('p2', result._providers) # check for custom providers
self.assertIn('LogForTesting', result._providers) # check for standard provider
self.assertIn(
'LogForTesting', result._providers) # check for standard provider
self.assertEqual(result._spec['type'], "composite") # preprocessed spec

def test_init_with_dict(self):
Expand All @@ -983,7 +982,8 @@ def test_init_with_dict(self):
'''
spec = yaml.load(spec, Loader=SafeLineLoader)
result = YamlTransform(spec)
self.assertIn('LogForTesting', result._providers) # check for standard provider
self.assertIn(
'LogForTesting', result._providers) # check for standard provider
self.assertEqual(result._spec['type'], "composite") # preprocessed spec


Expand Down

0 comments on commit 267bbf7

Please sign in to comment.