Skip to content

black has a tendancy to put multiple string literals on a line, clean them up #4093

@asottile

Description

@asottile

and consider fixing black in some way :)

Here's a quick grep, there's at least one false positive here unfortunately:

#4089 (comment)

$ git grep '"[^"]*" "[^"]*"'
doc/en/example/assertion/failure_demo.py:        ), "A.a appears not to be b\n" "or does not appear to be b\none of those"
doc/en/example/reportingdemo.rst:            ), "A.a appears not to be b\n" "or does not appear to be b\none of those"
src/_pytest/assertion/util.py:                u("Skipping %s identical leading " "characters in diff, use -v to show")
src/_pytest/cacheprovider.py:            tw.line("%s contains unreadable content, " "will be ignored" % key)
src/_pytest/capture.py:        raise UnsupportedOperation("redirected stdin is pseudofile, " "has no fileno()")
src/_pytest/compat.py:            ("could not find real function of {start}" "\nstopped at {current}").format(
src/_pytest/deprecated.py:    "pycollector makeitem was removed " "as it is an accidentially leaked internal api"
src/_pytest/helpconfig.py:        "[pytest] ini-options in the first " "pytest.ini|tox.ini|setup.cfg file found:"
src/_pytest/mark/evaluate.py:                            msg = "you need to specify reason=STRING " "when using booleans as conditions."
src/_pytest/python.py:        help="prefixes or glob names for Python test function and " "method discovery",
src/_pytest/recwarn.py:        msg = "exceptions must be old-style classes or " "derived from Warning, not %s"
src/_pytest/terminal.py:        "failed passed skipped deselected " "xfailed xpassed warnings error"
testing/acceptance_test.py:                "def test_{}(): pass\n" "def test_other():pass".format(dirname)
testing/acceptance_test.py:            "def test_bar(): pass\n" "def test_other(a_fixture):pass"
testing/acceptance_test.py:            "import pytest\n" "@pytest.fixture\n" "def a_fixture():pass"
testing/logging/test_formatter.py:        "dummypath                   10 " "\x1b[32mINFO    \x1b[0m Test Message"
testing/logging/test_formatter.py:    assert output == ("dummypath                   10 " "INFO     Test Message")
testing/test_config.py:            args=123 "123 hello" "this"
testing/test_junitxml.py:            classname="xyz.test_junit_prefixing." "TestHello",
testing/test_pdb.py:            "--show-capture=all --pdb " "-p no:logging %s" % p1

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueeasy issue that is friendly to new contributortype: infrastructureimprovement to development/releases/CI structure

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions