Skip to content

Commit cee9a30

Browse files
Added parentheses (#19853) (#19854)
1 parent 20b1664 commit cee9a30

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

airflow/_vendor/connexion/apis/flask_api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def _build_response(cls, mimetype, content_type=None, headers=None, status_code=
186186
def _serialize_data(cls, data, mimetype):
187187
# TODO: harmonize flask and aiohttp serialization when mimetype=None or mimetype is not JSON
188188
# (cases where it might not make sense to jsonify the data)
189-
if (isinstance(mimetype, str) and is_json_mimetype(mimetype)):
189+
if isinstance(mimetype, str) and is_json_mimetype(mimetype):
190190
body = cls.jsonifier.dumps(data)
191191
elif not (isinstance(data, bytes) or isinstance(data, str)):
192192
warnings.warn(

airflow/_vendor/connexion/decorators/uri_parsing.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def resolve_params(self, params, _in):
108108
# multiple values in a path is impossible
109109
values = [values]
110110

111-
if (param_schema is not None and param_schema['type'] == 'array'):
111+
if param_schema is not None and param_schema['type'] == 'array':
112112
# resolve variable re-assignment, handle explode
113113
values = self._resolve_param_duplicates(values, param_defn, _in)
114114
# handle array styles
@@ -186,15 +186,15 @@ def _make_deep_object(k, v):
186186
"""
187187
root_key = k.split("[", 1)[0]
188188
if k == root_key:
189-
return (k, v, False)
189+
return k, v, False
190190
key_path = re.findall(r'\[([^\[\]]*)\]', k)
191191
root = prev = node = {}
192192
for k in key_path:
193193
node[k] = {}
194194
prev = node
195195
node = node[k]
196196
prev[k] = v[0]
197-
return (root_key, [root], True)
197+
return root_key, [root], True
198198

199199
def _preprocess_deep_objects(self, query_data):
200200
""" deep objects provide a way of rendering nested objects using query

airflow/_vendor/connexion/operations/openapi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def example_response(self, status_code=None, content_type=None):
210210
return (self._nested_example(deep_get(self._responses, schema_path)),
211211
status_code)
212212
except KeyError:
213-
return (None, status_code)
213+
return None, status_code
214214

215215
def _nested_example(self, schema):
216216
try:

airflow/_vendor/connexion/operations/swagger2.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def example_response(self, status_code=None, *args, **kwargs):
203203
return (self._nested_example(deep_get(self._responses, schema_path)),
204204
status_code)
205205
except KeyError:
206-
return (None, status_code)
206+
return None, status_code
207207

208208
def _nested_example(self, schema):
209209
try:

0 commit comments

Comments
 (0)