@@ -46,7 +46,7 @@ def activate_virtualenv_in_precommit_hooks(session: Session) -> None:
4646 Args:
4747 session: The Session object.
4848 """
49- assert session .bin is not None # noqa: S101
49+ assert session .bin is not None # nosec
5050
5151 # Only patch hooks containing a reference to this session's bindir. Support
5252 # quoting rules for Python and bash, but strip the outermost quotes so we
@@ -110,15 +110,15 @@ def activate_virtualenv_in_precommit_hooks(session: Session) -> None:
110110 break
111111
112112
113- @session (name = "pre-commit" , python = "3.10" )
113+ @session (name = "pre-commit" , python = python_versions [ 0 ] )
114114def precommit (session : Session ) -> None :
115115 """Lint using pre-commit."""
116116 args = session .posargs or ["run" , "--all-files" , "--show-diff-on-failure" ]
117117 session .install (
118+ "bandit" ,
118119 "black" ,
119120 "darglint" ,
120121 "flake8" ,
121- "flake8-bandit" ,
122122 "flake8-bugbear" ,
123123 "flake8-docstrings" ,
124124 "flake8-rst-docstrings" ,
@@ -133,7 +133,7 @@ def precommit(session: Session) -> None:
133133 activate_virtualenv_in_precommit_hooks (session )
134134
135135
136- @session (python = "3.10" )
136+ @session (python = python_versions [ 0 ] )
137137def safety (session : Session ) -> None :
138138 """Scan dependencies for insecure packages."""
139139 requirements = session .poetry .export_requirements ()
@@ -211,7 +211,7 @@ def docs_build(session: Session) -> None:
211211 session .run ("sphinx-build" , * args )
212212
213213
214- @session (python = "3.10" )
214+ @session (python = python_versions [ 0 ] )
215215def docs (session : Session ) -> None :
216216 """Build and serve the documentation with live reloading on file changes."""
217217 args = session .posargs or ["--open-browser" , "docs" , "docs/_build" ]
0 commit comments