Remove long line wrapping from Python parameter list generation code.
This doesn't play well with PEP8 checks which imposes very strict continuation
line indentation rules which need to be _visually_ aligned, i.e. the subsequent
lines must be indented by the position of the opening bracket in the function
declaration line, but the code generating the parameter lists doesn't have
this information and so it's impossible to do it while avoiding either E128 or
E123 ("continuation line {under,over}-indented for visual indent" respectively)
error from pep8.
Moreover, the wrapping code didn't work correctly anyhow as it only took into
account the length of the parameter list itself and not the total line length,
which should include the function name as well.
So just disable wrapping entirely, long lines shouldn't be a problem anyhow in
auto-generated code.
This commit is contained in:
parent
16548cced0
commit
9a511f1a33
1 changed files with 0 additions and 8 deletions
|
|
@ -1637,9 +1637,7 @@ public:
|
|||
Parm *pnext;
|
||||
|
||||
|
||||
int lines = 0;
|
||||
int start_arg_num = is_wrapping_class() ? 1 : 0;
|
||||
const int maxwidth = 80;
|
||||
|
||||
if (calling)
|
||||
func_annotation = false;
|
||||
|
|
@ -1689,12 +1687,6 @@ public:
|
|||
if (Len(doc)) {
|
||||
// add a comma to the previous one if any
|
||||
Append(doc, ", ");
|
||||
|
||||
// Do we need to wrap a long line?
|
||||
if ((Len(doc) - lines * maxwidth) > maxwidth) {
|
||||
Printf(doc, "\n%s", tab4);
|
||||
lines += 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Do the param type too?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue