From 53d1b4a6f48a53c4c4ec4ac7031362b691c0366d Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Thu, 31 Oct 2019 21:10:28 -0700 Subject: Blacken the project (#141) --- examples/parseResultsSumExample.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'examples/parseResultsSumExample.py') diff --git a/examples/parseResultsSumExample.py b/examples/parseResultsSumExample.py index 2c0f9fc..2341b7c 100644 --- a/examples/parseResultsSumExample.py +++ b/examples/parseResultsSumExample.py @@ -10,13 +10,19 @@ samplestr3 = "garbage;DOB 10-10-2010" samplestr4 = "garbage;ID PARI12345678;more garbage- I am cool" from pyparsing import * + dob_ref = "DOB" + Regex(r"\d{2}-\d{2}-\d{4}")("dob") -id_ref = "ID" + Word(alphanums,exact=12)("id") +id_ref = "ID" + Word(alphanums, exact=12)("id") info_ref = "-" + restOfLine("info") person_data = dob_ref | id_ref | info_ref -for test in (samplestr1,samplestr2,samplestr3,samplestr4,): +for test in ( + samplestr1, + samplestr2, + samplestr3, + samplestr4, +): person = sum(person_data.searchString(test)) print(person.id) print(person.dump()) -- cgit v1.2.1