aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_base.py
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-05-25 19:45:04 -0700
committerGravatar MarkKoz <[email protected]>2020-05-25 19:45:04 -0700
commit161bf818ed0f1690c63f4f54cc9549e298e3e45c (patch)
tree73422f00b744b7d5d79d9ba576493de377a08343 /tests/test_base.py
parentToken remover: escape dashes in regex (diff)
Token remover: use regex groups and pass the token as a NamedTuple
It felt redundant to be splitting the token in two different functions when regex could take care of this from the outset. ' A NamedTuple was created to house the token. This is nicer than passing an re.Match object, because it's clearer which attributes are available. Even if the regex used named groups, it wouldn't be as obvious which group names exist. Without the split, `is_maybe_token` is dwindled down to a redundant function. Therefore, it's been removed.
Diffstat (limited to 'tests/test_base.py')
0 files changed, 0 insertions, 0 deletions