Runs the program with an optional 'main' function and 'argv' list.
(main=None, argv=None)
| 109 | |
| 110 | # @tf_export('app.run') |
| 111 | def run(main=None, argv=None): |
| 112 | """Runs the program with an optional 'main' function and 'argv' list.""" |
| 113 | |
| 114 | # Define help flags. |
| 115 | _define_help_flags() |
| 116 | |
| 117 | # Parse known flags. |
| 118 | argv = flags.FLAGS(_sys.argv if argv is None else argv, known_only=True) |
| 119 | |
| 120 | main = main or _sys.modules["__main__"].main |
| 121 | |
| 122 | # Call the main function, passing through any arguments |
| 123 | # to the final program. |
| 124 | _sys.exit(main(argv)) |
nothing calls this directly
no test coverage detected