Skip to content

Commit

Permalink
Merge pull request #135 from unihd-cag/issue-134
Browse files Browse the repository at this point in the history
convert lazy list getattr to camel case
  • Loading branch information
TM90 authored Apr 20, 2020
2 parents 2838768 + ad2f110 commit 83364c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion skillbridge/client/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def __init__(self, channel: Channel, variable: SkillCode, translator: Translator
self._translator = translator

def __getattr__(self, attribute: str) -> 'LazyList':
variable = SkillCode(f"{self._variable}~>{attribute}")
variable = SkillCode(f"{self._variable}~>{snake_to_camel(attribute)}")
return LazyList(self._channel, variable, self._translator)

def __str__(self) -> str:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ def test_lazy_list():
assert l.filter('x', 'y')._variable == 'setof(arg TEST and(arg->x arg->y))'

channel.inputs.append('123')
assert len(l.shapes) == 123
assert channel.outputs.popleft() == 'length(TEST~>shapes )'
assert len(l.fig_groups) == 123
assert channel.outputs.popleft() == 'length(TEST~>figGroups )'

channel.inputs.append('42')
assert l.shapes[10] == 42
Expand Down

0 comments on commit 83364c1

Please sign in to comment.