|
63 | 63 | s.replace( |
64 | 64 | library / f"google/cloud/bigquery_{library.name}/types/standard_sql.py", |
65 | 65 | r"type_ ", |
66 | | - "type " |
| 66 | + "type ", |
67 | 67 | ) |
68 | 68 |
|
69 | 69 | s.move( |
|
78 | 78 | "noxfile.py", |
79 | 79 | "setup.py", |
80 | 80 | f"scripts/fixup_bigquery_{library.name}_keywords.py", |
81 | | - f"google/cloud/bigquery/__init__.py", |
82 | | - f"google/cloud/bigquery/py.typed", |
| 81 | + "google/cloud/bigquery/__init__.py", |
| 82 | + "google/cloud/bigquery/py.typed", |
83 | 83 | # There are no public API endpoints for the generated ModelServiceClient, |
84 | 84 | # thus there's no point in generating it and its tests. |
85 | 85 | f"google/cloud/bigquery_{library.name}/services/**", |
|
93 | 93 | # Add templated files |
94 | 94 | # ---------------------------------------------------------------------------- |
95 | 95 | templated_files = common.py_library( |
96 | | - cov_level=100, |
97 | | - samples=True, |
98 | | - microgenerator=True, |
99 | | - split_system_tests=True, |
| 96 | + cov_level=100, samples=True, microgenerator=True, split_system_tests=True, |
100 | 97 | ) |
101 | 98 |
|
102 | 99 | # BigQuery has a custom multiprocessing note |
|
109 | 106 | # Include custom SNIPPETS_TESTS job for performance. |
110 | 107 | # https://github.com/googleapis/python-bigquery/issues/191 |
111 | 108 | ".kokoro/presubmit/presubmit.cfg", |
112 | | - ] |
| 109 | + ], |
113 | 110 | ) |
114 | 111 |
|
115 | 112 | # ---------------------------------------------------------------------------- |
|
121 | 118 | s.replace( |
122 | 119 | "docs/conf.py", |
123 | 120 | r'\{"members": True\}', |
124 | | - '{"members": True, "inherited-members": True}' |
125 | | -) |
126 | | - |
127 | | -# Tell Sphinx to ingore autogenerated docs files. |
128 | | -s.replace( |
129 | | - "docs/conf.py", |
130 | | - r'"samples/snippets/README\.rst",', |
131 | | - '\g<0>\n "bigquery_v2/services.rst", # generated by the code generator', |
| 121 | + '{"members": True, "inherited-members": True}', |
132 | 122 | ) |
133 | 123 |
|
134 | 124 | # ---------------------------------------------------------------------------- |
135 | 125 | # pytype-related changes |
136 | 126 | # ---------------------------------------------------------------------------- |
137 | 127 |
|
138 | 128 | # Add .pytype to .gitignore |
139 | | -s.replace(".gitignore", r"\.pytest_cache", "\g<0>\n.pytype") |
| 129 | +s.replace(".gitignore", r"\.pytest_cache", "\\g<0>\n.pytype") |
140 | 130 |
|
141 | 131 | # Add pytype config to setup.cfg |
142 | 132 | s.replace( |
143 | 133 | "setup.cfg", |
144 | 134 | r"universal = 1", |
145 | | - textwrap.dedent(""" \g<0> |
| 135 | + textwrap.dedent( |
| 136 | + """ \\g<0> |
146 | 137 |
|
147 | 138 | [pytype] |
148 | 139 | python_version = 3.8 |
149 | 140 | inputs = |
150 | 141 | google/cloud/ |
151 | 142 | exclude = |
152 | 143 | tests/ |
153 | | - google/cloud/bigquery_v2/ |
154 | 144 | output = .pytype/ |
155 | 145 | disable = |
156 | 146 | # There's some issue with finding some pyi files, thus disabling. |
157 | 147 | # The issue https://github.com/google/pytype/issues/150 is closed, but the |
158 | 148 | # error still occurs for some reason. |
159 | | - pyi-error""") |
| 149 | + pyi-error""" |
| 150 | + ), |
160 | 151 | ) |
161 | 152 |
|
162 | 153 | s.shell.run(["nox", "-s", "blacken"], hide_output=False) |
0 commit comments