def test_api_typed(): modules_list = [ tfa, tfa.activations, tfa.callbacks, tfa.image, tfa.losses, tfa.metrics, tfa.optimizers, tfa.rnn, tfa.seq2seq, tfa.text, ] # Files within this list will be exempt from verification. exception_list = [] help_message = ( "You can also take a look at the section about it in the CONTRIBUTING.md:\n" "https://github.com/tensorflow/addons/blob/master/CONTRIBUTING.md#about-type-hints" ) ensure_api_is_typed( modules_list, exception_list, init_only=True, additional_message=help_message, )
def test_api_surface_is_typed(): ensure_api_is_typed( [autokeras], EXCEPTION_LIST, init_only=True, additional_message=HELP_MESSAGE, )
def test_api_typed(): modules_list = [ tfa, tfa.activations, tfa.callbacks, tfa.image, tfa.losses, tfa.metrics, tfa.optimizers, tfa.rnn, tfa.seq2seq, tfa.text, ] # Files within this list will be exempt from verification. exception_list = [ tfa.rnn.PeepholeLSTMCell, ] if importlib.util.find_spec( "tensorflow.keras.optimizers.legacy") is not None: exception_list.append(tf.keras.optimizers.legacy.Optimizer) help_message = ( "You can also take a look at the section about it in the CONTRIBUTING.md:\n" "https://github.com/tensorflow/addons/blob/master/CONTRIBUTING.md#about-type-hints" ) ensure_api_is_typed(modules_list, exception_list, init_only=True, additional_message=help_message)
def test_api_typed(): modules_list = [] # Files within this list will be exempt from verification. exception_list = [] help_message = ( "You can also take a look at the section about it in the CONTRIBUTING.md:\n" "https://github.com/tensorflow/recommenders-addons/blob/master/CONTRIBUTING.md#about-type-hints" ) ensure_api_is_typed(modules_list, exception_list, init_only=True, additional_message=help_message)
TUTORIAL_URL = "https://docs.python.org/3/library/typing.html" HELP_MESSAGE = ( "You can also take a look at the section about it in the CONTRIBUTING.md:\n" "https://github.com/tensorflow/addons/blob/master/CONTRIBUTING.md#about-type-hints" ) # Files within this list will be exempt from verification. EXCEPTION_LIST = [] modules_list = [ tfa, tfa.activations, tfa.callbacks, tfa.image, tfa.losses, tfa.metrics, tfa.optimizers, tfa.rnn, tfa.seq2seq, tfa.text, ] if __name__ == "__main__": ensure_api_is_typed( modules_list, EXCEPTION_LIST, init_only=True, additional_message=HELP_MESSAGE, )