Skip to content

Commit

Permalink
Update for Black 2024 style, start work on a release.
Browse files Browse the repository at this point in the history
  • Loading branch information
ubernostrum committed Feb 14, 2024
1 parent e093614 commit f2e6428
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 19 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand All @@ -16,13 +16,13 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.1.0
rev: 24.2.0
hooks:
- id: black
language_version: python3.7
language_version: python3.8
name: black (Python formatter)
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 7.0.0
hooks:
- id: flake8
name: flake8 (Python linter)
Expand All @@ -33,7 +33,7 @@ repos:
name: interrogate (Python docstring enforcer)
args: [--quiet]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
name: isort (Python formatter)
5 changes: 3 additions & 2 deletions docs/conf.py
Expand Up @@ -4,6 +4,7 @@
https://www.sphinx-doc.org/
"""

import os
import sys

Expand All @@ -22,8 +23,8 @@
master_doc = "index"
project = "django-registration"
copyright = "2007, James Bennett"
version = "3.4"
release = "3.4"
version = "3.5a1"
release = "3.5a1"
exclude_trees = ["_build"]
pygments_style = "sphinx"
htmlhelp_basename = "django-registrationdoc"
Expand Down
15 changes: 9 additions & 6 deletions noxfile.py
Expand Up @@ -10,6 +10,7 @@
run a single task, use ``nox -s`` with the name of that task.
"""

import os
import pathlib
import shutil
Expand All @@ -34,7 +35,7 @@
)


def clean(paths: typing.Iterable[os.PathLike] = ARTIFACT_PATHS) -> None:
def clean(paths: typing.Iterable[pathlib.Path] = ARTIFACT_PATHS) -> None:
"""
Clean up after a test run.
Expand All @@ -54,15 +55,17 @@ def clean(paths: typing.Iterable[os.PathLike] = ARTIFACT_PATHS) -> None:
@nox.parametrize(
"python,django",
[
# Python/Django testing matrix. Tests Django 3.2, 4.0, 4.1,
# 4.2, on Python 3.8 through 3.11, skipping unsupported
# combinations.
# Python/Django testing matrix. Tests Django 3.2, 4.2, 5.0, on Python 3.8
# through 3.11, skipping unsupported combinations.
(python, django)
for python in ["3.8", "3.9", "3.10", "3.11"]
for django in ["3.2", "4.1", "4.2"]
for python in ["3.8", "3.9", "3.10", "3.11", "3.12"]
for django in ["3.2", "4.2", "5.0"]
if (python, django)
not in [
("3.11", "3.2"),
("3.12", "3.2"),
("3.8", "5.0"),
("3.9", "5.0"),
]
],
)
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Expand Up @@ -11,31 +11,31 @@ classifiers = [
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Utilities",
]
name = "django-registration"
description = "An extensible user-registration application for Django."
dependencies = [
"Django>=3.2,!=4.0.*",
"Django>=3.2,!=4.0.*,!=4.1.*",
"confusable_homoglyphs~=3.0"
]
dynamic = ["version"]
keywords = ["django", "security", "auth", "authentication"]
license = {text = "BSD-3-Clause"}
readme = "README.rst"
requires-python = ">=3.7"
requires-python = ">=3.8"

[project.urls]
documentation = "https://django-registration.readthedocs.io/"
Expand All @@ -60,7 +60,7 @@ tests = [
skips = ["B101"]

[tool.black]
target-version = ["py37"]
target-version = ["py38", "py39", "py310", "py311", "py312"]

[tool.check-manifest]
ignore-bad-ideas = ["*.mo"]
Expand Down
2 changes: 1 addition & 1 deletion src/django_registration/__init__.py
Expand Up @@ -3,4 +3,4 @@
"""

__version__ = "3.4"
__version__ = "3.5a1"
1 change: 1 addition & 0 deletions src/django_registration/validators.py
Expand Up @@ -3,6 +3,7 @@
django-registration's various user-registration form classes.
"""

# pylint: disable=implicit-str-concat
import re
import unicodedata
Expand Down
1 change: 1 addition & 0 deletions src/django_registration/views.py
Expand Up @@ -2,6 +2,7 @@
Base view classes for all registration workflows.
"""

from django.conf import settings
from django.contrib.auth import get_user_model
from django.core.exceptions import ImproperlyConfigured
Expand Down
1 change: 1 addition & 0 deletions tests/base.py
Expand Up @@ -2,6 +2,7 @@
Base classes for other test cases to inherit from.
"""

import json
from contextlib import contextmanager

Expand Down
1 change: 1 addition & 0 deletions tests/models.py
Expand Up @@ -2,6 +2,7 @@
Custom user model for use in tests.
"""

from django.contrib.auth.base_user import AbstractBaseUser
from django.contrib.auth.models import UserManager
from django.contrib.auth.validators import UnicodeUsernameValidator
Expand Down
1 change: 1 addition & 0 deletions tests/settings.py
Expand Up @@ -2,6 +2,7 @@
Minimal Django settings file for test runs.
"""

import pathlib

from django.utils.crypto import get_random_string
Expand Down
1 change: 1 addition & 0 deletions tests/views.py
Expand Up @@ -3,6 +3,7 @@
covered by the built-in workflows.
"""

from django.urls import reverse_lazy

from django_registration.backends.activation.views import ActivationView
Expand Down

0 comments on commit f2e6428

Please sign in to comment.