Enable SLF in ruff
This commit is contained in:
parent
99dda74a9e
commit
d0326aee4f
1 changed files with 10 additions and 4 deletions
|
|
@ -557,7 +557,7 @@ def do_not_accept_arguments(session: nox.Session, *, raise_error: bool = True) -
|
|||
|
||||
def do_not_reuse(session: nox.Session, *, raise_error: bool = True) -> None:
|
||||
"""Do not reuse a session with the "-r" or "-R" flags."""
|
||||
if session._runner.venv._reused:
|
||||
if session._runner.venv._reused: # noqa:SLF001
|
||||
msg = 'be run without the "-r" and "-R" flags'
|
||||
|
||||
if raise_error:
|
||||
|
|
@ -645,8 +645,9 @@ def skip_install(session: nox.Session) -> bool:
|
|||
"""
|
||||
# Same logic to skip package installation as in core `nox`
|
||||
# See: https://github.com/wntrblm/nox/blob/2026.10.20/nox/sessions.py#L905
|
||||
venv = session._runner.venv
|
||||
return bool(session._runner.global_config.no_install and venv._reused)
|
||||
no_install = session._runner.global_config.no_install # noqa:SLF001
|
||||
venv_reused = session._runner.venv._reused # noqa:SLF001
|
||||
return bool(no_install and venv_reused)
|
||||
|
||||
|
||||
if MAIN_PYTHON not in SUPPORTED_PYTHONS:
|
||||
|
|
|
|||
Loading…
Reference in a new issue