Skip to content

Commit dacf5bb

Browse files
committed
pre-commit auto fixes
1 parent 5354698 commit dacf5bb

File tree

114 files changed

+46058
-40896
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+46058
-40896
lines changed

RELEASE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
* Enable passing `tf.saved_model.SaveOptions` to model saving functionality.
4646
* Census and sentiment examples updated to only use Keras instead of
4747
estimator.
48-
* Depends on `apache-beam[gcp]>=2.53.0,<3` for Python 3.11 and on
48+
* Depends on `apache-beam[gcp]>=2.53.0,<3` for Python 3.11 and on
4949
`apache-beam[gcp]>=2.47.0,<3` for 3.9 and 3.10.
5050
* Depends on `protobuf>=4.25.2,<5` for Python 3.11 and on `protobuf>3.20.3,<5`
5151
for 3.9 and 3.10.
@@ -1513,4 +1513,3 @@ the generated vocab_filename on a downstream component.
15131513
* Update tensorflow_transform to use `tf.saved_model` APIs.
15141514
* Add default values on example proto coder.
15151515
* Various performance and stability improvements.
1516-

docs/build_tft_beam_docs.py

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -25,51 +25,53 @@
2525
```
2626
2727
"""
28-
from absl import app
29-
from absl import flags
3028

31-
from tensorflow_docs.api_generator import doc_controls
32-
from tensorflow_docs.api_generator import generate_lib
33-
from tensorflow_docs.api_generator import public_api
34-
import tensorflow_transform.beam as tft_beam
29+
from absl import app, flags
30+
from tensorflow_docs.api_generator import doc_controls, generate_lib, public_api
3531

32+
import tensorflow_transform.beam as tft_beam
3633

37-
flags.DEFINE_string('output_dir', '/tmp/tft_beam_api/',
38-
'The path to output the files to')
34+
flags.DEFINE_string(
35+
"output_dir", "/tmp/tft_beam_api/", "The path to output the files to"
36+
)
3937

4038
flags.DEFINE_string(
41-
'code_url_prefix',
42-
'https://github.com/tensorflow/transform/tree/master/tensorflow_transform',
43-
'The url prefix for links to code.')
39+
"code_url_prefix",
40+
"https://github.com/tensorflow/transform/tree/master/tensorflow_transform",
41+
"The url prefix for links to code.",
42+
)
4443

45-
flags.DEFINE_bool('search_hints', True,
46-
'Include metadata search hints in the generated files')
44+
flags.DEFINE_bool(
45+
"search_hints", True, "Include metadata search hints in the generated files"
46+
)
4747

48-
flags.DEFINE_string('site_path', 'tfx/transform/api_docs/python',
49-
'Path prefix in the _toc.yaml')
48+
flags.DEFINE_string(
49+
"site_path", "tfx/transform/api_docs/python", "Path prefix in the _toc.yaml"
50+
)
5051

5152
FLAGS = flags.FLAGS
5253

5354

5455
def main(args):
55-
if args[1:]:
56-
raise ValueError('Unrecognized Command line args', args[1:])
56+
if args[1:]:
57+
raise ValueError("Unrecognized Command line args", args[1:])
5758

58-
doc_controls.do_not_generate_docs(tft_beam.analyzer_impls)
59+
doc_controls.do_not_generate_docs(tft_beam.analyzer_impls)
5960

60-
doc_generator = generate_lib.DocGenerator(
61-
root_title='TFT-Beam',
62-
py_modules=[('tft_beam', tft_beam)],
63-
code_url_prefix=FLAGS.code_url_prefix + '/beam',
64-
search_hints=FLAGS.search_hints,
65-
site_path=FLAGS.site_path,
66-
callbacks=[
67-
public_api.explicit_package_contents_filter,
68-
public_api.local_definitions_filter
69-
])
61+
doc_generator = generate_lib.DocGenerator(
62+
root_title="TFT-Beam",
63+
py_modules=[("tft_beam", tft_beam)],
64+
code_url_prefix=FLAGS.code_url_prefix + "/beam",
65+
search_hints=FLAGS.search_hints,
66+
site_path=FLAGS.site_path,
67+
callbacks=[
68+
public_api.explicit_package_contents_filter,
69+
public_api.local_definitions_filter,
70+
],
71+
)
7072

71-
doc_generator.build(FLAGS.output_dir)
73+
doc_generator.build(FLAGS.output_dir)
7274

7375

74-
if __name__ == '__main__':
75-
app.run(main)
76+
if __name__ == "__main__":
77+
app.run(main)

docs/build_tft_docs.py

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -25,45 +25,46 @@
2525
```
2626
2727
"""
28-
from absl import app
29-
from absl import flags
3028

31-
from tensorflow_docs.api_generator import generate_lib
32-
from tensorflow_docs.api_generator import public_api
33-
import tensorflow_transform as transform
29+
from absl import app, flags
30+
from tensorflow_docs.api_generator import generate_lib, public_api
3431

32+
import tensorflow_transform as transform
3533

36-
flags.DEFINE_string('output_dir', '/tmp/tft_api/',
37-
'The path to output the files to')
34+
flags.DEFINE_string("output_dir", "/tmp/tft_api/", "The path to output the files to")
3835

3936
flags.DEFINE_string(
40-
'code_url_prefix',
41-
'https://github.com/tensorflow/transform/tree/master/tensorflow_transform',
42-
'The url prefix for links to code.')
37+
"code_url_prefix",
38+
"https://github.com/tensorflow/transform/tree/master/tensorflow_transform",
39+
"The url prefix for links to code.",
40+
)
4341

44-
flags.DEFINE_bool('search_hints', True,
45-
'Include metadata search hints in the generated files')
42+
flags.DEFINE_bool(
43+
"search_hints", True, "Include metadata search hints in the generated files"
44+
)
4645

47-
flags.DEFINE_string('site_path', 'tfx/transform/api_docs/python',
48-
'Path prefix in the _toc.yaml')
46+
flags.DEFINE_string(
47+
"site_path", "tfx/transform/api_docs/python", "Path prefix in the _toc.yaml"
48+
)
4949

5050
FLAGS = flags.FLAGS
5151

5252

5353
def main(args):
54-
if args[1:]:
55-
raise ValueError('Unrecognized Command line args', args[1:])
54+
if args[1:]:
55+
raise ValueError("Unrecognized Command line args", args[1:])
5656

57-
doc_generator = generate_lib.DocGenerator(
58-
root_title='TF-Transform',
59-
py_modules=[('tft', transform)],
60-
code_url_prefix=FLAGS.code_url_prefix,
61-
search_hints=FLAGS.search_hints,
62-
site_path=FLAGS.site_path,
63-
callbacks=[public_api.explicit_package_contents_filter])
57+
doc_generator = generate_lib.DocGenerator(
58+
root_title="TF-Transform",
59+
py_modules=[("tft", transform)],
60+
code_url_prefix=FLAGS.code_url_prefix,
61+
search_hints=FLAGS.search_hints,
62+
site_path=FLAGS.site_path,
63+
callbacks=[public_api.explicit_package_contents_filter],
64+
)
6465

65-
doc_generator.build(FLAGS.output_dir)
66+
doc_generator.build(FLAGS.output_dir)
6667

6768

68-
if __name__ == '__main__':
69-
app.run(main)
69+
if __name__ == "__main__":
70+
app.run(main)

0 commit comments

Comments
 (0)