Skip to content

Commit 093d227

Browse files
committed
ignore line length
1 parent 0e66fc3 commit 093d227

File tree

8 files changed

+56
-0
lines changed

8 files changed

+56
-0
lines changed

gapic/templates/noxfile.py.j2

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ FORMAT_PATHS = ["docs", "{{ api.naming.versioned_module_name }}", "tests", "setu
2323
LINT_PATHS = ["docs", "{{ api.naming.versioned_module_name }}", "tests", "noxfile.py", "setup.py"]
2424
{% endif %}
2525

26+
# We're most interested in ensuring that code is formatted properly
27+
# and less concerned about the line length.
28+
LINT_LINE_LENGTH = 150
29+
2630
# Add samples to the list of directories to format if the directory exists.
2731
if os.path.isdir("samples"):
2832
LINT_PATHS.append("samples")
@@ -155,6 +159,7 @@ def lint(session):
155159
"black",
156160
"--check",
157161
*LINT_PATHS,
162+
f"--line-length={LINT_LINE_LENGTH}",
158163
)
159164
160165
{% if api.naming.module_namespace %}
@@ -171,6 +176,7 @@ def blacken(session):
171176
session.run(
172177
"black",
173178
*FORMAT_PATHS,
179+
f"--line-length={LINT_LINE_LENGTH}",
174180
)
175181

176182

@@ -191,6 +197,7 @@ def format(session):
191197
session.run(
192198
"black",
193199
*FORMAT_PATHS,
200+
f"--line-length={LINT_LINE_LENGTH}",
194201
)
195202

196203

tests/integration/goldens/asset/noxfile.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
FORMAT_PATHS = ["docs", "google", "tests", "setup.py"]
3030
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
3131

32+
# We're most interested in ensuring that code is formatted properly
33+
# and less concerned about the line length.
34+
LINT_LINE_LENGTH = 150
35+
3236
# Add samples to the list of directories to format if the directory exists.
3337
if os.path.isdir("samples"):
3438
LINT_PATHS.append("samples")
@@ -157,6 +161,7 @@ def lint(session):
157161
"black",
158162
"--check",
159163
*LINT_PATHS,
164+
f"--line-length={LINT_LINE_LENGTH}",
160165
)
161166

162167
session.run("flake8", "google", "tests")
@@ -169,6 +174,7 @@ def blacken(session):
169174
session.run(
170175
"black",
171176
*FORMAT_PATHS,
177+
f"--line-length={LINT_LINE_LENGTH}",
172178
)
173179

174180

@@ -189,6 +195,7 @@ def format(session):
189195
session.run(
190196
"black",
191197
*FORMAT_PATHS,
198+
f"--line-length={LINT_LINE_LENGTH}",
192199
)
193200

194201

tests/integration/goldens/credentials/noxfile.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
FORMAT_PATHS = ["docs", "google", "tests", "setup.py"]
3030
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
3131

32+
# We're most interested in ensuring that code is formatted properly
33+
# and less concerned about the line length.
34+
LINT_LINE_LENGTH = 150
35+
3236
# Add samples to the list of directories to format if the directory exists.
3337
if os.path.isdir("samples"):
3438
LINT_PATHS.append("samples")
@@ -157,6 +161,7 @@ def lint(session):
157161
"black",
158162
"--check",
159163
*LINT_PATHS,
164+
f"--line-length={LINT_LINE_LENGTH}",
160165
)
161166

162167
session.run("flake8", "google", "tests")
@@ -169,6 +174,7 @@ def blacken(session):
169174
session.run(
170175
"black",
171176
*FORMAT_PATHS,
177+
f"--line-length={LINT_LINE_LENGTH}",
172178
)
173179

174180

@@ -189,6 +195,7 @@ def format(session):
189195
session.run(
190196
"black",
191197
*FORMAT_PATHS,
198+
f"--line-length={LINT_LINE_LENGTH}",
192199
)
193200

194201

tests/integration/goldens/eventarc/noxfile.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
FORMAT_PATHS = ["docs", "google", "tests", "setup.py"]
3030
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
3131

32+
# We're most interested in ensuring that code is formatted properly
33+
# and less concerned about the line length.
34+
LINT_LINE_LENGTH = 150
35+
3236
# Add samples to the list of directories to format if the directory exists.
3337
if os.path.isdir("samples"):
3438
LINT_PATHS.append("samples")
@@ -157,6 +161,7 @@ def lint(session):
157161
"black",
158162
"--check",
159163
*LINT_PATHS,
164+
f"--line-length={LINT_LINE_LENGTH}",
160165
)
161166

162167
session.run("flake8", "google", "tests")
@@ -169,6 +174,7 @@ def blacken(session):
169174
session.run(
170175
"black",
171176
*FORMAT_PATHS,
177+
f"--line-length={LINT_LINE_LENGTH}",
172178
)
173179

174180

@@ -189,6 +195,7 @@ def format(session):
189195
session.run(
190196
"black",
191197
*FORMAT_PATHS,
198+
f"--line-length={LINT_LINE_LENGTH}",
192199
)
193200

194201

tests/integration/goldens/logging/noxfile.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
FORMAT_PATHS = ["docs", "google", "tests", "setup.py"]
3030
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
3131

32+
# We're most interested in ensuring that code is formatted properly
33+
# and less concerned about the line length.
34+
LINT_LINE_LENGTH = 150
35+
3236
# Add samples to the list of directories to format if the directory exists.
3337
if os.path.isdir("samples"):
3438
LINT_PATHS.append("samples")
@@ -157,6 +161,7 @@ def lint(session):
157161
"black",
158162
"--check",
159163
*LINT_PATHS,
164+
f"--line-length={LINT_LINE_LENGTH}",
160165
)
161166

162167
session.run("flake8", "google", "tests")
@@ -169,6 +174,7 @@ def blacken(session):
169174
session.run(
170175
"black",
171176
*FORMAT_PATHS,
177+
f"--line-length={LINT_LINE_LENGTH}",
172178
)
173179

174180

@@ -189,6 +195,7 @@ def format(session):
189195
session.run(
190196
"black",
191197
*FORMAT_PATHS,
198+
f"--line-length={LINT_LINE_LENGTH}",
192199
)
193200

194201

tests/integration/goldens/logging_internal/noxfile.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
FORMAT_PATHS = ["docs", "google", "tests", "setup.py"]
3030
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
3131

32+
# We're most interested in ensuring that code is formatted properly
33+
# and less concerned about the line length.
34+
LINT_LINE_LENGTH = 150
35+
3236
# Add samples to the list of directories to format if the directory exists.
3337
if os.path.isdir("samples"):
3438
LINT_PATHS.append("samples")
@@ -157,6 +161,7 @@ def lint(session):
157161
"black",
158162
"--check",
159163
*LINT_PATHS,
164+
f"--line-length={LINT_LINE_LENGTH}",
160165
)
161166

162167
session.run("flake8", "google", "tests")
@@ -169,6 +174,7 @@ def blacken(session):
169174
session.run(
170175
"black",
171176
*FORMAT_PATHS,
177+
f"--line-length={LINT_LINE_LENGTH}",
172178
)
173179

174180

@@ -189,6 +195,7 @@ def format(session):
189195
session.run(
190196
"black",
191197
*FORMAT_PATHS,
198+
f"--line-length={LINT_LINE_LENGTH}",
192199
)
193200

194201

tests/integration/goldens/redis/noxfile.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
FORMAT_PATHS = ["docs", "google", "tests", "setup.py"]
3030
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
3131

32+
# We're most interested in ensuring that code is formatted properly
33+
# and less concerned about the line length.
34+
LINT_LINE_LENGTH = 150
35+
3236
# Add samples to the list of directories to format if the directory exists.
3337
if os.path.isdir("samples"):
3438
LINT_PATHS.append("samples")
@@ -157,6 +161,7 @@ def lint(session):
157161
"black",
158162
"--check",
159163
*LINT_PATHS,
164+
f"--line-length={LINT_LINE_LENGTH}",
160165
)
161166

162167
session.run("flake8", "google", "tests")
@@ -169,6 +174,7 @@ def blacken(session):
169174
session.run(
170175
"black",
171176
*FORMAT_PATHS,
177+
f"--line-length={LINT_LINE_LENGTH}",
172178
)
173179

174180

@@ -189,6 +195,7 @@ def format(session):
189195
session.run(
190196
"black",
191197
*FORMAT_PATHS,
198+
f"--line-length={LINT_LINE_LENGTH}",
192199
)
193200

194201

tests/integration/goldens/redis_selective/noxfile.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
FORMAT_PATHS = ["docs", "google", "tests", "setup.py"]
3030
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
3131

32+
# We're most interested in ensuring that code is formatted properly
33+
# and less concerned about the line length.
34+
LINT_LINE_LENGTH = 150
35+
3236
# Add samples to the list of directories to format if the directory exists.
3337
if os.path.isdir("samples"):
3438
LINT_PATHS.append("samples")
@@ -157,6 +161,7 @@ def lint(session):
157161
"black",
158162
"--check",
159163
*LINT_PATHS,
164+
f"--line-length={LINT_LINE_LENGTH}",
160165
)
161166

162167
session.run("flake8", "google", "tests")
@@ -169,6 +174,7 @@ def blacken(session):
169174
session.run(
170175
"black",
171176
*FORMAT_PATHS,
177+
f"--line-length={LINT_LINE_LENGTH}",
172178
)
173179

174180

@@ -189,6 +195,7 @@ def format(session):
189195
session.run(
190196
"black",
191197
*FORMAT_PATHS,
198+
f"--line-length={LINT_LINE_LENGTH}",
192199
)
193200

194201

0 commit comments

Comments
 (0)