-
-
Notifications
You must be signed in to change notification settings - Fork 910
Closed
Description
search you tried in the issue tracker
"not iterable", "Docker None"
describe your issue
This started happening after I updated pre-commit and Docker:
ShellCheck v0.11.0.......................................................An unexpected error has occurred: TypeError: argument of type 'NoneType' is not iterable
Check the log at /Users/jens/.cache/pre-commit/pre-commit.log
make: *** [Makefile:241: check] Error 3
With pre-commit v4.2.0 I now get
ShellCheck v0.11.0.......................................................Failed
- hook id: shellcheck
- exit code: 125
docker: request returned 500 Internal Server Error for API route and version http://%2FUsers%2Fjens%2F.docker%2Frun%2Fdocker.sock/_ping, check if the server supports the requested API version
which wasn’t the case previously. This is for
> docker --version
Docker version 28.3.2, build 578ccf6
but I’ve not tried an older version of Docker yet.
pre-commit --version
pre-commit 4.3.0
.pre-commit-config.yaml
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.11.0
hooks:
- id: shellcheck
args: [--severity=warning]~/.cache/pre-commit/pre-commit.log (if present)
version information
pre-commit version: 4.3.0
git --version: git version 2.50.1
sys.version:
3.13.6 (main, Aug 9 2025, 06:37:32) [Clang 14.0.3 (clang-1403.0.22.14.1)]
sys.executable: /path/to/.venv/bin/python
os.name: posix
sys.platform: darwin
error information
An unexpected error has occurred: TypeError: argument of type 'NoneType' is not iterable
Traceback (most recent call last):
File "/path/to/.venv/lib/python3.13/site-packages/pre_commit/error_handler.py", line 73, in error_handler
yield
File "/path/to/.venv/lib/python3.13/site-packages/pre_commit/main.py", line 417, in main
return run(args.config, store, args)
File "/path/to/.venv/lib/python3.13/site-packages/pre_commit/commands/run.py", line 444, in run
return _run_hooks(config, hooks, skips, args)
File "/path/to/.venv/lib/python3.13/site-packages/pre_commit/commands/run.py", line 296, in _run_hooks
current_retval, prior_diff = _run_single_hook(
~~~~~~~~~~~~~~~~^
classifier, hook, skips, cols, prior_diff,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
verbose=args.verbose, use_color=args.color,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/path/to/.venv/lib/python3.13/site-packages/pre_commit/commands/run.py", line 193, in _run_single_hook
retcode, out = language.run_hook(
~~~~~~~~~~~~~~~~~^
hook.prefix,
^^^^^^^^^^^^
...<5 lines>...
color=use_color,
^^^^^^^^^^^^^^^^
)
^
File "/path/to/.venv/lib/python3.13/site-packages/pre_commit/languages/docker_image.py", line 26, in run_hook
cmd = docker_cmd(color=color) + lang_base.hook_cmd(entry, args)
~~~~~~~~~~^^^^^^^^^^^^^
File "/path/to/.venv/lib/python3.13/site-packages/pre_commit/languages/docker.py", line 146, in docker_cmd
*get_docker_user(),
~~~~~~~~~~~~~~~^^
File "/path/to/.venv/lib/python3.13/site-packages/pre_commit/languages/docker.py", line 128, in get_docker_user
if _is_rootless():
~~~~~~~~~~~~^^
File "/path/to/.venv/lib/python3.13/site-packages/pre_commit/languages/docker.py", line 118, in _is_rootless
'name=rootless' in info.get('SecurityOptions', ()) or
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable
Metadata
Metadata
Assignees
Labels
No labels