ajouter le hook double-quote-string-fixer (#79788) #4

Merged
vdeniaud merged 3 commits from wip/79788-single-quotes into main 2023-08-16 10:30:37 +02:00
6 changed files with 27 additions and 21 deletions

View File

@ -2,3 +2,5 @@
6006c9655793c895ce896c18770620e79a315038
# code-style: apply pre-commit-debian (#66586)
2e74a552d3466cd2c1d330ada1f72293cbb66a4a
# misc: apply double-quote-string-fixer (#79788)
6eda381331347c8359555167927c3f8301d1bd1b

View File

@ -1,6 +1,10 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: double-quote-string-fixer
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:

View File

@ -41,7 +41,7 @@ class build(_build):
class eo_sdist(sdist):
def run(self):
print("creating VERSION file")
print('creating VERSION file')
if os.path.exists('VERSION'):
os.remove('VERSION')
version = get_version()
@ -49,7 +49,7 @@ class eo_sdist(sdist):
version_file.write(version)
version_file.close()
sdist.run(self)
print("removing VERSION file")
print('removing VERSION file')
if os.path.exists('VERSION'):
os.remove('VERSION')
@ -93,7 +93,7 @@ setup(
license='AGPLv3',
description='Authentic2 CUT plugin',
author="Entr'ouvert",
author_email="info@entrouvert.com",
author_email='info@entrouvert.com',
packages=find_packages('src'),
package_dir={
'': 'src',

View File

@ -280,7 +280,7 @@ class AppConfig(django.apps.AppConfig):
verbose_name=_('Email'),
args=[A('pk')],
accessor='email',
attrs={"td": {"class": "link"}},
attrs={'td': {'class': 'link'}},
)
table.base_columns = base_columns
table.sequence = sequence

View File

@ -95,35 +95,35 @@ A2_FC_USER_INFO_MAPPINGS = {
A2_FC_SCOPES = ['openid', 'identite_pivot', 'email']
TEMPLATE_VARS = {
"help_url": 'https://support.grandlyon.com/glc/',
"account_label": "compte GRANDLYON CONNECT",
"partners_url": "https://www.grandlyon.com/projets/metropole-intelligente.html",
"support_url": "https://support.grandlyon.com/glc/#generalites",
'help_url': 'https://support.grandlyon.com/glc/',
'account_label': 'compte GRANDLYON CONNECT',
'partners_url': 'https://www.grandlyon.com/projets/metropole-intelligente.html',
'support_url': 'https://support.grandlyon.com/glc/#generalites',
}
if PLATFORM == 'dev':
TEMPLATE_VARS.update(
{
"environment_label": "Site de développement",
"moncompte_url": 'https://connexion-grandlyon.dev.entrouvert.org',
"help_url": "https://portail-citoyen-sau.guichet-recette.grandlyon.com/glc/",
'environment_label': 'Site de développement',
'moncompte_url': 'https://connexion-grandlyon.dev.entrouvert.org',
'help_url': 'https://portail-citoyen-sau.guichet-recette.grandlyon.com/glc/',
}
)
elif PLATFORM == 'test':
TEMPLATE_VARS.update(
{
"environment_label": "Site de test",
"smarttag_js": "https://tag.aticdn.net/586793/smarttag.js",
"visits_tracking_js": "var tag = new ATInternet.Tracker.Tag();",
"moncompte_url": 'https://moncompte-rec.grandlyon.com',
"help_url": "https://portail-citoyen-sau.guichet-recette.grandlyon.com/glc/",
'environment_label': 'Site de test',
'smarttag_js': 'https://tag.aticdn.net/586793/smarttag.js',
'visits_tracking_js': 'var tag = new ATInternet.Tracker.Tag();',
'moncompte_url': 'https://moncompte-rec.grandlyon.com',
'help_url': 'https://portail-citoyen-sau.guichet-recette.grandlyon.com/glc/',
}
)
elif PLATFORM == 'prod':
TEMPLATE_VARS.update(
{
"smarttag_js": "https://tag.aticdn.net/586794/smarttag.js",
"visits_tracking_js": "var tag = new ATInternet.Tracker.Tag();",
"moncompte_url": 'https://moncompte.grandlyon.com',
'smarttag_js': 'https://tag.aticdn.net/586794/smarttag.js',
'visits_tracking_js': 'var tag = new ATInternet.Tracker.Tag();',
'moncompte_url': 'https://moncompte.grandlyon.com',
}
)

View File

@ -88,8 +88,8 @@ def test_a2_hook_idp_oidc_modify_user_info(db, rf, app):
assert value is None
profile_type = ProfileType.objects.create(
name="Mandataire",
slug="mandataire",
name='Mandataire',
slug='mandataire',
)
profile = Profile.objects.create(
profile_type=profile_type,