Skip to content

Commit bd48a49

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 07d20a3 commit bd48a49

File tree

3 files changed

+27
-21
lines changed

3 files changed

+27
-21
lines changed

docs/conf.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,18 @@ def setup(app):
154154

155155
branch = os.getenv("GITHUB_REF_NAME", "latest")
156156

157-
translate([
158-
# The glob patterns in `babel_ocds_schema.cfg` should match these filenames.
159-
(glob(str(standard_dir / "*-schema.json")), standard_build_dir, schema_domain),
160-
# The glob patterns in `babel_ocds_codelist.cfg` should match these.
161-
(glob(str(standard_dir / "codelists" / "*.csv")), standard_build_dir / "codelists", codelists_domain),
162-
], localedir, language, headers, version=branch)
157+
translate(
158+
[
159+
# The glob patterns in `babel_ocds_schema.cfg` should match these filenames.
160+
(glob(str(standard_dir / "*-schema.json")), standard_build_dir, schema_domain),
161+
# The glob patterns in `babel_ocds_codelist.cfg` should match these.
162+
(glob(str(standard_dir / "codelists" / "*.csv")), standard_build_dir / "codelists", codelists_domain),
163+
],
164+
localedir,
165+
language,
166+
headers,
167+
version=branch,
168+
)
163169

164170
with (standard_build_dir / "release-schema.json").open() as f:
165171
fieldnames, rows = mapping_sheet(json.load(f), infer_required=True)

tests/__init__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
languages = {
2-
'en': 'English',
3-
'es': 'Español',
4-
'fr': 'Français',
2+
"en": "English",
3+
"es": "Español",
4+
"fr": "Français",
55
}
66

77
test_basic_params = {
8-
'en': 'Open Contracting Data Standard',
9-
'es': 'Estándar de Datos para las Contrataciones Abiertas',
10-
'fr': 'Standard de Données sur la Commande Publique Ouverte',
8+
"en": "Open Contracting Data Standard",
9+
"es": "Estándar de Datos para las Contrataciones Abiertas",
10+
"fr": "Standard de Données sur la Commande Publique Ouverte",
1111
}
1212

1313
test_search_params = [
14-
('en', r'found \d+ page\(s\) matching'),
14+
("en", r"found \d+ page\(s\) matching"),
1515
# See https://github.com/sphinx-doc/sphinx/issues/11008
1616
# ('es', r'encontraron \d+ páginas que coinciden'), # noqa: ERA001
1717
# ('fr', r'\d+ page\(s\) correspondant'), # noqa: ERA001

tests/test_schema_integrity.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,27 @@
1414

1515

1616
def test_versioned_release_schema_is_in_sync():
17-
with open('schema/versioned-release-validation-schema.json') as f:
17+
with open("schema/versioned-release-validation-schema.json") as f:
1818
actual = json.load(f)
1919

20-
with open('schema/release-schema.json') as f:
20+
with open("schema/release-schema.json") as f:
2121
expected = get_versioned_release_schema(json.load(f))
2222

23-
assert actual == expected, 'Run: python manage.py pre-commit'
23+
assert actual == expected, "Run: python manage.py pre-commit"
2424

2525

2626
def test_dereferenced_release_schema_is_in_sync():
27-
with open('schema/dereferenced-release-schema.json') as f:
27+
with open("schema/dereferenced-release-schema.json") as f:
2828
actual = json.load(f)
2929

30-
with open('schema/release-schema.json') as f:
30+
with open("schema/release-schema.json") as f:
3131
expected = jsonref.load(f, merge_props=True)
3232

33-
assert actual == expected, 'Run: python manage.py pre-commit'
33+
assert actual == expected, "Run: python manage.py pre-commit"
3434

3535

3636
def test_meta_schema_is_in_sync():
37-
with open('schema/meta-schema.json') as f:
37+
with open("schema/meta-schema.json") as f:
3838
actual = json.load(f)
3939

40-
assert actual == get_metaschema(), 'Run: python manage.py pre-commit'
40+
assert actual == get_metaschema(), "Run: python manage.py pre-commit"

0 commit comments

Comments
 (0)