Skip to content

Commit e61b5fc

Browse files
yoshi-automationbusunkim96
authored andcommitted
feat: add AnalyzeIamPolicy and ExportIamPolicyAnalysis; support OSInventory; add common resource helper methods; expose client transport (#113)
* changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * chore: upgrade to gapic-generator-python 0.35.6 PiperOrigin-RevId: 338157137 Source-Author: Google APIs <[email protected]> Source-Date: Tue Oct 20 16:08:47 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: c7331b75b0b7bbd614373b7d37085db1c80dd4be Source-Link: googleapis/googleapis@c7331b7 * chore: upgrade to gapic-generator-python 0.35.6 PiperOrigin-RevId: 338489505 Source-Author: Google APIs <[email protected]> Source-Date: Thu Oct 22 09:36:18 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 4b34a0869404af9d83ae89952d28712a4d29eba6 Source-Link: googleapis/googleapis@4b34a08 * fix: switch firestore/v1 to grpc_service_config PiperOrigin-RevId: 338520351 Source-Author: Google APIs <[email protected]> Source-Date: Thu Oct 22 12:01:06 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: b448d7dce89eebc3a4066a9e979a0b96bdb66b62 Source-Link: googleapis/googleapis@b448d7d * docs: renamed App + Web to Google Analytics 4 (GA4) in public documentation PiperOrigin-RevId: 338527875 Source-Author: Google APIs <[email protected]> Source-Date: Thu Oct 22 12:36:23 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 2131e2f755b3c2604e2d08de81a299fd7e377dcd Source-Link: googleapis/googleapis@2131e2f * chore: update grpc dependency to v1.33.1 PiperOrigin-RevId: 338646463 Source-Author: Google APIs <[email protected]> Source-Date: Fri Oct 23 03:57:15 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 20b11dfe4538cd5da7b4c3dd7d2bf5b9922ff3ed Source-Link: googleapis/googleapis@20b11df * fix!: update package names to avoid conflict with google-cloud-bigquery BREAKING CHANGE: update package names to avoid conflict with google-cloud-bigquery The google-cloud-bigquery package uses the `google.cloud.bigquery` path as a plain Python module, not a namespace package. When this package and google-cloud-bigquery are installed in the same environment, conflicts can result. PiperOrigin-RevId: 339048690 Source-Author: Google APIs <[email protected]> Source-Date: Mon Oct 26 09:00:37 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 3c8c2d81369c4665824b20706426b018507415f7 Source-Link: googleapis/googleapis@3c8c2d8 * chore: upgrade to gapic-generator 0.35.9 PiperOrigin-RevId: 339292950 Source-Author: Google APIs <[email protected]> Source-Date: Tue Oct 27 11:32:46 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 07d41a7e5cade45aba6f0d277c89722b48f2c956 Source-Link: googleapis/googleapis@07d41a7 * feat: add AnalyzeIamPolicy and AnalyzeIamPolicyLongrunning RPCs PiperOrigin-RevId: 339708980 Source-Author: Google APIs <[email protected]> Source-Date: Thu Oct 29 11:23:44 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 00bbad4dfd6633cf4b5f9596c1f93b756bb5c776 Source-Link: googleapis/googleapis@00bbad4 * feat: added support OSInventory in Assets. docs: updated existing docs. Clients receive detailed OSInventory in Assets. PiperOrigin-RevId: 342689216 Source-Author: Google APIs <[email protected]> Source-Date: Mon Nov 16 12:04:29 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: 1f8a5144b52f7677dc43c55b21ccaf9e1b425ceb Source-Link: googleapis/googleapis@1f8a514 * fix: remove parse_asset_path, regen * build: fix sync-repo-settings * chore: fix coverage Co-authored-by: Bu Sun Kim <[email protected]>
1 parent cd0cc5c commit e61b5fc

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

asset/snippets/snippets/noxfile.py

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939
# You can opt out from the test for specific Python versions.
4040
'ignored_versions': ["2.7"],
4141

42+
# Old samples are opted out of enforcing Python type hints
43+
# All new samples should feature them
44+
'enforce_type_hints': False,
45+
4246
# An envvar key for determining the project id to use. Change it
4347
# to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
4448
# build specific Cloud project. You can also use your own string
@@ -132,7 +136,10 @@ def _determine_local_import_names(start_dir):
132136

133137
@nox.session
134138
def lint(session):
135-
session.install("flake8", "flake8-import-order")
139+
if not TEST_CONFIG['enforce_type_hints']:
140+
session.install("flake8", "flake8-import-order")
141+
else:
142+
session.install("flake8", "flake8-import-order", "flake8-annotations")
136143

137144
local_names = _determine_local_import_names(".")
138145
args = FLAKE8_COMMON_ARGS + [
@@ -141,8 +148,18 @@ def lint(session):
141148
"."
142149
]
143150
session.run("flake8", *args)
151+
#
152+
# Black
153+
#
144154

145155

156+
@nox.session
157+
def blacken(session):
158+
session.install("black")
159+
python_files = [path for path in os.listdir(".") if path.endswith(".py")]
160+
161+
session.run("black", *python_files)
162+
146163
#
147164
# Sample Tests
148165
#
@@ -201,6 +218,11 @@ def _get_repo_root():
201218
break
202219
if Path(p / ".git").exists():
203220
return str(p)
221+
# .git is not available in repos cloned via Cloud Build
222+
# setup.py is always in the library's root, so use that instead
223+
# https://github.com/googleapis/synthtool/issues/792
224+
if Path(p / "setup.py").exists():
225+
return str(p)
204226
p = p.parent
205227
raise Exception("Unable to detect repository root.")
206228

0 commit comments

Comments
 (0)