Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Renaud Boyer
swh-web
Commits
2cc8d626
Commit
2cc8d626
authored
10 months ago
by
Antoine Lambert
Browse files
Options
Downloads
Patches
Plain Diff
mailmap: Fix mypy errors with django-stubs 5.0.2
parent
f06cc7ed
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
requirements-test.txt
+1
-1
1 addition, 1 deletion
requirements-test.txt
swh/web/mailmap/management/commands/sync_mailmaps.py
+5
-3
5 additions, 3 deletions
swh/web/mailmap/management/commands/sync_mailmaps.py
with
6 additions
and
4 deletions
requirements-test.txt
+
1
−
1
View file @
2cc8d626
beautifulsoup4
decorator # dependency of swh.core[http]
djangorestframework-stubs
django-stubs
!
=
4.2
.2
django-stubs
>
=
5.0
.2
django-test-migrations
hypothesis
pytest >= 8.1
...
...
This diff is collapsed.
Click to expand it.
swh/web/mailmap/management/commands/sync_mailmaps.py
+
5
−
3
View file @
2cc8d626
# Copyright (C) 2022 The Software Heritage developers
# Copyright (C) 2022
-2024
The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU Affero General Public License version 3, or any later version
# See top-level LICENSE file for more information
from
__future__
import
annotations
import
psycopg2
import
psycopg2.extensions
from
psycopg2.extras
import
execute_values
...
...
@@ -46,7 +48,7 @@ class Command(BaseCommand):
def
disable_mailmaps
(
self
,
storage_db
:
psycopg2
.
extensions
.
connection
,
mailmaps
:
"
QuerySet[UserMailmap]
"
,
mailmaps
:
QuerySet
[
UserMailmap
,
UserMailmap
],
):
"""
Return the SQL to disable a set of mailmaps
"""
...
...
@@ -59,7 +61,7 @@ class Command(BaseCommand):
def
refresh_mailmaps
(
self
,
storage_db
:
psycopg2
.
extensions
.
connection
,
mailmaps
:
"
QuerySet[UserMailmap]
"
,
mailmaps
:
QuerySet
[
UserMailmap
,
UserMailmap
],
):
execute_values
(
storage_db
.
cursor
(),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment