summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBernát Gábor <gaborjbernat@gmail.com>2021-12-11 09:50:58 +0000
committerBernát Gábor <gaborjbernat@gmail.com>2021-12-11 09:50:58 +0000
commit9f7001bf95aa859449ef7ec7253274ec8d11bb33 (patch)
treeaef5473b5a8fcd7c5d62645f22892e96217e22b5 /src
parent1ad255d5129a7c634dc7a7f8cbae8a6bd93774c7 (diff)
downloadtox-git-9f7001bf95aa859449ef7ec7253274ec8d11bb33.tar.gz
Bump linters
Signed-off-by: Bernát Gábor <gaborjbernat@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/tox/config/set_env.py2
-rw-r--r--src/tox/config/sets.py4
-rw-r--r--src/tox/pytest.py10
-rw-r--r--src/tox/tox_env/api.py6
-rw-r--r--src/tox/tox_env/python/package.py2
-rw-r--r--src/tox/tox_env/python/virtual_env/api.py6
-rw-r--r--src/tox/tox_env/python/virtual_env/package/cmd_builder.py2
-rw-r--r--src/tox/tox_env/python/virtual_env/package/pep517.py9
-rw-r--r--src/tox/tox_env/runner.py2
9 files changed, 23 insertions, 20 deletions
diff --git a/src/tox/config/set_env.py b/src/tox/config/set_env.py
index 30acc3ea..fe5add48 100644
--- a/src/tox/config/set_env.py
+++ b/src/tox/config/set_env.py
@@ -16,7 +16,7 @@ class SetEnv:
self._raw: dict[str, str] = {} # could still need replacement
self._needs_replacement: list[str] = [] # env vars that need replacement
self._env_files: list[str] = []
- self._replacer: Replacer = lambda s, c: s
+ self._replacer: Replacer = lambda s, c: s # noqa: U100
self._name, self._env_name, self._root = name, env_name, root
from .loader.ini.replace import find_replace_part
diff --git a/src/tox/config/sets.py b/src/tox/config/sets.py
index 2a3e7775..c51ff462 100644
--- a/src/tox/config/sets.py
+++ b/src/tox/config/sets.py
@@ -176,7 +176,7 @@ class CoreConfigSet(ConfigSet):
desc="the root directory (where the configuration file is found)",
)
- def work_dir_builder(conf: Config, env_name: str | None) -> Path:
+ def work_dir_builder(conf: Config, env_name: str | None) -> Path: # noqa: U100
# here we pin to .tox/4 to be able to use in parallel with v3 until final release
return (conf.work_dir if conf.work_dir is not None else cast(Path, self["tox_root"])) / ".tox" / "4"
@@ -189,7 +189,7 @@ class CoreConfigSet(ConfigSet):
self.add_config(
keys=["temp_dir"],
of_type=Path,
- default=lambda conf, _: cast(Path, self["tox_root"]) / ".temp",
+ default=lambda conf, _: cast(Path, self["tox_root"]) / ".temp", # noqa: U100, U101
desc="temporary directory cleaned at start",
)
self.add_config(
diff --git a/src/tox/pytest.py b/src/tox/pytest.py
index 478eb41e..2f4df847 100644
--- a/src/tox/pytest.py
+++ b/src/tox/pytest.py
@@ -198,10 +198,10 @@ class ToxProject:
def exit_code(self) -> int | None:
return self._exit_code
- def wait(self, timeout: float | None = None) -> int | None:
+ def wait(self, timeout: float | None = None) -> int | None: # noqa: U100
return self._exit_code
- def write_stdin(self, content: str) -> None:
+ def write_stdin(self, content: str) -> None: # noqa: U100
return None # pragma: no cover
def interrupt(self) -> None:
@@ -224,9 +224,9 @@ class ToxProject:
def __exit__(
self,
- exc_type: type[BaseException] | None,
- exc_val: BaseException | None,
- exc_tb: TracebackType | None,
+ exc_type: type[BaseException] | None, # noqa: U100
+ exc_val: BaseException | None, # noqa: U100
+ exc_tb: TracebackType | None, # noqa: U100
) -> None:
pass
diff --git a/src/tox/tox_env/api.py b/src/tox/tox_env/api.py
index c2c2d819..b84bd42f 100644
--- a/src/tox/tox_env/api.py
+++ b/src/tox/tox_env/api.py
@@ -97,19 +97,19 @@ class ToxEnv(ABC):
self.conf.add_config(
keys=["env_dir", "envdir"],
of_type=Path,
- default=lambda conf, name: cast(Path, conf.core["work_dir"]) / self.name,
+ default=lambda conf, name: cast(Path, conf.core["work_dir"]) / self.name, # noqa: U100
desc="directory assigned to the tox environment",
)
self.conf.add_config(
keys=["env_tmp_dir", "envtmpdir"],
of_type=Path,
- default=lambda conf, name: cast(Path, conf.core["work_dir"]) / self.name / "tmp",
+ default=lambda conf, name: cast(Path, conf.core["work_dir"]) / self.name / "tmp", # noqa: U100
desc="a folder that is always reset at the start of the run",
)
self.conf.add_config(
keys=["env_log_dir", "envlogdir"],
of_type=Path,
- default=lambda conf, name: cast(Path, conf.core["work_dir"]) / self.name / "log",
+ default=lambda conf, name: cast(Path, conf.core["work_dir"]) / self.name / "log", # noqa: U100
desc="a folder for logging where tox will put logs of tool invocation",
)
self.executor.register_conf(self)
diff --git a/src/tox/tox_env/python/package.py b/src/tox/tox_env/python/package.py
index c085c669..a31cf830 100644
--- a/src/tox/tox_env/python/package.py
+++ b/src/tox/tox_env/python/package.py
@@ -64,7 +64,7 @@ class PythonPackageToxEnv(Python, PackageToxEnv, ABC):
if not isinstance(run_env, Python) or run_env.conf["package"] != "wheel" or "wheel_build_env" in run_env.conf:
return
- def default_wheel_tag(conf: Config, env_name: str | None) -> str:
+ def default_wheel_tag(conf: Config, env_name: str | None) -> str: # noqa: U100
# https://www.python.org/dev/peps/pep-0427/#file-name-convention
# when building wheels we need to ensure that the built package is compatible with the target env
# compatibility is documented within https://www.python.org/dev/peps/pep-0427/#file-name-convention
diff --git a/src/tox/tox_env/python/virtual_env/api.py b/src/tox/tox_env/python/virtual_env/api.py
index 97b1f05d..8f14baf4 100644
--- a/src/tox/tox_env/python/virtual_env/api.py
+++ b/src/tox/tox_env/python/virtual_env/api.py
@@ -37,7 +37,7 @@ class VirtualEnv(Python, ABC):
self.conf.add_config(
keys=["system_site_packages", "sitepackages"],
of_type=bool,
- default=lambda conf, name: StrConvert().to_bool(
+ default=lambda conf, name: StrConvert().to_bool( # noqa: U100
self.environment_variables.get("VIRTUALENV_SYSTEM_SITE_PACKAGES", "False"),
),
desc="create virtual environments that also have access to globally installed packages.",
@@ -45,7 +45,7 @@ class VirtualEnv(Python, ABC):
self.conf.add_config(
keys=["always_copy", "alwayscopy"],
of_type=bool,
- default=lambda conf, name: StrConvert().to_bool(
+ default=lambda conf, name: StrConvert().to_bool( # noqa: U100
self.environment_variables.get(
"VIRTUALENV_COPIES",
self.environment_variables.get("VIRTUALENV_ALWAYS_COPY", "False"),
@@ -56,7 +56,7 @@ class VirtualEnv(Python, ABC):
self.conf.add_config(
keys=["download"],
of_type=bool,
- default=lambda conf, name: StrConvert().to_bool(
+ default=lambda conf, name: StrConvert().to_bool( # noqa: U100
self.environment_variables.get("VIRTUALENV_DOWNLOAD", "False"),
),
desc="true if you want virtualenv to upgrade pip/wheel/setuptools to the latest version",
diff --git a/src/tox/tox_env/python/virtual_env/package/cmd_builder.py b/src/tox/tox_env/python/virtual_env/package/cmd_builder.py
index bccb743c..e83f6ffd 100644
--- a/src/tox/tox_env/python/virtual_env/package/cmd_builder.py
+++ b/src/tox/tox_env/python/virtual_env/package/cmd_builder.py
@@ -64,7 +64,7 @@ class VirtualEnvCmdBuilder(PythonPackageToxEnv, VirtualEnv):
self.conf.add_config(
keys=["change_dir", "changedir"],
of_type=Path,
- default=lambda conf, name: cast(Path, conf.core["tox_root"]),
+ default=lambda conf, name: cast(Path, conf.core["tox_root"]), # noqa: U100
desc="change to this working directory when executing the test command",
)
self.conf.add_config(
diff --git a/src/tox/tox_env/python/virtual_env/package/pep517.py b/src/tox/tox_env/python/virtual_env/package/pep517.py
index ebfd4aa3..caf021f9 100644
--- a/src/tox/tox_env/python/virtual_env/package/pep517.py
+++ b/src/tox/tox_env/python/virtual_env/package/pep517.py
@@ -96,13 +96,13 @@ class Pep517VirtualEnvPackager(PythonPackageToxEnv, VirtualEnv):
self.conf.add_config(
keys=["meta_dir"],
of_type=Path,
- default=lambda conf, name: self.env_dir / ".meta",
+ default=lambda conf, name: self.env_dir / ".meta", # noqa: U100
desc="directory where to put the project metadata files",
)
self.conf.add_config(
keys=["pkg_dir"],
of_type=Path,
- default=lambda conf, name: self.env_dir / "dist",
+ default=lambda conf, name: self.env_dir / "dist", # noqa: U100
desc="directory where to put project packages",
)
@@ -211,7 +211,10 @@ class Pep517VirtualEnvFrontend(Frontend):
self._tox_env = env
self._backend_executor_: LocalSubProcessPep517Executor | None = None
into: dict[str, Any] = {}
- pkg_cache = cached(into, key=lambda *args, **kwargs: "wheel" if "wheel_directory" in kwargs else "sdist")
+ pkg_cache = cached(
+ into,
+ key=lambda *args, **kwargs: "wheel" if "wheel_directory" in kwargs else "sdist", # noqa: U100
+ )
self.build_wheel = pkg_cache(self.build_wheel) # type: ignore
self.build_sdist = pkg_cache(self.build_sdist) # type: ignore
diff --git a/src/tox/tox_env/runner.py b/src/tox/tox_env/runner.py
index 269b7f6f..adde85a4 100644
--- a/src/tox/tox_env/runner.py
+++ b/src/tox/tox_env/runner.py
@@ -60,7 +60,7 @@ class RunToxEnv(ToxEnv, ABC):
self.conf.add_config(
keys=["change_dir", "changedir"],
of_type=Path,
- default=lambda conf, name: cast(Path, conf.core["tox_root"]),
+ default=lambda conf, name: cast(Path, conf.core["tox_root"]), # noqa: U100
desc="change to this working directory when executing the test command",
)
self.conf.add_config(