Skip to content

Commit

Permalink
fixing pylint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rdeshmukh15 committed Jan 25, 2024
1 parent 8081821 commit f4ee1d0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tap_stripe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@


class StripeTransformer(Transformer):
def stripe_filter_data_by_metadata(self, data, metadata, parent=()):
if isinstance(data, dict) and metadata:
def stripe_filter_data_by_metadata(self, data, mdata, parent=()):
if isinstance(data, dict) and mdata:
for field_name in list(data.keys()):
breadcrumb = parent + ('properties', field_name)
selected = singer.metadata.get(metadata, breadcrumb, 'selected')
inclusion = singer.metadata.get(metadata, breadcrumb, 'inclusion')
selected = singer.metadata.get(mdata, breadcrumb, 'selected')
inclusion = singer.metadata.get(mdata, breadcrumb, 'inclusion')
if inclusion == 'automatic':
continue

Expand All @@ -152,16 +152,16 @@ def stripe_filter_data_by_metadata(self, data, metadata, parent=()):
if data[field_name] == "":
data[field_name] = None
data[field_name] = self.stripe_filter_data_by_metadata(
data[field_name], metadata, breadcrumb)
data[field_name], mdata, breadcrumb)

if isinstance(data, list) and metadata:
if isinstance(data, list) and mdata:
breadcrumb = parent + ('items',)
data = [self.stripe_filter_data_by_metadata(d, metadata, breadcrumb) for d in data]
data = [self.stripe_filter_data_by_metadata(d, mdata, breadcrumb) for d in data]

return data

def stripe_transform(self, data, schema, metadata=None):
data = self.stripe_filter_data_by_metadata(data, metadata)
def stripe_transform(self, data, schema, mdata=None):
data = self.stripe_filter_data_by_metadata(data, mdata)

success, transformed_data = self.transform_recur(data, schema, [])
if not success:
Expand Down

0 comments on commit f4ee1d0

Please sign in to comment.