diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 31b499485..9cf29229d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,7 +29,7 @@ repos: - id: blacken-docs additional_dependencies: [black==23.3] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.0.278" + rev: "v0.0.280" hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/src/tox/session/cmd/devenv.py b/src/tox/session/cmd/devenv.py index dbed3aeda..c4754e546 100644 --- a/src/tox/session/cmd/devenv.py +++ b/src/tox/session/cmd/devenv.py @@ -38,7 +38,7 @@ def devenv(state: State) -> int: usedevelop=True, # dev environments must be of type dev env_dir=opt.devenv_path, # move it in source ) - state.conf.memory_seed_loaders[list(opt.env)[0]].append(loader) + state.conf.memory_seed_loaders[next(iter(opt.env))].append(loader) state.envs.ensure_only_run_env_is_active() envs = list(state.envs.iter()) diff --git a/tests/demo_pkg_inline/build.py b/tests/demo_pkg_inline/build.py index eedf6d797..a56db5b80 100644 --- a/tests/demo_pkg_inline/build.py +++ b/tests/demo_pkg_inline/build.py @@ -42,11 +42,9 @@ def tox_register_tox_env(register: ToxEnvRegister) -> None: """, } metadata_files = { - entry_points: """ + entry_points: f""" [tox] - example = {}.example_plugin""".format( - name, - ), + example = {name}.example_plugin""", metadata: """ Metadata-Version: 2.1 Name: {} @@ -65,16 +63,12 @@ def tox_register_tox_env(register: ToxEnvRegister) -> None: version, "\n ".join(os.environ.get("METADATA_EXTRA", "").split("\n")), ), - wheel: """ + wheel: f""" Wheel-Version: 1.0 - Generator: {}-{} + Generator: {name}-{version} Root-Is-Purelib: true - Tag: py{}-none-any - """.format( - name, - version, - sys.version_info[0], - ), + Tag: py{sys.version_info[0]}-none-any + """, f"{dist_info}/top_level.txt": name, record: """ {0}/__init__.py,,