civics-cdf-validator 1.66.dev0__tar.gz → 1.66.dev1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {civics_cdf_validator-1.66.dev0/civics_cdf_validator.egg-info → civics_cdf_validator-1.66.dev1}/PKG-INFO +1 -1
- {civics_cdf_validator-1.66.dev0 → civics_cdf_validator-1.66.dev1/civics_cdf_validator.egg-info}/PKG-INFO +1 -1
- {civics_cdf_validator-1.66.dev0 → civics_cdf_validator-1.66.dev1}/rules.py +25 -2
- {civics_cdf_validator-1.66.dev0 → civics_cdf_validator-1.66.dev1}/version.py +1 -1
- {civics_cdf_validator-1.66.dev0 → civics_cdf_validator-1.66.dev1}/CONTRIBUTING.md +0 -0
- {civics_cdf_validator-1.66.dev0 → civics_cdf_validator-1.66.dev1}/LICENSE-2.0.txt +0 -0
- {civics_cdf_validator-1.66.dev0 → civics_cdf_validator-1.66.dev1}/MANIFEST.in +0 -0
- {civics_cdf_validator-1.66.dev0 → civics_cdf_validator-1.66.dev1}/README.md +0 -0
- {civics_cdf_validator-1.66.dev0 → civics_cdf_validator-1.66.dev1}/__init__.py +0 -0
- {civics_cdf_validator-1.66.dev0 → civics_cdf_validator-1.66.dev1}/base.py +0 -0
- {civics_cdf_validator-1.66.dev0 → civics_cdf_validator-1.66.dev1}/civics_cdf_validator.egg-info/SOURCES.txt +0 -0
- {civics_cdf_validator-1.66.dev0 → civics_cdf_validator-1.66.dev1}/civics_cdf_validator.egg-info/dependency_links.txt +0 -0
- {civics_cdf_validator-1.66.dev0 → civics_cdf_validator-1.66.dev1}/civics_cdf_validator.egg-info/entry_points.txt +0 -0
- {civics_cdf_validator-1.66.dev0 → civics_cdf_validator-1.66.dev1}/civics_cdf_validator.egg-info/requires.txt +0 -0
- {civics_cdf_validator-1.66.dev0 → civics_cdf_validator-1.66.dev1}/civics_cdf_validator.egg-info/top_level.txt +0 -0
- {civics_cdf_validator-1.66.dev0 → civics_cdf_validator-1.66.dev1}/gpunit_rules.py +0 -0
- {civics_cdf_validator-1.66.dev0 → civics_cdf_validator-1.66.dev1}/loggers.py +0 -0
- {civics_cdf_validator-1.66.dev0 → civics_cdf_validator-1.66.dev1}/office_utils.py +0 -0
- {civics_cdf_validator-1.66.dev0 → civics_cdf_validator-1.66.dev1}/setup.cfg +0 -0
- {civics_cdf_validator-1.66.dev0 → civics_cdf_validator-1.66.dev1}/setup.py +0 -0
- {civics_cdf_validator-1.66.dev0 → civics_cdf_validator-1.66.dev1}/stats.py +0 -0
- {civics_cdf_validator-1.66.dev0 → civics_cdf_validator-1.66.dev1}/validator.py +0 -0
|
@@ -1710,6 +1710,27 @@ class PersonsMissingPartyData(base.BaseRule):
|
|
|
1710
1710
|
)
|
|
1711
1711
|
|
|
1712
1712
|
|
|
1713
|
+
class CandidateImageInContactInformation(base.BaseRule):
|
|
1714
|
+
"""Warn if candidate-image is set in ContactInformation.Uri."""
|
|
1715
|
+
|
|
1716
|
+
def elements(self):
|
|
1717
|
+
return ["ContactInformation"]
|
|
1718
|
+
|
|
1719
|
+
def check(self, element):
|
|
1720
|
+
candidate_image_uris = []
|
|
1721
|
+
for uri in element.findall("Uri"):
|
|
1722
|
+
annotation = uri.get("Annotation", "").strip()
|
|
1723
|
+
if annotation == "candidate-image":
|
|
1724
|
+
candidate_image_uris.append(uri)
|
|
1725
|
+
|
|
1726
|
+
if candidate_image_uris:
|
|
1727
|
+
raise loggers.ElectionWarning.from_message(
|
|
1728
|
+
"Annotation 'candidate-image' in ContactInformation.Uri is"
|
|
1729
|
+
" deprecated. Please use Person.ImageUri instead.",
|
|
1730
|
+
candidate_image_uris,
|
|
1731
|
+
)
|
|
1732
|
+
|
|
1733
|
+
|
|
1713
1734
|
class OnlyOneCandidateImagePerPerson(base.BaseRule):
|
|
1714
1735
|
"""Ensure only one candidate-image is provided per Person."""
|
|
1715
1736
|
|
|
@@ -2386,8 +2407,9 @@ class ValidURIAnnotation(base.BaseRule):
|
|
|
2386
2407
|
"URI {} is missing annotation.".format(ascii_url), [uri]
|
|
2387
2408
|
)
|
|
2388
2409
|
|
|
2389
|
-
# Skip platform checks for office contact form
|
|
2390
|
-
|
|
2410
|
+
# Skip platform checks for office contact form and candidate-image
|
|
2411
|
+
# annotations.
|
|
2412
|
+
if annotation in ("office-contact_form", "candidate-image"):
|
|
2391
2413
|
continue
|
|
2392
2414
|
|
|
2393
2415
|
ann_elements = annotation.split("-")
|
|
@@ -5500,6 +5522,7 @@ COMMON_RULES = (
|
|
|
5500
5522
|
AllInternationalizedTextHaveEnVersion,
|
|
5501
5523
|
AllLanguages,
|
|
5502
5524
|
BadCharactersInPersonFullName,
|
|
5525
|
+
CandidateImageInContactInformation,
|
|
5503
5526
|
DeprecatedPartyLeadershipSchema,
|
|
5504
5527
|
DuplicateGpUnits,
|
|
5505
5528
|
DuplicateID,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|