Conversation
tonioo
left a comment
There was a problem hiding this comment.
Please make your PR compatible with PEP8.
sievelib/commands.py
Outdated
|
|
||
| """ | ||
|
|
||
| j=OrderedDict() |
sievelib/commands.py
Outdated
| j=OrderedDict() | ||
| comms=[] | ||
|
|
||
| if isinstance(self,TestCommand): |
sievelib/commands.py
Outdated
| if self.children: | ||
| j.update({"children": []}) | ||
| for child in self.children: | ||
| #target.write(("*" * (indentlevel+10))+'{"'+argname+'": "'+str(arg)+'"},\n') |
Codecov Report
@@ Coverage Diff @@
## master #67 +/- ##
==========================================
- Coverage 84.07% 81.94% -2.13%
==========================================
Files 10 10
Lines 1683 1734 +51
==========================================
+ Hits 1415 1421 +6
- Misses 268 313 +45
Continue to review full report at Codecov.
|
|
Modified and checked against http://pep8online.com/ |
|
Can you add some unit tests please? BTW, I think you should be interested by this method: https://github.com/tonioo/sievelib/blob/master/sievelib/commands.py#L269. |
|
I have no idea how to do it, sorry. |
|
But it would be a good idea, since I already discovered a bug :) |
|
I'm going to add an attribute name mapping layer that will change the keys of the arguments |
Adds a method to represent the sieve filters as dicts
usage example: