Expressions like these are now supported and indented correctly:
Object.objects.exclude(foo=1)\
.filter(bar=2)\
.values_list('baz')
Also added a small fix to python-info-assignment-continuation-line-p
to check the match for the operator is not inside some paren.
(save-excursion
(forward-line -1)
(python-info-assignment-continuation-line-p)))
+ (dot-continuation
+ (save-excursion
+ (back-to-indentation)
+ (when (looking-at "\\.")
+ (forward-line -1)
+ (back-to-indentation)
+ (forward-char (length
+ (with-syntax-table python-dotty-syntax-table
+ (current-word))))
+ (re-search-backward "\\." (line-beginning-position) t 1)
+ (current-column))))
(indentation (cond (block-continuation
(goto-char block-continuation)
(re-search-forward
(python-rx (* space))
(line-end-position) t)
(current-column))
+ (dot-continuation
+ dot-continuation)
(t
(goto-char context-start)
(current-indentation)))))
not-simple-operator)
(line-end-position) t)
(not (or (python-info-ppss-context 'string)
+ (python-info-ppss-context 'paren)
(python-info-ppss-context 'comment))))))
(point-marker))))