Changes made to run files of not-working folder as well as working folder#153
Changes made to run files of not-working folder as well as working folder#153Prateekgidolia wants to merge 1 commit intocurtacircuitos:masterfrom
Conversation
| Hint(layer='top', | ||
| ext=['gtl', 'cmp', 'top', ], | ||
| name=['art01', 'top', 'GTL', 'layer1', 'soldcom', 'comp', 'F.Cu', ], | ||
| ext=['gtl', 'cmp', 'top', 'gbr', ], |
There was a problem hiding this comment.
'gbr' should not be added as an extension hint to any of these layer types because it is not unique to any specific layer type.
There was a problem hiding this comment.
Yes, that's true that 'gbr' is not the unique extension, in practice, I should not add it as hint extension.
| if ext[1:] == 'gbr': #Prateek | ||
| patterns = [r'(\w*[.-])*{}([.-]\w*)?$'.format(x) for x in hint.name] #Prateek | ||
| if any(re.findall(p, name, re.IGNORECASE) for p in patterns): #Prateek | ||
| return hint.layer #Prateek | ||
| else : #Prateek | ||
| patterns = [r'^(\w*[.-])*{}([.-]\w*)?$'.format(x) for x in hint.name] | ||
| if ext[1:] in hint.ext or any(re.findall(p, name, re.IGNORECASE) for p in patterns): | ||
| return hint.layer | ||
|
|
There was a problem hiding this comment.
None of these changes are necessary if you remove 'gbr' from the extension hints above
There was a problem hiding this comment.
Yes if I remove 'gbr' from the extension hints these changes are not required, but one change is required and that is in defining patterns :
patterns = [r'(\w*[.-]){}([.-]\w)?$'.format(x) for x in hint.name]
instead of
patterns = [r'^(\w*[.-]){}([.-]\w)?$'.format(x) for x in hint.name]
according to my changes to name attribute in hints.
There was a problem hiding this comment.
there is * before {} in defining patterns, i.e.;
patterns = [r'(\w*[.-]){}([.-]\w)?$'.format(x) for x in hint.name]
| if not os.path.isdir(directory): | ||
| raise TypeError('{} is not a directory.'.format(directory)) | ||
|
|
||
|
|
|
|
||
|
|
||
| def guess_layer_class(filename): | ||
|
|
There was a problem hiding this comment.
unecessary whitespace change
|
Sorry for that, actually I was working with that file as well so I had some
white space. Extremely sorry for that.
…On Sat, May 30, 2020 at 7:46 PM Hamilton Kibbe ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In gerber/layers.py
<#153 (comment)>
:
> @@ -125,13 +125,13 @@ def load_layer_data(data, filename=None):
def guess_layer_class(filename):
+
unecessary whitespace change
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#153 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFMBBEB6KTQZHHRCRDKTWQ3RUEIMTANCNFSM4NOV2WXA>
.
|
No description provided.