Skip to content

Commit 149e29c

Browse files
chore(deps): update dependency isort to v7 (#379)
Co-authored-by: descope[bot] <107609351+descope[bot]@users.noreply.github.com> Co-authored-by: Omer C <639682+omercnet@users.noreply.github.com>
1 parent a07c154 commit 149e29c

File tree

8 files changed

+1432
-1345
lines changed

8 files changed

+1432
-1345
lines changed

.flake8

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
3636
with:
3737
path: ${{ steps.pip-cache.outputs.dir }}
38-
key: ${{ matrix.python-version }}-v1-${{ hashFiles('**/poetry.lock') }}
38+
key: ${{ matrix.python-version }}-v1-${{ hashFiles('**/uv.lock') }}
3939
restore-keys: |
4040
${{ matrix.python-version }}-v1-
4141

.github/workflows/python-publish.yaml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,11 @@ jobs:
1515
steps:
1616
- name: Checkout
1717
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
18-
- name: Setup
19-
uses: descope/.github/.github/actions/python/poetry/setup@main
20-
with:
21-
python-version: "3.9"
22-
- name: Autobump version
23-
run: |
24-
poetry version $(git describe --tags --abbrev=0)
18+
- name: Install the latest version of uv
19+
uses: astral-sh/setup-uv@v7
2520
- name: Build
26-
uses: descope/.github/.github/actions/python/poetry/build@main
21+
run: |
22+
uv build
2723
- name: Publish
28-
uses: descope/.github/.github/actions/python/poetry/publish@main
29-
with:
30-
token: ${{ secrets.PYPI_TOKEN }}
24+
run: |
25+
uv publish --token ${{ secrets.PYPI_TOKEN }}

.pre-commit-config.yaml

Lines changed: 11 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,21 @@ repos:
1616
types: [python]
1717
entry: "print"
1818
language: pygrep
19-
- repo: https://github.com/PyCQA/isort
20-
rev: 5.12.0
19+
- repo: https://github.com/astral-sh/ruff-pre-commit
20+
rev: v0.8.6
2121
hooks:
22-
- id: isort
23-
args: ["--profile", "black"]
24-
- repo: https://github.com/psf/black
25-
rev: 23.1.0
22+
- id: ruff
23+
args: [--fix]
24+
- id: ruff-format
25+
- repo: https://github.com/astral-sh/uv-pre-commit
26+
rev: 0.5.11
2627
hooks:
27-
- id: black
28-
- repo: https://github.com/asottile/pyupgrade
29-
rev: v3.3.1
30-
hooks:
31-
- id: pyupgrade
32-
args: [--py37-plus]
33-
- repo: https://github.com/pycqa/flake8
34-
rev: 6.0.0
35-
hooks:
36-
- id: flake8
37-
- repo: https://github.com/python-poetry/poetry
38-
rev: 1.4.0
39-
hooks:
40-
- id: poetry-check
41-
files: pyproject.toml
42-
- id: poetry-lock
43-
files: pyproject.toml
44-
- id: poetry-export
45-
args: ["-f", "requirements.txt", "-o", "requirements.txt"]
28+
- id: uv-lock
4629
files: pyproject.toml
47-
- repo: https://github.com/dhatim/python-license-check
48-
rev: 0.8.3
30+
- repo: https://github.com/FHPythonUtils/LicenseCheck
31+
rev: 2025.1.0
4932
hooks:
50-
- id: liccheck
51-
language: system
52-
args: ["--level", "paranoid"]
33+
- id: licensecheck
5334
- repo: https://github.com/compilerla/conventional-pre-commit
5435
rev: v4.3.0
5536
hooks:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ _The names of these roles can be customized in the settings below._
1818
2. Install "django-descope" and add to your INSTALLED_APPS setting like this:
1919

2020
```bash
21-
poetry add django-descope
21+
uv add django-descope
2222
OR
2323
pip install django-descope
2424
```

poetry.lock

Lines changed: 0 additions & 1233 deletions
This file was deleted.

pyproject.toml

Lines changed: 71 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
[build-system]
2-
requires = ["poetry>=2,<3"]
3-
build-backend = "poetry.core.masonry.api"
2+
requires = ["uv_build>=0.9.25,<0.10.0"]
3+
build-backend = "uv_build"
44

5-
[tool.poetry]
5+
[project]
66
name = "django_descope"
77
version = "0.0.dev0"
88
description = "Descope plugin for Django"
9+
authors = [{ name = "Descope", email = "info@descope.com" }]
10+
requires-python = ">=3.9,<4.0"
911
readme = "README.md"
10-
authors = ["Descope <info@descope.com>"]
11-
repository = "https://github.com/descope/django-descope"
12-
documentation = "https://docs.descope.com"
13-
keywords = ["descope", "jwt", "authentication", "django"]
1412
license = "MIT"
15-
include = ["LICENSE", "README.md", "src/django_descope/**"]
13+
keywords = [
14+
"descope",
15+
"jwt",
16+
"authentication",
17+
"django",
18+
]
1619
classifiers = [
1720
"Environment :: Web Environment",
1821
"Framework :: Django",
@@ -36,70 +39,73 @@ classifiers = [
3639
"Programming Language :: Python :: 3.13",
3740
"Topic :: Internet :: WWW/HTTP",
3841
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
39-
42+
"Programming Language :: Python :: 3.14",
43+
]
44+
dependencies = [
45+
"Django>=3.2.25,<5.3",
46+
"descope>=1.5.1,<2",
4047
]
4148

42-
[tool.poetry.dependencies]
43-
python = ">=3.9,<4.0"
44-
Django = ">=3.2.19,<5.3"
45-
descope = "^1.5.1"
49+
[project.urls]
50+
Repository = "https://github.com/descope/django-descope"
51+
Documentation = "https://docs.descope.com"
4652

47-
[tool.poetry.group.dev.dependencies]
48-
flake8 = "7.3.0"
49-
black = "25.11.0"
50-
pre-commit = { version = "4.4.0", python = ">=3.9" }
51-
liccheck = "0.9.2"
52-
isort = "6.1.0"
53-
python-dotenv = "1.2.0"
54-
tox = "4.31.0"
55-
django-debug-toolbar = "5.2.0"
56-
django-stubs = {version = "5.2.8", python = ">=3.10"}
53+
[dependency-groups]
54+
dev = [
55+
"ruff==0.8.6",
56+
"pre-commit==4.3.0 ; python_full_version >= '3.9'",
57+
"liccheck==0.9.2",
58+
"python-dotenv==1.1.1",
59+
"tox==4.31.0 ; python_full_version >= '3.10'",
60+
"tox<4.31.0 ; python_full_version < '3.10'",
61+
"django-debug-toolbar==5.2.0",
62+
"django-stubs==5.2.7 ; python_full_version >= '3.10'",
63+
"licensecheck==2025.1.0",
64+
]
5765

58-
# Authorized and unauthorized licenses in LOWER CASE
59-
[tool.liccheck]
60-
authorized_licenses = [
61-
"bsd",
62-
"new bsd",
63-
"bsd license",
64-
"new bsd license",
65-
"simplified bsd",
66-
"apache",
67-
"apache 2.0",
68-
"apache software",
69-
"apache software license",
70-
"isc",
71-
"isc license",
72-
"isc license (iscl)",
73-
"mit",
74-
"mit license",
75-
"python software foundation",
76-
"python software foundation license",
66+
[tool.uv.build-backend]
67+
module-root = ""
68+
source-include = [
69+
"LICENSE",
70+
"README.md",
71+
"src/django_descope/**",
7772
]
7873

79-
unauthorized_licenses = [
80-
"gpl v3",
81-
"gnu lgpl",
82-
"lgpl with exceptions or zpl",
83-
"zpl 2.1",
74+
# Authorized and unauthorized licenses in LOWER CASE
75+
[tool.licensecheck]
76+
show_only_failing = true
77+
78+
[tool.ruff]
79+
line-length = 120
80+
target-version = "py39"
81+
82+
[tool.ruff.lint]
83+
select = [
84+
"E", # pycodestyle errors
85+
"W", # pycodestyle warnings
86+
"F", # pyflakes
87+
"I", # isort
88+
"UP", # pyupgrade
89+
"DJ", # django-specific rules
8490
]
91+
ignore = [
92+
"E402", # module level import not at top of file
93+
"E501", # line too long (handled by formatter)
94+
]
95+
96+
[tool.ruff.lint.per-file-ignores]
97+
"**/migrations/*.py" = ["E501", "DJ"]
98+
"**/settings.py" = ["E501"]
8599

86-
[tool.liccheck.authorized_packages]
87-
# Apache-2.0 license
88-
coverage = "6.3.3"
89-
# CC0 1.0 Universal (CC0 1.0) Public Domain Dedication license
90-
email-validator = ">=1.3.0"
91-
#Public Domain (filelock package is dependency of filelock << virtualenv << pre-commit)
92-
filelock = ">=3.4.1"
93-
#Mozilla Public License 2.0 (MPL 2.0) (certifi package is dependency of requests
94-
certifi = ">=2021.10.8"
100+
[tool.ruff.lint.isort]
101+
known-first-party = ["config", "django_descope"]
102+
section-order = ["future", "standard-library", "django", "third-party", "first-party", "local-folder"]
95103

96-
[tool.black]
97-
line-length = 119
104+
[tool.ruff.lint.isort.sections]
105+
django = ["django"]
98106

99-
[tool.isort]
100-
profile = "django"
101-
combine_as_imports = true
102-
include_trailing_comma = true
103-
line_length = 88
104-
multi_line_output = 3
105-
known_first_party = ["config"]
107+
[tool.ruff.format]
108+
quote-style = "double"
109+
indent-style = "space"
110+
skip-magic-trailing-comma = false
111+
line-ending = "auto"

0 commit comments

Comments
 (0)