Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pre commit, lint files and fix docs #39

Open
wants to merge 26 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
adbdd0c
Remove unsupported Django imports
mikemanger Jul 29, 2024
23f2038
Replace various pre-commit tasks with ruff
mikemanger Jul 29, 2024
60c153d
Run ruff on project
mikemanger Jul 29, 2024
e560c70
Add Python 10/11 support to project meta
mikemanger Jul 29, 2024
129d4d6
Configure ruff to use flake8, isort and pyupgrade
mikemanger Jul 29, 2024
6f26ddf
Run ruff on all files
mikemanger Jul 29, 2024
c1f18b0
Merge pull request #2 from iplweb/develop
mikemanger Jul 29, 2024
6a099b7
Merge branch 'upstream-develop' of https://github.com/mikemanger/djan…
mikemanger Jul 29, 2024
1a17723
Merge branch 'upstream-develop' into update-pre-commit
mikemanger Jul 29, 2024
b7a792c
Run all pre-commit tasks
mikemanger Jul 29, 2024
7575a08
Add Ruff job to CI workflow
mikemanger Jul 29, 2024
fe6e95c
Allow workflow to be triggered manually
mikemanger Jul 29, 2024
02ed7cb
Add __str__() definitions to models
mikemanger Jul 29, 2024
d4b11a0
Add python 3.7 and 3.12 to setup classifiers
mikemanger Jul 29, 2024
23dfa0f
Update documentation to use forked library
mikemanger Jul 29, 2024
2fcc3eb
Fix documentation not compiling in Python 12
mikemanger Jul 29, 2024
fbfdfbe
Update documentation link
mikemanger Jul 29, 2024
6b5c547
Update various URLs to use https
mikemanger Jul 29, 2024
020da42
Add HISTORY note
mikemanger Jul 29, 2024
00cfb81
Fix minor documentation issue on PasswordChangeMiddleware
mikemanger Jul 29, 2024
09436f5
Update min django version in install.rst
mikemanger Jul 29, 2024
d321227
ngettext is supported in Django 2.2
mikemanger Jul 29, 2024
b05899c
Add Python version to README
mikemanger Jul 29, 2024
b2a0ff6
Use path instead of re_path in most cases
mikemanger Jul 29, 2024
2a44792
Add django-upgrade pre-commit task and fix a couple of issues
mikemanger Jul 29, 2024
cfda46b
Merge branch 'update-pre-commit' of https://github.com/mikemanger/dja…
mikemanger Jul 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# http://editorconfig.org
# https://editorconfig.org

root = true

6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -6,8 +6,14 @@ on:
- master
- develop
pull_request:
workflow_dispatch:

jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
tests:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
65 changes: 13 additions & 52 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -8,65 +8,26 @@ repos:
entry: 'breakpoint\(\)|set_trace'
language: pygrep

- repo: https://github.com/myint/autoflake
rev: 'v1.4'
hooks:
- id: autoflake
args: ['--in-place', '--remove-all-unused-imports',]

- repo: https://github.com/pre-commit/mirrors-autopep8
rev: 'v1.6.0'
hooks:
- id: autopep8
args: ['--in-place', '-aaa',]

- repo: https://github.com/hadialqattan/pycln
rev: 'v1.1.0'
hooks:
- id: pycln

- repo: https://github.com/pre-commit/mirrors-isort
rev: 'v5.10.1' # Use the revision sha / tag you want to point at
hooks:
- id: isort
args: ["--profile", "black"]

- repo: https://github.com/psf/black
rev: '22.3.0'
hooks:
- id: black
- repo: https://github.com/adamchainz/django-upgrade
rev: "1.20.0"
hooks:
- id: django-upgrade
args: [--target-version, "2.2"]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.1.0'
rev: 'v4.6.0'
hooks:
- id: check-yaml
- id: check-toml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending

- repo: https://github.com/PyCQA/flake8
rev: '6.0.0'
hooks:
- id: flake8
args: ["--exclude=*/migrations/*"]

#
# - repo: local
# hooks:
# - id: pylint
# name: pylint
# entry: pylint
# language: system
# types: [python]
# args:
# [
# "-rn", # Only display messages
# "-sn", # Don't display the score
# ]
#
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.5
hooks:
- id: pyupgrade
args: ["--py37-plus"]
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
9 changes: 8 additions & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
Unreleased
----------

* Remove unsupported Django code
* Added ``__str__()`` definitions for models
* Use path instead of re_path for some URLs

0.8.6
-----

* Django 5 support
* default to JSONSerializer

0.8.4
-----

4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ As for now (Jan 2021), this fork is actively maintained by |iplweb|
Requirements
=============

This application requires `Django`_ 2.2 or newer
This application requires `Django`_ 2.2 and Python 3.7 or newer.

.. _documentation:

@@ -33,6 +33,6 @@ Documentation

A detailled documentation is available on `the project's GitHub Pages`_.

.. _`the project's GitHub Pages`: http://github.com/iplweb/django-password-policies-iplweb
.. _`the project's GitHub Pages`: https://iplweb.github.io/django-password-policies-iplweb/
.. _`Django`: https://www.djangoproject.com/
.. -`IPLweb on github`: https://github.com/iplweb/
1 change: 0 additions & 1 deletion docs/_ext/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

Loading