Skip to content

Commit 3dc1a28

Browse files
committed
fix lint issue
1 parent a3207b7 commit 3dc1a28

File tree

2 files changed

+23
-11
lines changed

2 files changed

+23
-11
lines changed

.librarian/generator-input/client-post-processing/pubsub-integration.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -499,10 +499,11 @@ replacements:
499499
count: 1
500500
- paths:
501501
- "packages/google-cloud-pubsub/noxfile.py"
502-
before: '@nox\.session\(python=ALL_PYTHON\)\ndef mypy\(session\):[\s\S]+?(?=\n@nox\.session\ndef update_lower_bounds\(session\):)'
502+
before: '@nox\.session\(python=ALL_PYTHON\)\ndef mypy\(session\):[\s\S]+?\n(@nox\.session\ndef update_lower_bounds\(session\):)'
503503
after: |-
504504
MYPY_VERSION = "mypy==1.10.0"
505505
506+
506507
@nox.session(python=DEFAULT_PYTHON_VERSION)
507508
def mypy(session):
508509
"""Run type checks with mypy."""
@@ -512,7 +513,9 @@ replacements:
512513
# Version 2.1.1 of google-api-core version is the first type-checked release.
513514
# Version 2.2.0 of google-cloud-core version is the first type-checked release.
514515
session.install(
515-
"google-api-core[grpc]>=2.1.1", "google-cloud-core>=2.2.0", "types-requests"
516+
"google-api-core[grpc]>=2.1.1",
517+
"google-cloud-core>=2.2.0",
518+
"types-requests",
516519
)
517520
518521
# Just install the type info directly, since "mypy --install-types" might
@@ -540,7 +543,10 @@ replacements:
540543
# Just install the type info directly, since "mypy --install-types" might
541544
# require an additional pass.
542545
session.install(
543-
"types-mock", "types-protobuf", "types-setuptools", "types-requests"
546+
"types-mock",
547+
"types-protobuf",
548+
"types-setuptools",
549+
"types-requests",
544550
)
545551
546552
session.run(
@@ -551,6 +557,8 @@ replacements:
551557
"samples/",
552558
)
553559
560+
561+
\g<1>
554562
count: 1
555563
- paths:
556564
- "packages/google-cloud-pubsub/noxfile.py"
@@ -568,9 +576,7 @@ replacements:
568576
before: 'def core_deps_from_source\(session, protobuf_implementation\):[\s\S]+?PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,\n[ \t]+},\n[ \t]+\)'
569577
after: |-
570578
def core_deps_from_source(session, protobuf_implementation):
571-
"""
572-
Skipping until Pub/Sub migration is complete.
573-
"""
579+
"""Skipping until Pub/Sub migration is complete."""
574580
session.skip("Skipping core_deps_from_source for google-cloud-pubsub.")
575581
count: 1
576582
- paths:

packages/google-cloud-pubsub/noxfile.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106

107107
MYPY_VERSION = "mypy==1.10.0"
108108

109+
109110
@nox.session(python=DEFAULT_PYTHON_VERSION)
110111
def mypy(session):
111112
"""Run type checks with mypy."""
@@ -115,7 +116,9 @@ def mypy(session):
115116
# Version 2.1.1 of google-api-core version is the first type-checked release.
116117
# Version 2.2.0 of google-cloud-core version is the first type-checked release.
117118
session.install(
118-
"google-api-core[grpc]>=2.1.1", "google-cloud-core>=2.2.0", "types-requests"
119+
"google-api-core[grpc]>=2.1.1",
120+
"google-cloud-core>=2.2.0",
121+
"types-requests",
119122
)
120123

121124
# Just install the type info directly, since "mypy --install-types" might
@@ -143,7 +146,10 @@ def mypy_samples(session):
143146
# Just install the type info directly, since "mypy --install-types" might
144147
# require an additional pass.
145148
session.install(
146-
"types-mock", "types-protobuf", "types-setuptools", "types-requests"
149+
"types-mock",
150+
"types-protobuf",
151+
"types-setuptools",
152+
"types-requests",
147153
)
148154

149155
session.run(
@@ -153,6 +159,8 @@ def mypy_samples(session):
153159
"--no-incremental", # Required by warn-unused-configs from mypy.ini to work
154160
"samples/",
155161
)
162+
163+
156164
@nox.session
157165
def update_lower_bounds(session):
158166
"""Update lower bounds in constraints.txt to match setup.py"""
@@ -623,7 +631,5 @@ def prerelease_deps(session, protobuf_implementation):
623631
["python", "upb"],
624632
)
625633
def core_deps_from_source(session, protobuf_implementation):
626-
"""
627-
Skipping until Pub/Sub migration is complete.
628-
"""
634+
"""Skipping until Pub/Sub migration is complete."""
629635
session.skip("Skipping core_deps_from_source for google-cloud-pubsub.")

0 commit comments

Comments
 (0)