civics-cdf-validator 1.52.dev1__tar.gz → 1.52.dev3__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.52.dev1/civics_cdf_validator.egg-info → civics_cdf_validator-1.52.dev3}/PKG-INFO +1 -1
- {civics_cdf_validator-1.52.dev1 → civics_cdf_validator-1.52.dev3/civics_cdf_validator.egg-info}/PKG-INFO +1 -1
- {civics_cdf_validator-1.52.dev1 → civics_cdf_validator-1.52.dev3}/rules.py +9 -7
- {civics_cdf_validator-1.52.dev1 → civics_cdf_validator-1.52.dev3}/version.py +1 -1
- {civics_cdf_validator-1.52.dev1 → civics_cdf_validator-1.52.dev3}/CONTRIBUTING.md +0 -0
- {civics_cdf_validator-1.52.dev1 → civics_cdf_validator-1.52.dev3}/LICENSE-2.0.txt +0 -0
- {civics_cdf_validator-1.52.dev1 → civics_cdf_validator-1.52.dev3}/MANIFEST.in +0 -0
- {civics_cdf_validator-1.52.dev1 → civics_cdf_validator-1.52.dev3}/README.md +0 -0
- {civics_cdf_validator-1.52.dev1 → civics_cdf_validator-1.52.dev3}/__init__.py +0 -0
- {civics_cdf_validator-1.52.dev1 → civics_cdf_validator-1.52.dev3}/base.py +0 -0
- {civics_cdf_validator-1.52.dev1 → civics_cdf_validator-1.52.dev3}/civics_cdf_validator.egg-info/SOURCES.txt +0 -0
- {civics_cdf_validator-1.52.dev1 → civics_cdf_validator-1.52.dev3}/civics_cdf_validator.egg-info/dependency_links.txt +0 -0
- {civics_cdf_validator-1.52.dev1 → civics_cdf_validator-1.52.dev3}/civics_cdf_validator.egg-info/entry_points.txt +0 -0
- {civics_cdf_validator-1.52.dev1 → civics_cdf_validator-1.52.dev3}/civics_cdf_validator.egg-info/requires.txt +0 -0
- {civics_cdf_validator-1.52.dev1 → civics_cdf_validator-1.52.dev3}/civics_cdf_validator.egg-info/top_level.txt +0 -0
- {civics_cdf_validator-1.52.dev1 → civics_cdf_validator-1.52.dev3}/gpunit_rules.py +0 -0
- {civics_cdf_validator-1.52.dev1 → civics_cdf_validator-1.52.dev3}/loggers.py +0 -0
- {civics_cdf_validator-1.52.dev1 → civics_cdf_validator-1.52.dev3}/office_utils.py +0 -0
- {civics_cdf_validator-1.52.dev1 → civics_cdf_validator-1.52.dev3}/setup.cfg +0 -0
- {civics_cdf_validator-1.52.dev1 → civics_cdf_validator-1.52.dev3}/setup.py +0 -0
- {civics_cdf_validator-1.52.dev1 → civics_cdf_validator-1.52.dev3}/stats.py +0 -0
- {civics_cdf_validator-1.52.dev1 → civics_cdf_validator-1.52.dev3}/validator.py +0 -0
|
@@ -2631,7 +2631,8 @@ class ElectionEndDatesInThePast(base.DateRule):
|
|
|
2631
2631
|
"canceled",
|
|
2632
2632
|
]:
|
|
2633
2633
|
raise loggers.ElectionError.from_message(
|
|
2634
|
-
"A bounded election should not have an end date in the past."
|
|
2634
|
+
"A bounded election should not have an end date in the past.",
|
|
2635
|
+
[element],
|
|
2635
2636
|
)
|
|
2636
2637
|
self.reset_instance_vars()
|
|
2637
2638
|
for contest in self.get_elements_by_class(element, "Contest"):
|
|
@@ -3544,7 +3545,7 @@ class PartySpanMultipleCountries(base.BaseRule):
|
|
|
3544
3545
|
|
|
3545
3546
|
|
|
3546
3547
|
class NonExecutiveOfficeShouldHaveGovernmentBody(base.BaseRule):
|
|
3547
|
-
"""Ensure non-
|
|
3548
|
+
"""Ensure non-Head of Government/State Office elements have a government body defined."""
|
|
3548
3549
|
|
|
3549
3550
|
def __init__(self, election_tree, schema_tree, **kwargs):
|
|
3550
3551
|
self.is_post_office_split_feed = False
|
|
@@ -3562,13 +3563,14 @@ class NonExecutiveOfficeShouldHaveGovernmentBody(base.BaseRule):
|
|
|
3562
3563
|
element, self.is_post_office_split_feed
|
|
3563
3564
|
) and not _has_government_body(element):
|
|
3564
3565
|
raise loggers.ElectionInfo.from_message(
|
|
3565
|
-
"Non-
|
|
3566
|
+
"Non-Head of Government/State Office element is missing a government"
|
|
3567
|
+
" body.",
|
|
3566
3568
|
[element],
|
|
3567
3569
|
)
|
|
3568
3570
|
|
|
3569
3571
|
|
|
3570
3572
|
class ExecutiveOfficeShouldNotHaveGovernmentBody(base.BaseRule):
|
|
3571
|
-
"""Ensure
|
|
3573
|
+
"""Ensure Head of Government/State Office elements do not have a government body defined."""
|
|
3572
3574
|
|
|
3573
3575
|
def __init__(self, election_tree, schema_tree, **kwargs):
|
|
3574
3576
|
self.is_post_office_split_feed = False
|
|
@@ -3587,9 +3589,9 @@ class ExecutiveOfficeShouldNotHaveGovernmentBody(base.BaseRule):
|
|
|
3587
3589
|
) and _has_government_body(element):
|
|
3588
3590
|
office_roles = _get_office_roles(element, self.is_post_office_split_feed)
|
|
3589
3591
|
raise loggers.ElectionError.from_message(
|
|
3590
|
-
|
|
3591
|
-
"
|
|
3592
|
-
"bodies.",
|
|
3592
|
+
"Head of Government/State Office element (roles:"
|
|
3593
|
+
f" {','.join(office_roles)}) has a government body. Head of"
|
|
3594
|
+
" Government/State offices should not have government bodies.",
|
|
3593
3595
|
[element],
|
|
3594
3596
|
)
|
|
3595
3597
|
|
|
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
|