How to use the flynt.format.QuoteTypes function in flynt

To help you get started, we’ve selected a few flynt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ikamensh / flynt / test / test_styles.py View on Github external
        ("'abra'", QuoteTypes.single),
        ('"bobro"', QuoteTypes.double),
        ("'''abra'''", QuoteTypes.triple_single),
        ('"""bobro"""', QuoteTypes.triple_double),
    ],
)
def test_get_quote_type_token(code, quote_type):

    g = get_chunks(code)
    next(g)
    chunk = next(g)
    token = chunk.tokens[0]

    assert token.get_quote_type() == quote_type