Skip to content

Commit

Permalink
Fix age/gender flake8 issues
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Abente Lahaye <[email protected]>
  • Loading branch information
tchx84 authored and godiard committed Nov 25, 2014
1 parent 9cc32e3 commit befea3e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion extensions/cpsection/aboutme/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#

import logging
from gettext import gettext as _

from gi.repository import Gio
Expand Down
3 changes: 0 additions & 3 deletions extensions/cpsection/aboutme/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

from gi.repository import Gtk
from gi.repository import Gdk
from gi.repository import GObject
from gettext import gettext as _
import logging

from sugar3.graphics import style
from sugar3.graphics.xocolor import XoColor, colors
Expand Down Expand Up @@ -196,7 +194,6 @@ def __init__(self, model, alerts):
self.__gender_changed_cb)
self._age_pickers.connect('age-changed', self.__age_changed_cb)


def _setup_nick(self):
grid = Gtk.Grid()
grid.set_row_spacing(style.DEFAULT_SPACING)
Expand Down
4 changes: 2 additions & 2 deletions src/jarabe/intro/agepicker.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import json
import time
import math
import logging

from gettext import gettext as _

Expand All @@ -42,6 +41,7 @@
_('5th Grade'), _('6th Grade'), _('7th Grade'),
_('High School'), _('Adult')]


def calculate_birth_timestamp(age):
age_in_seconds = age * _SECONDS_PER_YEAR
birth_timestamp = int(time.time() - age_in_seconds)
Expand Down Expand Up @@ -78,7 +78,7 @@ def age_to_group_label(age):
def group_label_to_age(label):
group_labels = get_group_labels()

if labels not in group_labels.LABELS:
if label not in group_labels.LABELS:
return None

return group_labels.AGES[group_labels.LABELS.index(label)]
Expand Down
2 changes: 0 additions & 2 deletions src/jarabe/intro/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
import logging
from gettext import gettext as _
import pwd
import time
import math
import commands

from gi.repository import Gtk
Expand Down

0 comments on commit befea3e

Please sign in to comment.