Skip to content

Commit

Permalink
Squashed 240: range as Pattern
Browse files Browse the repository at this point in the history
commit e3d582c4a1ee61c7b669ea2cae02b8bb1c323a35
Author: Ryan Kirkbride <[email protected]>
Date:   Thu Jun 3 17:32:12 2021 +0100

    Check for range when creating/conctonating Pattern #240
  • Loading branch information
Qirky committed Jun 3, 2021
1 parent edf756f commit d589bcc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions FoxDot/lib/Patterns/Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ def concat(self, data):
new = Pattern()
if isinstance(data, Pattern):
new.data = self.data + data.data
elif isinstance(data, (list, str)):
elif isinstance(data, (list, str, range)):
new.data = list(self.data)
new.data.extend(map(convert_nested_data, data))
else:
Expand Down Expand Up @@ -1013,7 +1013,7 @@ def make(self):
""" This method automatically laces and groups the data """

#: Force data into an iterable form
if isinstance(self.data, str):
if isinstance(self.data, (str, range)):

self.data = list(self.data)

Expand Down Expand Up @@ -1129,7 +1129,7 @@ def concat(self, data):
args = list(self.data)
args.append(data)
new = PGroup(*args)
elif isinstance(data, (list, str)):
elif isinstance(data, (list, str, range)):
new.data = list(self.data)
new.data.extend(map(convert_nested_data, data))
else:
Expand Down

0 comments on commit d589bcc

Please sign in to comment.