Skip to content

Commit 9f7001b

Browse files
committed
Bump linters
Signed-off-by: Bernát Gábor <[email protected]>
1 parent 1ad255d commit 9f7001b

File tree

18 files changed

+56
-48
lines changed

18 files changed

+56
-48
lines changed

.pre-commit-config.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repos:
1212
- id: check-case-conflict
1313
- id: check-merge-conflict
1414
- repo: https://github.com/asottile/add-trailing-comma
15-
rev: v2.2.0
15+
rev: v2.2.1
1616
hooks:
1717
- id: add-trailing-comma
1818
args: [--py36-plus]
@@ -29,7 +29,7 @@ repos:
2929
hooks:
3030
- id: rst-backticks
3131
- repo: https://github.com/psf/black
32-
rev: 21.11b0
32+
rev: 21.12b0
3333
hooks:
3434
- id: black
3535
args: [--safe]
@@ -38,20 +38,20 @@ repos:
3838
hooks:
3939
- id: isort
4040
- repo: https://github.com/pre-commit/mirrors-prettier
41-
rev: "v2.4.1"
41+
rev: "v2.5.1"
4242
hooks:
4343
- id: prettier
4444
additional_dependencies:
45-
- prettier@2.4.1
45+
- prettier@2.5.1
4646
- "@prettier/[email protected]"
4747
args: ["--print-width=120", "--prose-wrap=always"]
4848
- repo: https://github.com/asottile/blacken-docs
49-
rev: v1.11.0
49+
rev: v1.12.0
5050
hooks:
5151
- id: blacken-docs
52-
additional_dependencies: [black==21.11b0]
52+
additional_dependencies: [black==21.12b0]
5353
- repo: https://github.com/asottile/setup-cfg-fmt
54-
rev: v1.19.0
54+
rev: v1.20.0
5555
hooks:
5656
- id: setup-cfg-fmt
5757
- repo: https://github.com/tox-dev/tox-ini-fmt
@@ -64,15 +64,15 @@ repos:
6464
hooks:
6565
- id: flake8
6666
additional_dependencies:
67-
- flake8-bugbear==21.9.2
67+
- flake8-bugbear==21.11.29
6868
- flake8-comprehensions==3.7
6969
- flake8-pytest-style==1.5.1
7070
- flake8-spellcheck==0.24
71-
- flake8-unused-arguments==0.0.8
72-
- flake8-noqa==1.2
71+
- flake8-unused-arguments==0.0.9
72+
- flake8-noqa==1.2.1
7373
- pep8-naming==0.12.1
7474
- repo: https://github.com/igorshubovych/markdownlint-cli
75-
rev: v0.29.0
75+
rev: v0.30.0
7676
hooks:
7777
- id: markdownlint
7878
- repo: local

src/tox/config/set_env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def __init__(self, raw: str, name: str, env_name: str | None, root: Path) -> Non
1616
self._raw: dict[str, str] = {} # could still need replacement
1717
self._needs_replacement: list[str] = [] # env vars that need replacement
1818
self._env_files: list[str] = []
19-
self._replacer: Replacer = lambda s, c: s
19+
self._replacer: Replacer = lambda s, c: s # noqa: U100
2020
self._name, self._env_name, self._root = name, env_name, root
2121
from .loader.ini.replace import find_replace_part
2222

src/tox/config/sets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def register_config(self) -> None:
176176
desc="the root directory (where the configuration file is found)",
177177
)
178178

179-
def work_dir_builder(conf: Config, env_name: str | None) -> Path:
179+
def work_dir_builder(conf: Config, env_name: str | None) -> Path: # noqa: U100
180180
# here we pin to .tox/4 to be able to use in parallel with v3 until final release
181181
return (conf.work_dir if conf.work_dir is not None else cast(Path, self["tox_root"])) / ".tox" / "4"
182182

@@ -189,7 +189,7 @@ def work_dir_builder(conf: Config, env_name: str | None) -> Path:
189189
self.add_config(
190190
keys=["temp_dir"],
191191
of_type=Path,
192-
default=lambda conf, _: cast(Path, self["tox_root"]) / ".temp",
192+
default=lambda conf, _: cast(Path, self["tox_root"]) / ".temp", # noqa: U100, U101
193193
desc="temporary directory cleaned at start",
194194
)
195195
self.add_config(

src/tox/pytest.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,10 @@ def __init__(self, options: ExecuteOptions, out: SyncWrite, err: SyncWrite, exit
198198
def exit_code(self) -> int | None:
199199
return self._exit_code
200200

201-
def wait(self, timeout: float | None = None) -> int | None:
201+
def wait(self, timeout: float | None = None) -> int | None: # noqa: U100
202202
return self._exit_code
203203

204-
def write_stdin(self, content: str) -> None:
204+
def write_stdin(self, content: str) -> None: # noqa: U100
205205
return None # pragma: no cover
206206

207207
def interrupt(self) -> None:
@@ -224,9 +224,9 @@ def __enter__(self) -> ExecuteStatus:
224224

225225
def __exit__(
226226
self,
227-
exc_type: type[BaseException] | None,
228-
exc_val: BaseException | None,
229-
exc_tb: TracebackType | None,
227+
exc_type: type[BaseException] | None, # noqa: U100
228+
exc_val: BaseException | None, # noqa: U100
229+
exc_tb: TracebackType | None, # noqa: U100
230230
) -> None:
231231
pass
232232

src/tox/tox_env/api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,19 @@ def register_config(self) -> None:
9797
self.conf.add_config(
9898
keys=["env_dir", "envdir"],
9999
of_type=Path,
100-
default=lambda conf, name: cast(Path, conf.core["work_dir"]) / self.name,
100+
default=lambda conf, name: cast(Path, conf.core["work_dir"]) / self.name, # noqa: U100
101101
desc="directory assigned to the tox environment",
102102
)
103103
self.conf.add_config(
104104
keys=["env_tmp_dir", "envtmpdir"],
105105
of_type=Path,
106-
default=lambda conf, name: cast(Path, conf.core["work_dir"]) / self.name / "tmp",
106+
default=lambda conf, name: cast(Path, conf.core["work_dir"]) / self.name / "tmp", # noqa: U100
107107
desc="a folder that is always reset at the start of the run",
108108
)
109109
self.conf.add_config(
110110
keys=["env_log_dir", "envlogdir"],
111111
of_type=Path,
112-
default=lambda conf, name: cast(Path, conf.core["work_dir"]) / self.name / "log",
112+
default=lambda conf, name: cast(Path, conf.core["work_dir"]) / self.name / "log", # noqa: U100
113113
desc="a folder for logging where tox will put logs of tool invocation",
114114
)
115115
self.executor.register_conf(self)

src/tox/tox_env/python/package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def register_run_env(self, run_env: RunToxEnv) -> Generator[tuple[str, str], Pac
6464
if not isinstance(run_env, Python) or run_env.conf["package"] != "wheel" or "wheel_build_env" in run_env.conf:
6565
return
6666

67-
def default_wheel_tag(conf: Config, env_name: str | None) -> str:
67+
def default_wheel_tag(conf: Config, env_name: str | None) -> str: # noqa: U100
6868
# https://www.python.org/dev/peps/pep-0427/#file-name-convention
6969
# when building wheels we need to ensure that the built package is compatible with the target env
7070
# compatibility is documented within https://www.python.org/dev/peps/pep-0427/#file-name-convention

src/tox/tox_env/python/virtual_env/api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ def register_config(self) -> None:
3737
self.conf.add_config(
3838
keys=["system_site_packages", "sitepackages"],
3939
of_type=bool,
40-
default=lambda conf, name: StrConvert().to_bool(
40+
default=lambda conf, name: StrConvert().to_bool( # noqa: U100
4141
self.environment_variables.get("VIRTUALENV_SYSTEM_SITE_PACKAGES", "False"),
4242
),
4343
desc="create virtual environments that also have access to globally installed packages.",
4444
)
4545
self.conf.add_config(
4646
keys=["always_copy", "alwayscopy"],
4747
of_type=bool,
48-
default=lambda conf, name: StrConvert().to_bool(
48+
default=lambda conf, name: StrConvert().to_bool( # noqa: U100
4949
self.environment_variables.get(
5050
"VIRTUALENV_COPIES",
5151
self.environment_variables.get("VIRTUALENV_ALWAYS_COPY", "False"),
@@ -56,7 +56,7 @@ def register_config(self) -> None:
5656
self.conf.add_config(
5757
keys=["download"],
5858
of_type=bool,
59-
default=lambda conf, name: StrConvert().to_bool(
59+
default=lambda conf, name: StrConvert().to_bool( # noqa: U100
6060
self.environment_variables.get("VIRTUALENV_DOWNLOAD", "False"),
6161
),
6262
desc="true if you want virtualenv to upgrade pip/wheel/setuptools to the latest version",

src/tox/tox_env/python/virtual_env/package/cmd_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def register_config(self) -> None:
6464
self.conf.add_config(
6565
keys=["change_dir", "changedir"],
6666
of_type=Path,
67-
default=lambda conf, name: cast(Path, conf.core["tox_root"]),
67+
default=lambda conf, name: cast(Path, conf.core["tox_root"]), # noqa: U100
6868
desc="change to this working directory when executing the test command",
6969
)
7070
self.conf.add_config(

src/tox/tox_env/python/virtual_env/package/pep517.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ def register_config(self) -> None:
9696
self.conf.add_config(
9797
keys=["meta_dir"],
9898
of_type=Path,
99-
default=lambda conf, name: self.env_dir / ".meta",
99+
default=lambda conf, name: self.env_dir / ".meta", # noqa: U100
100100
desc="directory where to put the project metadata files",
101101
)
102102
self.conf.add_config(
103103
keys=["pkg_dir"],
104104
of_type=Path,
105-
default=lambda conf, name: self.env_dir / "dist",
105+
default=lambda conf, name: self.env_dir / "dist", # noqa: U100
106106
desc="directory where to put project packages",
107107
)
108108

@@ -211,7 +211,10 @@ def __init__(self, root: Path, env: Pep517VirtualEnvPackager) -> None:
211211
self._tox_env = env
212212
self._backend_executor_: LocalSubProcessPep517Executor | None = None
213213
into: dict[str, Any] = {}
214-
pkg_cache = cached(into, key=lambda *args, **kwargs: "wheel" if "wheel_directory" in kwargs else "sdist")
214+
pkg_cache = cached(
215+
into,
216+
key=lambda *args, **kwargs: "wheel" if "wheel_directory" in kwargs else "sdist", # noqa: U100
217+
)
215218
self.build_wheel = pkg_cache(self.build_wheel) # type: ignore
216219
self.build_sdist = pkg_cache(self.build_sdist) # type: ignore
217220

src/tox/tox_env/runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def ensure_one_line(value: str) -> str:
6060
self.conf.add_config(
6161
keys=["change_dir", "changedir"],
6262
of_type=Path,
63-
default=lambda conf, name: cast(Path, conf.core["tox_root"]),
63+
default=lambda conf, name: cast(Path, conf.core["tox_root"]), # noqa: U100
6464
desc="change to this working directory when executing the test command",
6565
)
6666
self.conf.add_config(

0 commit comments

Comments
 (0)