Skip to content

Commit f28c506

Browse files
authored
Merge branch 'master' into sobolevn-patch-2
2 parents 74bdf92 + 29e9544 commit f28c506

File tree

23 files changed

+354
-263
lines changed

23 files changed

+354
-263
lines changed

.github/dependabot.yml

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

.github/renovate.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"dependencyDashboard": true,
3+
"mode": "full",
4+
"lockFileMaintenance": {
5+
"enabled": true,
6+
"automerge": true,
7+
"automergeType": "branch",
8+
"schedule": ["* * * * 1"],
9+
"automergeSchedule": ["* * * * 2"]
10+
},
11+
"packageRules": [
12+
]
13+
}

.github/workflows/mypy_primer.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
shard-index: [0] # e.g. change this to [0, 1, 2] and --num-shards below to 3
2121
fail-fast: false
2222
steps:
23-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
23+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
2424
with:
2525
path: django-stubs_to_test
2626
fetch-depth: 0
@@ -64,15 +64,15 @@ jobs:
6464
run: |
6565
echo ${{ github.event.pull_request.number }} | tee pr_number.txt
6666
- name: Upload mypy_primer diff + PR number
67-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
67+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
6868
if: ${{ matrix.shard-index == 0 }}
6969
with:
7070
name: mypy_primer_diffs-${{ matrix.shard-index }}
7171
path: |
7272
diff_${{ matrix.shard-index }}.txt
7373
pr_number.txt
7474
- name: Upload mypy_primer diff
75-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
75+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
7676
if: ${{ matrix.shard-index != 0 }}
7777
with:
7878
name: mypy_primer_diffs-${{ matrix.shard-index }}
@@ -86,7 +86,7 @@ jobs:
8686
contents: read
8787
steps:
8888
- name: Merge artifacts
89-
uses: actions/upload-artifact/merge@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
89+
uses: actions/upload-artifact/merge@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
9090
with:
9191
name: mypy_primer_diffs
9292
pattern: mypy_primer_diffs-*

.github/workflows/mypy_primer_comment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
return parseInt(fs.readFileSync("pr_number.txt", { encoding: "utf8" }))
5050
5151
- name: Hide old comments
52-
uses: int128/hide-comment-action@9803637eab610cca14ac6f64c42c0d7ffe9327e0 # v1.44.0
52+
uses: int128/hide-comment-action@3580fff2b9b7c0e16466686530622f0eed93132a # v1.47.0
5353
with:
5454
token: ${{ secrets.GITHUB_TOKEN }}
5555
issue-number: ${{ steps.get-pr-number.outputs.result }}

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- master
7+
# Renovate "automerge" branches -- there is no PR, so branch tests are used instead
8+
- "renovate/lock-file-maintenance"
79
pull_request:
810
workflow_dispatch:
911

.pre-commit-config.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repos:
1515
args: [--fix=lf]
1616
- id: check-case-conflict
1717
- repo: https://github.com/astral-sh/ruff-pre-commit
18-
rev: v0.13.3
18+
rev: v0.14.5
1919
hooks:
2020
- id: ruff-check
2121
args: ["--fix", "--exit-non-zero-on-fix"]
@@ -26,10 +26,16 @@ repos:
2626
- id: codespell
2727
additional_dependencies:
2828
- tomli
29+
- repo: https://github.com/astral-sh/uv-pre-commit
30+
rev: 0.9.9
31+
hooks:
32+
- id: uv-lock
2933

3034
ci:
3135
autofix_commit_msg: "[pre-commit.ci] auto fixes from pre-commit.com hooks"
3236
autofix_prs: true
3337
autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
3438
autoupdate_schedule: weekly
3539
submodules: false
40+
skip:
41+
- uv-lock

django-stubs/conf/global_settings.pyi

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ MANAGERS: _Admins
7777
# Content-Type header.
7878
DEFAULT_CHARSET: str
7979

80+
# `SERIALIZATION_MODULES` is a dictionary (`dict[str, str]`) of modules containing serializer definitions.
81+
# Because Django doesn't define it, we can't provide its type here. Use `getattr` for type-safe access
82+
# e.g. `getattr(settings, "SERIALIZATION_MODULES")`
83+
8084
# Email address that error messages come from.
8185
SERVER_EMAIL: str
8286

@@ -96,6 +100,10 @@ DATABASE_ROUTERS: list[str | Router]
96100
# to a module that defines an EmailBackend class.
97101
EMAIL_BACKEND: str
98102

103+
# `EMAIL_FILE_PATH` is a `str` indicating the directory used by the file email backend to store output files.
104+
# Because Django doesn't define it, we can't provide its type here. Use `getattr` for type-safe access
105+
# e.g. `getattr(settings, "EMAIL_FILE_PATH")`
106+
99107
# Host for sending email.
100108
EMAIL_HOST: str
101109

@@ -170,6 +178,10 @@ ABSOLUTE_URL_OVERRIDES: dict[str, Any]
170178
# ]
171179
IGNORABLE_404_URLS: list[Pattern[str]]
172180

181+
# `ROOT_URLCONF` is a string representing the full Python import path to the root `URLconf`.
182+
# Because Django doesn't define it, we can't provide its type here. Use `getattr` for type-safe access
183+
# e.g. `getattr(settings, "ROOT_URLCONF")`
184+
173185
# A secret key for this particular Django installation. Used in secret-key
174186
# hashing algorithms. Set this in your settings, or Django will complain
175187
# loudly.
@@ -189,6 +201,10 @@ MEDIA_ROOT: str
189201
# Examples: "http://example.com/media/", "http://media.example.com/"
190202
MEDIA_URL: str
191203

204+
# `SITE_ID` is the ID, as an integer, of the current site in the `django_site` database table.
205+
# Because Django doesn't define it, we can't provide its type here. Use `getattr` for type-safe access
206+
# e.g. `getattr(settings, "SITE_ID")`
207+
192208
# Absolute path to the directory static files should be collected to.
193209
# Example: "/var/www/example.com/static/"
194210
STATIC_ROOT: str | None
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
from typing import Any
1+
from typing import ClassVar
22

33
from django.http.request import HttpRequest
4-
from django.http.response import HttpResponse
4+
from django.http.response import HttpResponse, HttpResponseBase, HttpResponseRedirectBase
55
from django.utils.deprecation import MiddlewareMixin
66

77
class RedirectFallbackMiddleware(MiddlewareMixin):
8-
response_gone_class: Any
9-
response_redirect_class: Any
8+
response_gone_class: ClassVar[type[HttpResponseBase]]
9+
response_redirect_class: ClassVar[type[HttpResponseRedirectBase]]
1010
def process_response(self, request: HttpRequest, response: HttpResponse) -> HttpResponse: ...

django-stubs/db/models/query.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ _OrderByFieldName: TypeAlias = str | Combinable
2828

2929
MAX_GET_RESULTS: int
3030
REPR_OUTPUT_SIZE: int
31+
PROHIBITED_FILTER_KWARGS: frozenset[str]
3132

3233
class BaseIterable(Generic[_T]):
3334
queryset: QuerySet[Model]

django-stubs/db/models/query_utils.pyi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ class PathInfo(NamedTuple):
2727
def subclasses(cls: type[RegisterLookupMixin]) -> Iterator[type[RegisterLookupMixin]]: ...
2828

2929
class Q(tree.Node):
30-
AND: str
31-
OR: str
30+
AND: Literal["AND"]
31+
OR: Literal["OR"]
32+
XOR: Literal["XOR"]
3233
conditional: bool
34+
connectors: tuple[None, Literal["AND"], Literal["OR"], Literal["XOR"]]
3335
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
3436
# Fake signature, the real is
3537
# def __init__(self, *args: Any, _connector: Any | None = ..., _negated: bool = ..., **kwargs: Any) -> None: ...

0 commit comments

Comments
 (0)