diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0971bc33..b816ca20 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ ci: repos: # Autoformat: Python code, syntax patterns are modernized - repo: https://github.com/asottile/pyupgrade - rev: v3.14.0 + rev: v3.15.0 hooks: - id: pyupgrade args: @@ -39,7 +39,7 @@ repos: # Autoformat: Python code - repo: https://github.com/psf/black - rev: 23.9.1 + rev: 23.10.1 hooks: - id: black @@ -51,7 +51,7 @@ repos: # Autoformat and linting, misc. details - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: end-of-file-fixer exclude: share/jupyterhub/static/js/admin-react.js diff --git a/jupyterhub/user.py b/jupyterhub/user.py index e4a38f01..0ba868a9 100644 --- a/jupyterhub/user.py +++ b/jupyterhub/user.py @@ -187,7 +187,7 @@ class UserDict(dict): Returns dict with counts of active/pending/ready servers """ - counts = defaultdict(lambda: 0) + counts = defaultdict(int) for user in self.values(): for spawner in user.spawners.values(): pending = spawner.pending