Skip to content

Vote format has changed for House 2020? #258

@demongolem

Description

@demongolem

Here is one that is not Python 3 :)

I am running over the code in vote.py and I see that the regex on vote id is failing. And that is because instead of the 4 parts that were expected I am seeing some vote string have 5th parts. The 4th part was the year, but in this string the 5th part is now the year and the 4th part is something which I have not discovered yet. Let me give you an example string. Perhaps the format has changed and newer vote ids need separate processing.

h102-116.5.2020

For regex I have something like this is split_vote_id which is actually in utils.py. Maybe I am missing the end $ in mine, but anyhow an additional number group representing the 5 above needs to be added.

    return re.match("^(h|s)(\d+)\-(\d+)\.(\d+)\.(\d\d\d\d|[0-9A-Z])", vote_id).groups()
    #return re.match("^(h|s)(\d+)-(\d+).(\d\d\d\d|[0-9A-Z])$", vote_id).groups()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions