Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions flask_restx/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,11 @@ def is_attr(val):
return [
self.container.output(
idx,
val
if (isinstance(val, dict) or is_attr(val)) and not is_nested
else value,
(
val
if (isinstance(val, dict) or is_attr(val)) and not is_nested
else value
),
)
for idx, val in enumerate(value)
]
Expand Down
8 changes: 5 additions & 3 deletions flask_restx/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,11 @@ def __format_field(key, val):
return (key, value)

items = (
(k, marshal(data, v, skip_none=skip_none, ordered=ordered))
if isinstance(v, dict)
else __format_field(k, v)
(
(k, marshal(data, v, skip_none=skip_none, ordered=ordered))
if isinstance(v, dict)
else __format_field(k, v)
)
for k, v in fields.items()
)

Expand Down
8 changes: 5 additions & 3 deletions flask_restx/namespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,11 @@ def marshal_with(
def wrapper(func):
doc = {
"responses": {
str(code): (description, [fields], kwargs)
if as_list
else (description, fields, kwargs)
str(code): (
(description, [fields], kwargs)
if as_list
else (description, fields, kwargs)
)
},
"__mask__": kwargs.get(
"mask", True
Expand Down
1 change: 1 addition & 0 deletions flask_restx/schemas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

.. versionadded:: 0.12.1
"""

import io
import json

Expand Down
8 changes: 5 additions & 3 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,11 @@ def benchmark(
"--benchmark-max-time={0}".format(max_time),
"--benchmark-autosave" if save else None,
"--benchmark-compare" if compare else None,
"--benchmark-histogram=histograms/{0:%Y%m%d-%H%M%S}".format(ts)
if histogram
else None,
(
"--benchmark-histogram=histograms/{0:%Y%m%d-%H%M%S}".format(ts)
if histogram
else None
),
"--benchmark-cprofile=tottime" if profile else None,
)
cmd = "pytest tests/benchmarks {0}".format(kwargs)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ def test_valid_value_check(self, value):
@pytest.mark.parametrize(
"value",
[
"coucou@not-found.fr",
"coucou@not-found.test",
"me@localhost",
"[email protected]",
"[email protected]",
Expand Down