This commit is contained in:
pre-commit-ci[bot] 2026-03-16 17:38:54 +00:00 committed by GitHub
commit 094d078e4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 5 deletions

View file

@ -6,13 +6,13 @@ repos:
- id: trailing-whitespace
- repo: https://github.com/pycqa/isort
rev: "7.0.0"
rev: "8.0.1"
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/psf/black
rev: 25.12.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 26.3.1
hooks:
- id: black
args: [--target-version=py310]

View file

@ -42,11 +42,11 @@ def avatar_path_handler(
# Filename already stored in database
filename = instance.avatar.name
if ext:
(root, oldext) = os.path.splitext(filename)
root, oldext = os.path.splitext(filename)
filename = root + "." + ext.lower()
else:
# File doesn't exist yet
(root, oldext) = os.path.splitext(filename)
root, oldext = os.path.splitext(filename)
if settings.AVATAR_HASH_FILENAMES:
if settings.AVATAR_RANDOMIZE_HASHES:
root = binascii.hexlify(os.urandom(16)).decode("ascii")

View file

@ -1,5 +1,6 @@
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys