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/getNTPserversNew.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'examples/getNTPserversNew.py') diff --git a/examples/getNTPserversNew.py b/examples/getNTPserversNew.py index 3ee5e06..5fcd9d1 100644 --- a/examples/getNTPserversNew.py +++ b/examples/getNTPserversNew.py @@ -7,16 +7,25 @@ # September, 2010 - updated to more current use of setResultsName, new NIST URL # import pyparsing as pp + ppc = pp.pyparsing_common from urllib.request import urlopen integer = pp.Word(pp.nums) ipAddress = ppc.ipv4_address() -hostname = pp.delimitedList(pp.Word(pp.alphas, pp.alphanums+"-_"), ".", combine=True) +hostname = pp.delimitedList(pp.Word(pp.alphas, pp.alphanums + "-_"), ".", combine=True) tdStart, tdEnd = pp.makeHTMLTags("td") -timeServerPattern = (tdStart + hostname("hostname") + tdEnd - + tdStart + ipAddress("ipAddr") + tdEnd - + tdStart + tdStart.tag_body("loc") + tdEnd) +timeServerPattern = ( + tdStart + + hostname("hostname") + + tdEnd + + tdStart + + ipAddress("ipAddr") + + tdEnd + + tdStart + + tdStart.tag_body("loc") + + tdEnd +) # get list of time servers nistTimeServerURL = "https://tf.nist.gov/tf-cgi/servers.cgi#" -- cgit v1.2.1