s/AutographParseError/AutoGraphParseError/ (properly camel-casing AutoGraph.)

PiperOrigin-RevId: 229754536
This commit is contained in:
A. Unique TensorFlower 2019-01-17 08:46:54 -08:00 committed by TensorFlower Gardener
parent f01d357ca3
commit 890a58c432
5 changed files with 8 additions and 8 deletions

View File

@ -50,7 +50,7 @@ from tensorflow.python.autograph.lang.directives import set_element_type
from tensorflow.python.autograph.lang.directives import set_loop_options
from tensorflow.python.autograph.lang.special_functions import stack
from tensorflow.python.autograph.lang.special_functions import tensor_list
from tensorflow.python.autograph.pyct.transformer import AutographParseError
from tensorflow.python.autograph.pyct.transformer import AutoGraphParseError
from tensorflow.python.util.all_util import remove_undocumented
# TODO(mdan): Revisit this list once we finalize the generated code mechanism.
@ -77,7 +77,7 @@ _allowed_symbols = [
'stack',
'tensor_list',
# Exceptions
'AutographParseError',
'AutoGraphParseError',
# Utilities: to be removed
'utils',
]

View File

@ -184,7 +184,7 @@ class ControlFlowTest(converter_testing.TestCase):
return b
node, ctx = self.prepare(test_fn, {})
with self.assertRaises(transformer.AutographParseError):
with self.assertRaises(transformer.AutoGraphParseError):
control_flow.transform(node, ctx)
@test_util.run_deprecated_v1

View File

@ -121,7 +121,7 @@ class DecoratorsTest(converter_testing.TestCase):
return inner_fn(a)
# Expected to fail because simple_decorator could not be imported.
with self.assertRaises(transformer.AutographParseError):
with self.assertRaises(transformer.AutoGraphParseError):
test_fn(1)
def test_nested_decorators_imported(self):

View File

@ -68,7 +68,7 @@ class SliceTest(converter_testing.TestCase):
def_.directives[directives.set_element_type] = {
'dtype': parser.parse_expression('tf.float32')
}
with self.assertRaises(transformer.AutographParseError):
with self.assertRaises(transformer.AutoGraphParseError):
slices.transform(node, ctx)

View File

@ -29,7 +29,7 @@ from tensorflow.python.autograph.pyct import pretty_printer
from tensorflow.python.autograph.pyct import templates
class AutographParseError(SyntaxError):
class AutoGraphParseError(SyntaxError):
pass
@ -495,8 +495,8 @@ class Base(gast.NodeTransformer):
# In other words, we need to find how to suppress the "During handling
# of the above exception, another exception occurred" message.
six.reraise(
AutographParseError,
AutographParseError(msg, (original_file_path, original_line_number,
AutoGraphParseError,
AutoGraphParseError(msg, (original_file_path, original_line_number,
original_col_offset, original_source_line)),
sys.exc_info()[2])
finally: