You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by as...@apache.org on 2021/11/29 11:30:34 UTC
[airflow] 01/01: Revert "Added parentheses (#19853) (#19854)"
This is an automated email from the ASF dual-hosted git repository.
ash pushed a commit to branch revert-19854-addparenth
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 5423797d287775a7ddb2c719744bba4c1f162949
Author: Ash Berlin-Taylor <as...@firemirror.com>
AuthorDate: Mon Nov 29 11:30:08 2021 +0000
Revert "Added parentheses (#19853) (#19854)"
This reverts commit cee9a3063e319f87f0377d14494935561c353609.
---
airflow/_vendor/connexion/apis/flask_api.py | 2 +-
airflow/_vendor/connexion/decorators/uri_parsing.py | 6 +++---
airflow/_vendor/connexion/operations/openapi.py | 2 +-
airflow/_vendor/connexion/operations/swagger2.py | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/airflow/_vendor/connexion/apis/flask_api.py b/airflow/_vendor/connexion/apis/flask_api.py
index 4bf877d..b292153 100644
--- a/airflow/_vendor/connexion/apis/flask_api.py
+++ b/airflow/_vendor/connexion/apis/flask_api.py
@@ -186,7 +186,7 @@ class FlaskApi(AbstractAPI):
def _serialize_data(cls, data, mimetype):
# TODO: harmonize flask and aiohttp serialization when mimetype=None or mimetype is not JSON
# (cases where it might not make sense to jsonify the data)
- if isinstance(mimetype, str) and is_json_mimetype(mimetype):
+ if (isinstance(mimetype, str) and is_json_mimetype(mimetype)):
body = cls.jsonifier.dumps(data)
elif not (isinstance(data, bytes) or isinstance(data, str)):
warnings.warn(
diff --git a/airflow/_vendor/connexion/decorators/uri_parsing.py b/airflow/_vendor/connexion/decorators/uri_parsing.py
index 3882ef0..340ecae 100644
--- a/airflow/_vendor/connexion/decorators/uri_parsing.py
+++ b/airflow/_vendor/connexion/decorators/uri_parsing.py
@@ -108,7 +108,7 @@ class AbstractURIParser(BaseDecorator, metaclass=abc.ABCMeta):
# multiple values in a path is impossible
values = [values]
- if param_schema is not None and param_schema['type'] == 'array':
+ if (param_schema is not None and param_schema['type'] == 'array'):
# resolve variable re-assignment, handle explode
values = self._resolve_param_duplicates(values, param_defn, _in)
# handle array styles
@@ -186,7 +186,7 @@ class OpenAPIURIParser(AbstractURIParser):
"""
root_key = k.split("[", 1)[0]
if k == root_key:
- return k, v, False
+ return (k, v, False)
key_path = re.findall(r'\[([^\[\]]*)\]', k)
root = prev = node = {}
for k in key_path:
@@ -194,7 +194,7 @@ class OpenAPIURIParser(AbstractURIParser):
prev = node
node = node[k]
prev[k] = v[0]
- return root_key, [root], True
+ return (root_key, [root], True)
def _preprocess_deep_objects(self, query_data):
""" deep objects provide a way of rendering nested objects using query
diff --git a/airflow/_vendor/connexion/operations/openapi.py b/airflow/_vendor/connexion/operations/openapi.py
index 702d03c..4ea6af7 100644
--- a/airflow/_vendor/connexion/operations/openapi.py
+++ b/airflow/_vendor/connexion/operations/openapi.py
@@ -210,7 +210,7 @@ class OpenAPIOperation(AbstractOperation):
return (self._nested_example(deep_get(self._responses, schema_path)),
status_code)
except KeyError:
- return None, status_code
+ return (None, status_code)
def _nested_example(self, schema):
try:
diff --git a/airflow/_vendor/connexion/operations/swagger2.py b/airflow/_vendor/connexion/operations/swagger2.py
index 22a8600..1b4a79d 100644
--- a/airflow/_vendor/connexion/operations/swagger2.py
+++ b/airflow/_vendor/connexion/operations/swagger2.py
@@ -203,7 +203,7 @@ class Swagger2Operation(AbstractOperation):
return (self._nested_example(deep_get(self._responses, schema_path)),
status_code)
except KeyError:
- return None, status_code
+ return (None, status_code)
def _nested_example(self, schema):
try: