ronantakizawa/codereview-bench huggingface dataset:
Repository: psf/black
File: tests/data/simple_cases/fmtonoff5.py (Python)

Code before:
    [
        "ls",
        "-la",
    ]
    # fmt: on
    + path,
    check=True,
)


# Regression test for https://github.com/psf/black/issues/3026.
def test_func():
    # yapf: disable
    if  unformatted(  args  ):
        return True
    # yapf: enable
    elif b:
        return True

    return False


# Regression test for https://github.com/psf/black/issues/2567.
if True:
    # fmt: off
    for _ in range(1):
    # fmt: on
        print ( "This won't be formatted" )
    print ( "This won't be formatted either" )
else:
    print ( "This will be formatted" )


# Regression test for https://github.com/psf/black/issues/3184.
class A:
    async def call(param):
        if param:
            # fmt: off
            if param[0:4] in (
                "ABCD", "EFGH"
            )  :
                # fmt: on
                print ( "This won't be formatted" )

            elif param[0:4] in ("ZZZZ",):
                print ( "This won't be formatted either" )

        print ( "This will be formatted" )


# Regression test for https://github.com/psf/black/issues/2985

Review comment (suggestion):
```suggestion
    for _ in range( 1 ):
```
To test that this part isn't formatted

Code after:
    [
        "ls",
        "-la",
    ]
    # fmt: on
    + path,
    check=True,
)


# Regression test for https://github.com/psf/black/issues/3026.
def test_func():
    # yapf: disable
    if  unformatted(  args  ):
        return True
    # yapf: enable
    elif b:
        return True

    return False


# Regression test for https://github.com/psf/black/issues/2567.
if True:
    # fmt: off
    for _ in range( 1 ):
    # fmt: on
        print ( "This won't be formatted" )
    print ( "This won't be formatted either" )
else:
    print ( "This will be formatted" )


# Regression test for https://github.com/psf/black/issues/3184.
class A:
    async def call(param):
        if param:
            # fmt: off
            if param[0:4] in (
                "ABCD", "EFGH"
            )  :
                # fmt: on
                print ( "This won't be formatted" )

            elif param[0:4] in ("ZZZZ",):
                print ( "This won't be formatted either" )

        print ( "This will be formatted" )


# Regression test for https://github.com/psf/black/issues/2985
Repository: psf/black
File: src/black/parsing.py (Python)

Code before:
                    field == "targets"
                    and isinstance(node, ast.Delete)
                    and isinstance(item, ast.Tuple)
                ):
                    for elt in item.elts:
                        yield from stringify_ast(elt, depth + 2)

                elif isinstance(item, ast.AST):
                    yield from stringify_ast(item, depth + 2)

        elif isinstance(value, ast.AST):
            yield from stringify_ast(value, depth + 2)

        else:
            normalized: object
            if (
                isinstance(node, ast.Constant)
                and field == "value"
                and isinstance(value, str)
            ):
                # Constant strings may be indented across newlines, if they are
                # docstrings; fold spaces after newlines when comparing. Similarly,
                # trailing and leading space may be removed.
                normalized = _normalize("\n", value)
            elif field == "type_comment" and isinstance(value, str):
                # Trailing spaces in type comments are removed.
                normalized = value.rstrip(" ")
            else:
                normalized = value
            yield f"{'  ' * (depth+2)}{normalized!r},  # {value.__class__.__name__}"

    yield f"{'  ' * depth})  # /{node.__class__.__name__}"


Review comment (bug):
Interesting that we apparently do not remove trailing tabs, only spaces. That might be a bug?

In any case, this change looks good, thanks!

Code after:
                    field == "targets"
                    and isinstance(node, ast.Delete)
                    and isinstance(item, ast.Tuple)
                ):
                    for elt in item.elts:
                        yield from stringify_ast(elt, depth + 2)

                elif isinstance(item, ast.AST):
                    yield from stringify_ast(item, depth + 2)

        elif isinstance(value, ast.AST):
            yield from stringify_ast(value, depth + 2)

        else:
            normalized: object
            if (
                isinstance(node, ast.Constant)
                and field == "value"
                and isinstance(value, str)
            ):
                # Constant strings may be indented across newlines, if they are
                # docstrings; fold spaces after newlines when comparing. Similarly,
                # trailing and leading space may be removed.
                normalized = _normalize("\n", value)
            elif field == "type_comment" and isinstance(value, str):
                # Trailing whitespace in type comments is removed.
                normalized = value.rstrip()
            else:
                normalized = value
            yield f"{'  ' * (depth+2)}{normalized!r},  # {value.__class__.__name__}"

    yield f"{'  ' * depth})  # /{node.__class__.__name__}"
Repository: psf/black
File: tests/conftest.py (Python)

Code before:
import pytest

pytest_plugins = ["tests.optional"]

PRINT_FULL_TREE: bool = False
PRINT_TREE_DIFF: bool = True


def pytest_addoption(parser: pytest.Parser) -> None:
    parser.addoption(
        "--print-full-tree",
        action="store_true",
        default=False,
        help="print full CST trees on failed tests",
    )
    parser.addoption(
        "--print-tree-diff",
        action="store_true",
        default=True,
        help="print diff of CST trees on failed tests",
    )


def pytest_configure(config: pytest.Config) -> None:
    global PRINT_FULL_TREE
    global PRINT_TREE_DIFF
    PRINT_FULL_TREE = config.getoption("--print-full-tree")
    PRINT_TREE_DIFF = config.getoption("--print-tree-diff")


Review comment (bug):
```suggestion
        help="print full syntax trees on failed tests",
```
"CST trees" is redundant as the T stands for tree. Better to avoid the technical term here actually.

Code after:
import pytest

pytest_plugins = ["tests.optional"]

PRINT_FULL_TREE: bool = False
PRINT_TREE_DIFF: bool = True


def pytest_addoption(parser: pytest.Parser) -> None:
    parser.addoption(
        "--print-full-tree",
        action="store_true",
        default=False,
        help="print full syntax trees on failed tests",
    )
    parser.addoption(
        "--print-tree-diff",
        action="store_true",
        default=True,
        help="print diff of syntax trees on failed tests",
    )


def pytest_configure(config: pytest.Config) -> None:
    global PRINT_FULL_TREE
    global PRINT_TREE_DIFF
    PRINT_FULL_TREE = config.getoption("--print-full-tree")
    PRINT_TREE_DIFF = config.getoption("--print-tree-diff")
Repository: psf/black
File: tests/conftest.py (Python)

Code before:
import pytest

pytest_plugins = ["tests.optional"]

PRINT_FULL_TREE: bool = False
PRINT_TREE_DIFF: bool = True


def pytest_addoption(parser: pytest.Parser) -> None:
    parser.addoption(
        "--print-full-tree",
        action="store_true",
        default=False,
        help="print full CST trees on failed tests",
    )
    parser.addoption(
        "--print-tree-diff",
        action="store_true",
        default=True,
        help="print diff of CST trees on failed tests",
    )


def pytest_configure(config: pytest.Config) -> None:
    global PRINT_FULL_TREE
    global PRINT_TREE_DIFF
    PRINT_FULL_TREE = config.getoption("--print-full-tree")
    PRINT_TREE_DIFF = config.getoption("--print-tree-diff")


Review comment (bug):
```suggestion
        help="print diff of syntax trees on failed tests",
```

Code after:
import pytest

pytest_plugins = ["tests.optional"]

PRINT_FULL_TREE: bool = False
PRINT_TREE_DIFF: bool = True


def pytest_addoption(parser: pytest.Parser) -> None:
    parser.addoption(
        "--print-full-tree",
        action="store_true",
        default=False,
        help="print full syntax trees on failed tests",
    )
    parser.addoption(
        "--print-tree-diff",
        action="store_true",
        default=True,
        help="print diff of syntax trees on failed tests",
    )


def pytest_configure(config: pytest.Config) -> None:
    global PRINT_FULL_TREE
    global PRINT_TREE_DIFF
    PRINT_FULL_TREE = config.getoption("--print-full-tree")
    PRINT_TREE_DIFF = config.getoption("--print-tree-diff")
Repository: psf/black
File: tests/data/cases/preview_prefer_rhs_split.py (Python)

Code before:
some_kind_of_table[
    some_key
] = lambda obj: obj.some_long_named_method()  # type: ignore  # noqa: E501

some_kind_of_table[
    some_key  # type: ignore  # noqa: E501
] = lambda obj: obj.some_long_named_method()


# Make when when the left side of assignment plus the opening paren "... = (" is
# exactly line length limit + 1, it won't be split like that.
xxxxxxxxx_yyy_zzzzzzzz[
    xx.xxxxxx(x_yyy_zzzzzz.xxxxx[0]), x_yyy_zzzzzz.xxxxxx(xxxx=1)
] = 1


# Right side of assignment contains un-nested pairs of inner parens.
some_kind_of_instance.some_kind_of_map[a_key] = (
    isinstance(some_var, SomeClass)
    and table.something_and_something != table.something_else
) or (
    isinstance(some_other_var, BaseClass) and table.something != table.some_other_thing
)

# Multiple targets
a = b = (
    ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
)

a = b = c = d = e = f = g = (
    hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
) = i = j = (
    kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
)


Review comment (suggestion):
We should also consider cases where one of the assignment targets is a long string and the RHS is short (`a = bbbbbbbbbbbbbb = c`).

Code after:
some_kind_of_table[
    some_key
] = lambda obj: obj.some_long_named_method()  # type: ignore  # noqa: E501

some_kind_of_table[
    some_key  # type: ignore  # noqa: E501
] = lambda obj: obj.some_long_named_method()


# Make when when the left side of assignment plus the opening paren "... = (" is
# exactly line length limit + 1, it won't be split like that.
xxxxxxxxx_yyy_zzzzzzzz[
    xx.xxxxxx(x_yyy_zzzzzz.xxxxx[0]), x_yyy_zzzzzz.xxxxxx(xxxx=1)
] = 1


# Right side of assignment contains un-nested pairs of inner parens.
some_kind_of_instance.some_kind_of_map[a_key] = (
    isinstance(some_var, SomeClass)
    and table.something_and_something != table.something_else
) or (
    isinstance(some_other_var, BaseClass) and table.something != table.some_other_thing
)

# Multiple targets
a = b = (
    ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
)

a = b = c = d = e = f = g = (
    hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
) = i = j = (
    kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
)

a = (
    bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
) = c

a = (
    bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
) = (
    cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
) = ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
Repository: psf/black
File: src/black/nodes.py (Python)

Code before:
def first_leaf_of(node: LN) -> Optional[Leaf]:
    """Returns the first leaf of the node tree."""
    if isinstance(node, Leaf):
        return node
    if node.children:
        return first_leaf_of(node.children[0])
    else:
        return None


def is_arith_like(node: LN) -> bool:
    """Whether node is an arithmetic or a binary arithmetic expression"""
    return node.type in {
        syms.arith_expr,
        syms.shift_expr,
        syms.xor_expr,
        syms.and_expr,
    }


def is_docstring(leaf: Leaf) -> bool:
    if leaf.type != token.STRING:
        return False

    prefix = get_string_prefix(leaf.value)
    if "b" in prefix or "B" in prefix or "f" in prefix or "F" in prefix:
        return False

    if prev_siblings_are(
        leaf.parent, [None, token.NEWLINE, token.INDENT, syms.simple_stmt]
    ):
        return True

    # Multiline docstring on the same line as the `def`.
    if prev_siblings_are(leaf.parent, [syms.parameters, token.COLON, syms.simple_stmt]):
        # `syms.parameters` is only used in funcdefs and async_funcdefs in the Python
        # grammar. We're safe to return True without further checks.
        return True

    return False


def is_empty_tuple(node: LN) -> bool:
    """Return True if `node` holds an empty tuple."""
    return (
        node.type == syms.atom
        and len(node.children) == 2
        and node.children[0].type == token.LPAR
        and node.children[1].type == token.RPAR
    )


Review comment (suggestion):
Might be slightly cleaner?

```suggestion
    if set(prefix).intersection("bBfF"):
```

Code after:
def first_leaf_of(node: LN) -> Optional[Leaf]:
    """Returns the first leaf of the node tree."""
    if isinstance(node, Leaf):
        return node
    if node.children:
        return first_leaf_of(node.children[0])
    else:
        return None


def is_arith_like(node: LN) -> bool:
    """Whether node is an arithmetic or a binary arithmetic expression"""
    return node.type in {
        syms.arith_expr,
        syms.shift_expr,
        syms.xor_expr,
        syms.and_expr,
    }


def is_docstring(leaf: Leaf) -> bool:
    if leaf.type != token.STRING:
        return False

    prefix = get_string_prefix(leaf.value)
    if set(prefix).intersection("bBfF"):
        return False

    if prev_siblings_are(
        leaf.parent, [None, token.NEWLINE, token.INDENT, syms.simple_stmt]
    ):
        return True

    # Multiline docstring on the same line as the `def`.
    if prev_siblings_are(leaf.parent, [syms.parameters, token.COLON, syms.simple_stmt]):
        # `syms.parameters` is only used in funcdefs and async_funcdefs in the Python
        # grammar. We're safe to return True without further checks.
        return True

    return False


def is_empty_tuple(node: LN) -> bool:
    """Return True if `node` holds an empty tuple."""
    return (
        node.type == syms.atom
        and len(node.children) == 2
        and node.children[0].type == token.LPAR
        and node.children[1].type == token.RPAR
    )
Repository: psf/black
File: tests/data/cases/power_op_spacing.py (Python)

Code before:
m2 = None if not isinstance(dist, Normal) else μ** 2 + σ * 2
m3 = None if not isinstance(dist, Normal) else μ**2 + σ * 2
m4 = None if not isinstance(dist, Normal) else s**2 + σ * 2
m5 = obj.method(another_obj.method()).attribute **2
m6 = None if ... else μ**2 + σ**2
def function(**kwargs):
    t = a**2 + b**3
    return t ** 2


def function_replace_spaces(**kwargs):
    t = a **2 + b** 3 + c ** 4


def function_dont_replace_spaces():
    {**a, **b, **c}


a = 5**~4
b = 5 ** f()
c = -(5**2)
d = 5 ** f["hi"]
e = lazy(lambda **kwargs: 5)
f = f() ** 5
g = a.b**c.d
h = 5 ** funcs.f()
i = funcs.f() ** 5
j = super().name ** 5

Review comment (suggestion):
```suggestion
m2 = None if not isinstance(dist, Normal) else m** 2 + s * 2
m3 = None if not isinstance(dist, Normal) else m**2 + s * 2
m4 = None if not isinstance(dist, Normal) else s**2 + s * 2
```
Replace the Greek letters with Latin ones. If there is something unusual going on in a test, then readers will naturally think the test is about that unusual thing. In this case the Greek doesn't matter, so use less unusual characters.

Code after:
def function(**kwargs):
    t = a**2 + b**3
    return t ** 2


def function_replace_spaces(**kwargs):
    t = a **2 + b** 3 + c ** 4


def function_dont_replace_spaces():
    {**a, **b, **c}


a = 5**~4
b = 5 ** f()
c = -(5**2)
d = 5 ** f["hi"]
e = lazy(lambda **kwargs: 5)
f = f() ** 5
g = a.b**c.d
h = 5 ** funcs.f()
i = funcs.f() ** 5
j = super().name ** 5
k = [(2**idx, value) for idx, value in pairs]
l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001)
m = [([2**63], [1, 2**63])]
n = count <= 10**5
o = settings(max_examples=10**6)
Repository: psf/black
File: tests/data/cases/power_op_spacing.py (Python)

Code before:
    ** 1.0
    **1.0
    ** 1.0
)


# WE SHOULD DEFINITELY NOT EAT THESE COMMENTS (https://github.com/psf/black/issues/2873)
if hasattr(view, "sum_of_weights"):
    return np.divide(  # type: ignore[no-any-return]
        view.variance,  # type: ignore[union-attr]
        view.sum_of_weights,  # type: ignore[union-attr]
        out=np.full(view.sum_of_weights.shape, np.nan),  # type: ignore[union-attr]
        where=view.sum_of_weights**2 > view.sum_of_weights_squared,  # type: ignore[union-attr]
    )

return np.divide(
    where=view.sum_of_weights_of_weight_long**2 > view.sum_of_weights_squared,  # type: ignore
)


# output
m2 = None if not isinstance(dist, Normal) else μ**2 + σ * 2
m3 = None if not isinstance(dist, Normal) else μ**2 + σ * 2
m4 = None if not isinstance(dist, Normal) else s**2 + σ * 2
m5 = obj.method(another_obj.method()).attribute ** 2
m6 = None if ... else μ**2 + σ**2


def function(**kwargs):
    t = a**2 + b**3
    return t**2


def function_replace_spaces(**kwargs):
    t = a**2 + b**3 + c**4


def function_dont_replace_spaces():
    {**a, **b, **c}


a = 5**~4
b = 5 ** f()
c = -(5**2)
d = 5 ** f["hi"]
e = lazy(lambda **kwargs: 5)
f = f() ** 5
g = a.b**c.d
h = 5 ** funcs.f()
i = funcs.f() ** 5
j = super().name ** 5

Review comment (suggestion):
```suggestion
m2 = None if not isinstance(dist, Normal) else m**2 + s * 2
m3 = None if not isinstance(dist, Normal) else m**2 + s * 2
m4 = None if not isinstance(dist, Normal) else s**2 + s * 2
m5 = obj.method(another_obj.method()).attribute ** 2
m6 = None if ... else m**2 + s**2
```

Code after:

# WE SHOULD DEFINITELY NOT EAT THESE COMMENTS (https://github.com/psf/black/issues/2873)
if hasattr(view, "sum_of_weights"):
    return np.divide(  # type: ignore[no-any-return]
        view.variance,  # type: ignore[union-attr]
        view.sum_of_weights,  # type: ignore[union-attr]
        out=np.full(view.sum_of_weights.shape, np.nan),  # type: ignore[union-attr]
        where=view.sum_of_weights**2 > view.sum_of_weights_squared,  # type: ignore[union-attr]
    )

return np.divide(
    where=view.sum_of_weights_of_weight_long**2 > view.sum_of_weights_squared,  # type: ignore
)


# output


def function(**kwargs):
    t = a**2 + b**3
    return t**2


def function_replace_spaces(**kwargs):
    t = a**2 + b**3 + c**4


def function_dont_replace_spaces():
    {**a, **b, **c}


a = 5**~4
b = 5 ** f()
c = -(5**2)
d = 5 ** f["hi"]
e = lazy(lambda **kwargs: 5)
f = f() ** 5
g = a.b**c.d
h = 5 ** funcs.f()
i = funcs.f() ** 5
j = super().name ** 5
k = [(2**idx, value) for idx, value in pairs]
l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001)
m = [([2**63], [1, 2**63])]
n = count <= 10**5
o = settings(max_examples=10**6)
p = {(k, k**2): v**2 for k, v in pairs}
q = [10**i for i in range(6)]
r = x**y
s = 1**1
t = 1**1**1**1
Repository: psf/black
File: tests/data/cases/power_op_spacing.py (Python)

Code before:
m2 = None if not isinstance(dist, Normal) else μ** 2 + σ * 2
m3 = None if not isinstance(dist, Normal) else μ**2 + σ * 2
m4 = None if not isinstance(dist, Normal) else s**2 + σ * 2
m5 = obj.method(another_obj.method()).attribute **2
m6 = None if ... else μ**2 + σ**2
def function(**kwargs):
    t = a**2 + b**3
    return t ** 2


def function_replace_spaces(**kwargs):
    t = a **2 + b** 3 + c ** 4


def function_dont_replace_spaces():
    {**a, **b, **c}


a = 5**~4
b = 5 ** f()
c = -(5**2)
d = 5 ** f["hi"]
e = lazy(lambda **kwargs: 5)
f = f() ** 5
g = a.b**c.d
h = 5 ** funcs.f()
i = funcs.f() ** 5
j = super().name ** 5
k = [(2**idx, value) for idx, value in pairs]
l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001)

Review comment (suggestion):
```suggestion
m6 = None if ... else m**2 + s**2
```

Code after:
def function(**kwargs):
    t = a**2 + b**3
    return t ** 2


def function_replace_spaces(**kwargs):
    t = a **2 + b** 3 + c ** 4


def function_dont_replace_spaces():
    {**a, **b, **c}


a = 5**~4
b = 5 ** f()
c = -(5**2)
d = 5 ** f["hi"]
e = lazy(lambda **kwargs: 5)
f = f() ** 5
g = a.b**c.d
h = 5 ** funcs.f()
i = funcs.f() ** 5
j = super().name ** 5
k = [(2**idx, value) for idx, value in pairs]
l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001)
m = [([2**63], [1, 2**63])]
n = count <= 10**5
o = settings(max_examples=10**6)
p = {(k, k**2): v**2 for k, v in pairs}
q = [10**i for i in range(6)]
Repository: psf/black
File: scripts/generate_schema.py (Python)

Code before:
    return result


@click.command(context_settings={"help_option_names": ["-h", "--help"]})
@click.option("--schemastore", is_flag=True, help="SchemaStore format")
@click.option("--outfile", type=click.File(mode="w"), help="Write to file")
def main(schemastore: bool, outfile: IO[str]) -> None:
    properties = generate_schema_from_click(black.main)
    del properties["line-ranges"]

    schema: dict[str, Any] = {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "$id": (
            "https://github.com/psf/black/blob/main/black/resources/black.schema.json"
        ),
        "$comment": "black table in pyproject.toml",
        "type": "object",
        "additionalProperties": False,
        "properties": properties,
    }

    if schemastore:
        schema["$id"] = ("https://json.schemastore.org/partial-black.json",)
        schema["properties"]["enable-unstable-feature"]["items"] = {"type": "string"}

    print(json.dumps(schema, indent=2), file=outfile)


if __name__ == "__main__":
    main()


Review comment (suggestion):
```suggestion
        # The precise list of unstable features may change frequently, so don't bother putting it in SchemaStore
        schema["properties"]["enable-unstable-feature"]["items"] = {"type": "string"}
```

Code after:
    return result


@click.command(context_settings={"help_option_names": ["-h", "--help"]})
@click.option("--schemastore", is_flag=True, help="SchemaStore format")
@click.option("--outfile", type=click.File(mode="w"), help="Write to file")
def main(schemastore: bool, outfile: IO[str]) -> None:
    properties = generate_schema_from_click(black.main)
    del properties["line-ranges"]

    schema: dict[str, Any] = {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "$id": (
            "https://github.com/psf/black/blob/main/black/resources/black.schema.json"
        ),
        "$comment": "tool.black table in pyproject.toml",
        "type": "object",
        "additionalProperties": False,
        "properties": properties,
    }

    if schemastore:
        schema["$id"] = ("https://json.schemastore.org/partial-black.json",)
        # The precise list of unstable features may change frequently, so don't
        # bother putting it in SchemaStore
        schema["properties"]["enable-unstable-feature"]["items"] = {"type": "string"}

    print(json.dumps(schema, indent=2), file=outfile)


if __name__ == "__main__":
    main()