Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
review comment
  • Loading branch information
jrmccluskey committed Apr 23, 2026
commit 4150c07f67dbdfc23712339f01e61bbc7c1fe7f9
10 changes: 2 additions & 8 deletions sdks/python/apache_beam/typehints/typehints.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
# pytype: skip-file

import copy
import functools
import logging
import types
import typing
Expand Down Expand Up @@ -1486,12 +1485,6 @@ def normalize(x, none_as_type=False):
})


@functools.lru_cache(maxsize=128)
def _is_beartype_disabled(options):
from apache_beam.options.pipeline_options import TypeOptions
return options.view_as(TypeOptions).disable_beartype


def is_consistent_with(
sub, base, use_beartype: typing.Optional[bool] = None) -> bool:
"""Checks whether sub a is consistent with base.
Expand All @@ -1506,7 +1499,8 @@ def is_consistent_with(
from apache_beam.options.pipeline_options_context import get_pipeline_options
options = get_pipeline_options()
if options:
use_beartype = not _is_beartype_disabled(options)
from apache_beam.options.pipeline_options import TypeOptions
use_beartype = not options.view_as(TypeOptions).disable_beartype
else:
use_beartype = True

Expand Down
Loading