Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 15, 2025. It is now read-only.

chore(python): use black==22.3.0 #111

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:09af371bb7d8ebbaef620bfc76c0a3a42da96d75f4821409b54f3466d4ebbd3c
digest: sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe
5 changes: 4 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,10 @@
intersphinx_mapping = {
"python": ("https://python.readthedocs.org/en/latest/", None),
"google-auth": ("https://googleapis.dev/python/google-auth/latest/", None),
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,),
"google.api_core": (
"https://googleapis.dev/python/google-api-core/latest/",
None,
),
"grpc": ("https://grpc.github.io/grpc/python/", None),
"proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None),
"protobuf": ("https://googleapis.dev/python/protobuf/latest/", None),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@

_SERVICEPERIMETER = DESCRIPTOR.message_types_by_name["ServicePerimeter"]
_SERVICEPERIMETERCONFIG = DESCRIPTOR.message_types_by_name["ServicePerimeterConfig"]
_SERVICEPERIMETERCONFIG_VPCACCESSIBLESERVICES = _SERVICEPERIMETERCONFIG.nested_types_by_name[
"VpcAccessibleServices"
]
_SERVICEPERIMETERCONFIG_VPCACCESSIBLESERVICES = (
_SERVICEPERIMETERCONFIG.nested_types_by_name["VpcAccessibleServices"]
)
_SERVICEPERIMETER_PERIMETERTYPE = _SERVICEPERIMETER.enum_types_by_name["PerimeterType"]
ServicePerimeter = _reflection.GeneratedProtocolMessageType(
"ServicePerimeter",
Expand Down
13 changes: 9 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import nox


BLACK_VERSION = "black==19.10b0"
BLACK_VERSION = "black==22.3.0"
BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]

DEFAULT_PYTHON_VERSION = "3.8"
Expand Down Expand Up @@ -57,7 +57,9 @@ def lint(session):
"""
session.install("flake8", BLACK_VERSION)
session.run(
"black", "--check", *BLACK_PATHS,
"black",
"--check",
*BLACK_PATHS,
)
session.run("flake8", "google", "tests")

Expand All @@ -67,7 +69,8 @@ def blacken(session):
"""Run black. Format code to uniform standard."""
session.install(BLACK_VERSION)
session.run(
"black", *BLACK_PATHS,
"black",
*BLACK_PATHS,
)


Expand Down Expand Up @@ -119,7 +122,9 @@ def unit(session):

@nox.session(python=["3.6", "3.7", "3.8", "3.9"])
@nox.parametrize(
"library", ["python-asset"], ids=["asset"],
"library",
["python-asset"],
ids=["asset"],
)
def test(session, library):
"""Run tests from a downstream libraries.
Expand Down