Skip to content

Commit 01fc1d5

Browse files
authored
Merge pull request #1209 from andrewsg/flake8
Ignore Flake8 import order error I202 to accommodate region tags
2 parents 9c54bb2 + 05861e4 commit 01fc1d5

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

iot/api-client/manager/manager_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
from google.cloud import pubsub
1919
import pytest
20+
2021
import manager
2122

2223
cloud_region = 'us-central1'

language/cloud-client/v1/snippets.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
from google.cloud import language
2828
from google.cloud.language import enums
2929
from google.cloud.language import types
30-
3130
import six
3231

3332

nox.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,15 @@ def _setup_appengine_sdk(session):
135135

136136
PYTEST_COMMON_ARGS = []
137137

138+
# Ignore I202 "Additional newline in a section of imports." to accommodate
139+
# region tags in import blocks. Since we specify an explicit ignore, we also
140+
# have to explicitly ignore the list of default ignores:
141+
# `E121,E123,E126,E226,E24,E704,W503,W504` as shown by `flake8 --help`.
138142
FLAKE8_COMMON_ARGS = [
139143
'--show-source', '--builtin', 'gettext', '--max-complexity', '20',
140144
'--import-order-style', 'google',
141145
'--exclude', '.nox,.cache,env,lib,generated_pb2,*_pb2.py,*_pb2_grpc.py',
146+
'--ignore=E121,E123,E126,E226,E24,E704,W503,W504,I202',
142147
]
143148

144149

0 commit comments

Comments
 (0)