After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 325320 - widget.py example intendation
widget.py example intendation
Status: RESOLVED FIXED
Product: pygtk
Classification: Bindings
Component: general
2.8.x
Other All
: Normal trivial
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2005-12-30 19:00 UTC by Dieter Verfaillie
Modified: 2006-04-02 19:23 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12



Description Dieter Verfaillie 2005-12-30 19:00:59 UTC
Please describe the problem:
http://cvs.gnome.org/viewcvs/gnome-python/pygtk/examples/gtk/widget.py
contains both tabs and spaces for intendation.

Steps to reproduce:
1. gedit widget.py (with tab with set to 4 spaces)
2. 
3. 


Actual results:
This makes the code hard to read when tab width is not set to 8 spaces...

Expected results:


Does this happen every time?


Other information:
Comment 1 Johan (not receiving bugmail) Dahlin 2006-04-02 15:43:39 UTC
It follows PEP-8 and uses 4 spaces.
Comment 2 Dieter Verfaillie 2006-04-02 19:10:20 UTC
Sorry if my original report was not clear enough:

PEP-8: "Never mix tabs and spaces."

There are tabs on line 52, 67, 76, 77 & 78, whereas the
rest of the file uses 4 spaces for intendation.

It _DOES NOT_ follow PEP-8.

=============================================================
dieterv@PO001 ~/tmp/downloads $ python -t widget.py
widget.py: inconsistent use of tabs and spaces in indentation
dieterv@PO001 ~/tmp/downloads $ python -tt widget.py
  • File "widget.py", line 52
    self.window.set_user_data(self)
TabError: inconsistent use of tabs and spaces in indentation

Comment 3 Johan (not receiving bugmail) Dahlin 2006-04-02 19:19:20 UTC
Oh, sorry.
Anyway, I removed the tabs now:

Checking in ChangeLog;
/cvs/gnome/gnome-python/pygtk/ChangeLog,v  <--  ChangeLog
new revision: 1.1388; previous revision: 1.1387
done
Checking in examples/gtk/widget.py;
/cvs/gnome/gnome-python/pygtk/examples/gtk/widget.py,v  <--  widget.py
new revision: 1.12; previous revision: 1.11
done