qutebrowser/tests/end2end
Florian Bruhin 5fa878c7d1 py38: Run modified pyupgrade
Modified to leave f-strings alone for now, and also not do some other
stuff we should do separately:

    diff --git i/pyupgrade/_main.py w/pyupgrade/_main.py
    index 4292174..37547b3 100644
    --- i/pyupgrade/_main.py
    +++ w/pyupgrade/_main.py
    @@ -294,7 +294,8 @@ def _fix_tokens(contents_text: str) -> str:
                    token.utf8_byte_offset == 0 and
                    token.line < 3 and
                    token.name == 'COMMENT' and
    -                tokenize.cookie_re.match(token.src)
    +                tokenize.cookie_re.match(token.src) and
    +                False
            ):
                del tokens[i]
                assert tokens[i].name == 'NL', tokens[i].name
    diff --git i/pyupgrade/_plugins/fstrings.py w/pyupgrade/_plugins/fstrings.py
    index e648075..eb44c0c 100644
    --- i/pyupgrade/_plugins/fstrings.py
    +++ w/pyupgrade/_plugins/fstrings.py
    @@ -88,7 +88,7 @@ def _format_params(call: ast.Call) -> set[str]:
        return params

    -@register(ast.Call)
    +# @register(ast.Call)
    def visit_Call(
            state: State,
            node: ast.Call,
    diff --git i/pyupgrade/_plugins/open_mode.py w/pyupgrade/_plugins/open_mode.py
    index a20b95c..0388781 100644
    --- i/pyupgrade/_plugins/open_mode.py
    +++ w/pyupgrade/_plugins/open_mode.py
    @@ -28,7 +28,7 @@ def _permute(*args: str) -> tuple[str, ...]:
        return tuple(''.join(p) for s in args for p in itertools.permutations(s))

    -MODE_REMOVE = frozenset(_permute('U', 'r', 'rU', 'rt'))
    +MODE_REMOVE = frozenset(_permute('U', 'rU', 'rt'))
    MODE_REPLACE_R = frozenset(_permute('Ub'))
    MODE_REMOVE_T = frozenset(_plus(_permute('at', 'rt', 'wt', 'xt')))
    MODE_REMOVE_U = frozenset(_permute('rUb'))

Then run with:

    git ls-files | grep -E '(\.py|misc/userscripts)' | xargs ~/tmp/pyupgrade/.venv/bin/pyupgrade --py38-plus

And manually reverted some changes (e.g. it picking up bash userscripts)
2023-06-26 14:39:54 +02:00
..
data tests: Fix relative URL for caret test 2023-04-07 15:45:20 +02:00
features tests: Resurrect :print --pdf test 2023-06-26 13:50:19 +02:00
fixtures ci: Ignore spurious QPainter messages 2023-05-31 12:08:10 +02:00
misc doc: Switch URLs to https 2021-01-26 15:19:01 +01:00
templates js: Handle stylesheets in cross-origin frames gracefully 2022-08-23 20:10:57 +02:00
conftest.py py38: Run modified pyupgrade 2023-06-26 14:39:54 +02:00
test_adblock_e2e.py doc: Switch URLs to https 2021-01-26 15:19:01 +01:00
test_dirbrowser.py Run scripts/dev/rewrite_qt_imports.sh 2022-08-23 18:09:11 +02:00
test_hints_html.py tests: Update bs4 argument name 2022-04-11 10:29:44 +02:00
test_insert_mode.py Use flake8-pytest-style 2022-01-04 10:30:24 +01:00
test_invocations.py Initial Python 3.7 drop 2023-06-26 14:39:54 +02:00
test_mhtml_e2e.py Fixed joinpath plus cleaner path 2021-03-11 13:23:09 +01:00