Conversation
|
Hello again! Thank you for this new pull request 🤩. Don't forget to let me know when it is complete with the command Here is your checklist:
|
|
/bot run docs |
|
/bot run docs |
|
/bot run docs |
|
/bot run docs |
|
/bot run linux |
|
/bot run linux docs |
ef51a7c to
e5b9870
Compare
|
/bot run linux docs |
|
/bot run linux docs |
|
/bot run linux docs |
|
/bot run coverage pylint pyccel_lint docs |
There was a problem hiding this comment.
There seems to be lines in this PR which aren't tested. Please take a look at my comments and add tests which cover the new code.
If this is modified code which cannot be easily tested in this PR please open an issue to request that this code be either removed or tested. Once you have done that please leave a message on the relevant conversation beginning with the line /bot accept and referencing the issue.
Similarly if the new code cannot be tested for some reason, please leave a comment beginning with the line /bot accept on the relevant conversation explaining why the code can't be tested.
| if f.keyword == 'sep' : sep = str(f.value) | ||
| elif f.keyword == 'end' : end = str(f.value) | ||
| else: errors.report("{} not implemented as a keyworded argument".format(f.keyword), severity='fatal') | ||
| else: errors.report(f"{f.keyword} not implemented as a keyworded argument", severity='fatal') |
There was a problem hiding this comment.
This code isn't tested. Please can you take a look
| args = [self._print(a) for a in expr.args] | ||
| if len(args) == 1: | ||
| return '-{}'.format(args[0]) | ||
| return '-{args[0]}' |
There was a problem hiding this comment.
This code isn't tested. Please can you take a look
| fs = ', '.join(i for i in args) | ||
|
|
||
| return 'print({0})\n'.format(fs) | ||
| return f'print({fs})\n' |
There was a problem hiding this comment.
This code isn't tested. Please can you take a look
|
|
||
| def _print_PyccelLShift(self, expr): | ||
| return '{} << {}'.format(self._print(expr.args[0]), self._print(expr.args[1])) | ||
| lhs = self._print(expr.args[0]) |
There was a problem hiding this comment.
This code isn't tested. Please can you take a look
There was a problem hiding this comment.
This seems to be fixed now! Thank you for looking into this. Please resolve this conversation.
| message : str | ||
| The message reported by the parser. | ||
| """ | ||
| sys.stderr.write(f'error: {message}\n') |
There was a problem hiding this comment.
This code isn't tested. Please can you take a look
| if lib.endswith('.dylib'): | ||
| end = end-5 | ||
| return '-l{}'.format(lib[3:end]) | ||
| return '-l'+lib[3:end] |
There was a problem hiding this comment.
This code isn't tested. Please can you take a look
There was a problem hiding this comment.
This code isn't tested. Please can you take a look
|
/bot run coverage |
There was a problem hiding this comment.
There seems to be lines in this PR which aren't tested. Please take a look at my comments and add tests which cover the new code.
If this is modified code which cannot be easily tested in this PR please open an issue to request that this code be either removed or tested. Once you have done that please leave a message on the relevant conversation beginning with the line /bot accept and referencing the issue.
Similarly if the new code cannot be tested for some reason, please leave a comment beginning with the line /bot accept on the relevant conversation explaining why the code can't be tested.
| line = f'{prefix} {target}' | ||
|
|
There was a problem hiding this comment.
This code isn't tested. Please can you take a look
| return f'"{expr.variables} -> {expr.expr}"' | ||
|
|
There was a problem hiding this comment.
This code isn't tested. Please can you take a look
There was a problem hiding this comment.
This seems to be fixed now! Thank you for looking into this. Please resolve this conversation.
| dtype += f'({self.print_kind(expr.variable)})' | ||
|
|
There was a problem hiding this comment.
This code isn't tested. Please can you take a look
There was a problem hiding this comment.
This seems to be fixed now! Thank you for looking into this. Please resolve this conversation.
| rhs_code = f'{lhs_code} % {rhs_code}' | ||
|
|
There was a problem hiding this comment.
This code isn't tested. Please can you take a look
| return ''.join((prolog, loop, epilog)) | ||
|
|
There was a problem hiding this comment.
This code isn't tested. Please can you take a look
| arg1 = self._print(expr.args[0]) | ||
| arg2 = self._print(expr.args[1]) | ||
| return f'LSHIFT({arg1}, {arg2})' | ||
|
|
There was a problem hiding this comment.
This code isn't tested. Please can you take a look
There was a problem hiding this comment.
This seems to be fixed now! Thank you for looking into this. Please resolve this conversation.
| return f'transpose({arg})' | ||
| else: |
There was a problem hiding this comment.
This code isn't tested. Please can you take a look
| start = self._print(expr.start) | ||
| stop = self._print(expr.stop ) | ||
| step = self._print(expr.step ) | ||
| return f'range({start}, {stop}, {step})' | ||
|
|
There was a problem hiding this comment.
This code isn't tested. Please can you take a look
| lhs = self._print(expr.args[0]) | ||
| rhs = self._print(expr.args[1]) | ||
| return f'{lhs} << {rhs}' | ||
|
|
There was a problem hiding this comment.
This code isn't tested. Please can you take a look
|
/bot run coverage |
|
/bot run linux |
|
/bot run coverage |
There was a problem hiding this comment.
There seems to be lines in this PR which aren't tested. Please take a look at my comments and add tests which cover the new code.
If this is modified code which cannot be easily tested in this PR please open an issue to request that this code be either removed or tested. Once you have done that please leave a message on the relevant conversation beginning with the line /bot accept and referencing the issue.
Similarly if the new code cannot be tested for some reason, please leave a comment beginning with the line /bot accept on the relevant conversation explaining why the code can't be tested.
| raise NotImplementedError(' tuple with elements of rank > 0 is not implemented') | ||
| fs = ', '.join(self._print(f) for f in expr) | ||
| return '[{0}]'.format(fs) | ||
| return f'[{fs}]' |
There was a problem hiding this comment.
This code isn't tested. Please can you take a look
| def _print_InhomogeneousTupleVariable(self, expr): | ||
| fs = ', '.join(self._print(f) for f in expr) | ||
| return '[{0}]'.format(fs) | ||
| return f'[{fs}]' |
There was a problem hiding this comment.
This code isn't tested. Please can you take a look
| rhs_code = f'-Huge({lhs_code})' | ||
| return f'{lhs_code} = {rhs_code}\n' | ||
|
|
There was a problem hiding this comment.
This code isn't tested. Please can you take a look
| rhs_code = f'Huge({lhs_code})' | ||
| return f'{lhs_code} = {rhs_code}\n' |
There was a problem hiding this comment.
This code isn't tested. Please can you take a look
| return f'{name}({self._print(expr.internal_var)})' | ||
| else: | ||
| return '{}({}+{}*1j)'.format(name, self._print(expr.real), self._print(expr.imag)) | ||
| return f'{name}({self._print(expr.real)}+{self._print(expr.imag)}*1j)' |
There was a problem hiding this comment.
This code isn't tested. Please can you take a look
This PR is probably too large. I am gradually breaking it into manageable chunks that are merged in individual PRs.
Fix a variety of pylint errors across the code base; notably the errors:
Additionally tidy the code somewhat by:
CodePrinter._get_statementand unused functionCodePrinter._get_comment