unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#20742: 24.5; python mode indentation fails pep8
@ 2015-06-05  7:58 Tommi Komulainen
  2015-06-05 20:16 ` Glenn Morris
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Tommi Komulainen @ 2015-06-05  7:58 UTC (permalink / raw)
  To: 20742

The automatic indentation and manual reindenting with
indent-according-to-mode puts the closing bracket in wrong place that
makes pep8/flake8 flycheck complain:

print("hello",
      "world",
)
E124 closing bracket does not match visual indentation

The bracket needs to align with the first thing after the opening
bracket if it's on the same line i.e.:

print("hello",
      "world",
      )

The automatic indentation doesn't cause any errors if there's a newline
after the opening bracket though:

print(
    "hello",
    "world",
)



In GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.16.2)
 of 2015-04-22 on buildhw-10.phx2.fedoraproject.org
Windowing system distributor `Fedora Project', version 11.0.11701000
System Description: Fedora release 22 (Twenty Two)

Configured using:
 `configure --build=x86_64-redhat-linux-gnu
 --host=x86_64-redhat-linux-gnu --program-prefix=
 --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
 --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
 --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
 --libexecdir=/usr/libexec --localstatedir=/var
 --sharedstatedir=/var/lib --mandir=/usr/share/man
 --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
 --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3
 --with-gpm=no build_alias=x86_64-redhat-linux-gnu
 host_alias=x86_64-redhat-linux-gnu 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g
 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
 -m64 -mtune=generic' LDFLAGS=-Wl,-z,relro'

Important settings:
  value of $LANG: en_US.utf8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Python

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
(New file)
Can't guess python-indent-offset, using defaults: 4
python-indent--calculate-indentation: Wrong type argument:
number-or-marker-p, nil [2 times]
Making completion list...
python-indent--calculate-indentation: Wrong type argument:
number-or-marker-p, nil [2 times]
Making completion list...
user-error: End of history; no default available [2 times]
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
help-fns mail-prsvr mail-utils help-mode python easymenu json comint
ring cl-loaddefs cl-lib ansi-color time-date tooltip electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 81480 5832)
 (symbols 48 18574 0)
 (miscs 40 39 124)
 (strings 32 12163 4670)
 (string-bytes 1 364259)
 (vectors 16 10283)
 (vector-slots 8 394463 9319)
 (floats 8 66 386)
 (intervals 56 243 1)
 (buffers 960 13)
 (heap 1024 32872 1101))





^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-09-18 11:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-05  7:58 bug#20742: 24.5; python mode indentation fails pep8 Tommi Komulainen
2015-06-05 20:16 ` Glenn Morris
2015-06-05 20:25   ` Tommi Komulainen
2015-06-08 16:28 ` Andreas Röhler
2015-06-19 17:04 ` bug#20742: Testcase for #20742 Tommi Komulainen
2015-06-20 10:56 ` bug#20742: 24.5; [PATCH] python.el: fix close paren indentation to match pep8 Tommi Komulainen
2017-03-02  2:47   ` npostavs
2019-04-20 20:51     ` Noam Postavsky
2019-04-28 20:47       ` Noam Postavsky
2020-09-17 18:59       ` bug#20560: " Lars Ingebrigtsen
2020-09-17 19:22         ` Noam Postavsky
2020-09-18 11:11           ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).