Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ disable =
# OK as we don't call in all PTransforms.
super-init-not-called,

[TYPECHECK]
generated-members =
# The transforms (e.g. Create) in beam declared in __all__ cannot be detected
# by pylint.
beam.*,
apache_beam.*,

[REPORTS]
# Tells whether to display a full report or only the messages
reports=no
Expand Down
2 changes: 1 addition & 1 deletion gcp_variant_transforms/transforms/partition_variants.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ def __init__(self, partition):
# type: (variant_partition.VariantPartition) -> None
self._partition = partition

def partition_for(self, variant, num_partitions):
def partition_for(self, variant, _):
# type: (vcfio.Variant, int) -> int
return self._partition.get_partition(variant.reference_name, variant.start)
4 changes: 2 additions & 2 deletions gcp_variant_transforms/transforms/partition_variants_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import unittest

from apache_beam import Partition
import apache_beam as beam
from apache_beam.testing.test_pipeline import TestPipeline
from apache_beam.testing.util import assert_that
from apache_beam.testing.util import equal_to
Expand Down Expand Up @@ -91,7 +91,7 @@ def test_partition_variants(self):
partitions = (
pipeline
| Create(variants)
| 'PartitionVariants' >> Partition(
| 'PartitionVariants' >> beam.Partition(
partition_variants.PartitionVariants(partitioner),
partitioner.get_num_partitions()))
for i in xrange(partitioner.get_num_partitions()):
Expand Down
8 changes: 4 additions & 4 deletions gcp_variant_transforms/transforms/variant_to_bigquery_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

import unittest

import apache_beam as beam
from apache_beam.io.gcp.internal.clients import bigquery
from apache_beam import ParDo
from apache_beam.testing.test_pipeline import TestPipeline
from apache_beam.testing.util import assert_that
from apache_beam.testing.util import equal_to
Expand Down Expand Up @@ -243,7 +243,7 @@ def test_convert_variant_to_bigquery_row(self):
bigquery_rows = (
pipeline
| Create([proc_var_1, proc_var_2, proc_var_3])
| 'ConvertToRow' >> ParDo(ConvertVariantToRow(
| 'ConvertToRow' >> beam.ParDo(ConvertVariantToRow(
self._row_generator)))
assert_that(bigquery_rows, equal_to([row_1, row_2, row_3]))
pipeline.run()
Expand All @@ -257,7 +257,7 @@ def test_convert_variant_to_bigquery_row_omit_empty_calls(self):
bigquery_rows = (
pipeline
| Create([proc_var])
| 'ConvertToRow' >> ParDo(ConvertVariantToRow(
| 'ConvertToRow' >> beam.ParDo(ConvertVariantToRow(
self._row_generator, omit_empty_sample_calls=True)))
assert_that(bigquery_rows, equal_to([row]))
pipeline.run()
Expand All @@ -272,7 +272,7 @@ def test_convert_variant_to_bigquery_row_allow_incompatible_recoreds(self):
bigquery_rows = (
pipeline
| Create([proc_var])
| 'ConvertToRow' >> ParDo(ConvertVariantToRow(
| 'ConvertToRow' >> beam.ParDo(ConvertVariantToRow(
self._row_generator, allow_incompatible_records=True)))
assert_that(bigquery_rows, equal_to([row]))
pipeline.run()