Remove extraneous whitespace before colon
This commit is contained in:
parent
021ea6baab
commit
1b1452c7b7
@ -66,7 +66,7 @@ def set_format(value):
|
||||
except:
|
||||
pass
|
||||
|
||||
def set_date(date_base, text) :
|
||||
def set_date(date_base, text):
|
||||
"""
|
||||
Set the date of the :class:`.DateBase` instance.
|
||||
|
||||
@ -79,7 +79,7 @@ def set_date(date_base, text) :
|
||||
"""
|
||||
parser.set_date(date_base.get_date_object(), text)
|
||||
|
||||
def get_date(date_base) :
|
||||
def get_date(date_base):
|
||||
"""
|
||||
Return a string representation of the date of the :class:`.DateBase`
|
||||
instance.
|
||||
|
@ -81,10 +81,10 @@ class MatchesPersonFilter(MatchesFilterBase):
|
||||
event.get_handle(), ['Family']):
|
||||
family = db.get_family_from_handle(handle)
|
||||
if family.father_handle and filt.check(db,
|
||||
family.father_handle) :
|
||||
family.father_handle):
|
||||
return True
|
||||
if family.mother_handle and filt.check(db,
|
||||
family.mother_handle) :
|
||||
family.mother_handle):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
@ -50,6 +50,6 @@ class HasNoLatOrLon(Rule):
|
||||
category = _('Position filters')
|
||||
|
||||
def apply(self,db,place):
|
||||
if place.get_latitude().strip and place.get_longitude().strip() :
|
||||
if place.get_latitude().strip and place.get_longitude().strip():
|
||||
return False
|
||||
return True
|
||||
|
@ -153,9 +153,9 @@ class InLatLonNeighborhood(Rule):
|
||||
if self.doublesquares :
|
||||
#two squares to look in :
|
||||
if (lonpl <self.W or lonpl > self.E) and \
|
||||
(lonpl <self.W2 or lonpl > self.E2) :
|
||||
(lonpl <self.W2 or lonpl > self.E2):
|
||||
return False
|
||||
elif (lonpl <self.W or lonpl > self.E) :
|
||||
elif (lonpl <self.W or lonpl > self.E):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
@ -270,7 +270,7 @@ def mac_setup_localization(glocale):
|
||||
language = translations
|
||||
LOG.debug("Returning Translations %s", ':'.join(translations))
|
||||
|
||||
if not (language and language[0]) :
|
||||
if not (language and language[0]):
|
||||
if glocale.lang:
|
||||
glocale.language = [glocale.lang[:5]]
|
||||
else:
|
||||
|
@ -278,7 +278,7 @@ class EditPrimary(ManagedWindow, DbGUIElement, metaclass=abc.ABCMeta):
|
||||
self.contexteventbox.connect('button-press-event',
|
||||
self._contextmenu_button_press)
|
||||
|
||||
def _contextmenu_button_press(self, obj, event) :
|
||||
def _contextmenu_button_press(self, obj, event):
|
||||
"""
|
||||
Button press event that is caught when a mousebutton has been
|
||||
pressed while on contexteventbox
|
||||
|
@ -457,7 +457,7 @@ class ExportAssistant(ManagedWindow, Gtk.Assistant):
|
||||
else:
|
||||
#Allow for exotic error: file is still not correct
|
||||
self.check_fileselect(self.chooser, show=False)
|
||||
if self.get_page_complete(self.chooser) :
|
||||
if self.get_page_complete(self.chooser):
|
||||
filename = self.chooser.get_filename()
|
||||
name = os.path.split(filename)[1]
|
||||
folder = os.path.split(filename)[0]
|
||||
|
@ -431,7 +431,7 @@ class StyledTextEditor(Gtk.TextView):
|
||||
flavor = self.url_match[MATCH_FLAVOR]
|
||||
url = self.url_match[MATCH_STRING]
|
||||
self._open_url_cb(None, url, flavor)
|
||||
elif (event.type == Gdk.EventType.BUTTON_PRESS and event.button == 1) :
|
||||
elif (event.type == Gdk.EventType.BUTTON_PRESS and event.button == 1):
|
||||
#on release we will copy selected data to clipboard
|
||||
self.selclick = True
|
||||
#propagate click
|
||||
|
@ -1751,7 +1751,7 @@ class GrampsParser(UpdateCallback):
|
||||
key = attrs['key']
|
||||
value = attrs['value']
|
||||
if type == 'group_as':
|
||||
if self.db.has_name_group_key(key) :
|
||||
if self.db.has_name_group_key(key):
|
||||
present = self.db.get_name_group_mapping(key)
|
||||
if not value == present:
|
||||
msg = _('Your Family Tree groups name "%(key)s" together'
|
||||
|
@ -645,7 +645,7 @@ class GtkDocParagraph(GtkDocBaseElement):
|
||||
## workaround: https://github.com/matasbbb/pitivit/commit/da815339e5ce3631b122a72158ba9ffcc9ee4372
|
||||
## OLD EASY CODE:
|
||||
## oldattrlist = newattrlist.get_iterator()
|
||||
## while oldattrlist.next() :
|
||||
## while oldattrlist.next():
|
||||
## vals = oldattrlist.get_attrs()
|
||||
## #print (vals)
|
||||
## for attr in vals:
|
||||
|
@ -90,7 +90,7 @@ def run_fam(database, document, family):
|
||||
|
||||
# children events
|
||||
event_list_children = []
|
||||
for child in sdb.children(family) :
|
||||
for child in sdb.children(family):
|
||||
#name = sdb.first_name(child)
|
||||
event_list_children += [(child, x) for x in sdb.events(child)]
|
||||
|
||||
|
@ -290,7 +290,7 @@ class AllRelReport:
|
||||
else:
|
||||
ind1 = 4
|
||||
ind2 = 5
|
||||
for rel,fam in zip(relation[ind1],relation[ind2]) :
|
||||
for rel,fam in zip(relation[ind1],relation[ind2]):
|
||||
par_str = _('Unknown') #when sibling, parent is unknown
|
||||
if rel == rel_class.REL_MOTHER \
|
||||
or rel == rel_class.REL_MOTHER_NOTBIRTH:
|
||||
|
@ -103,7 +103,7 @@ def run_mother(database, document, person):
|
||||
|
||||
make_details_child(Person.FEMALE, person, sa, sd, database)
|
||||
|
||||
def make_details(gender, person, sa, sd, database, stab) :
|
||||
def make_details(gender, person, sa, sd, database, stab):
|
||||
""" Function writing one line of ancestry on the document in
|
||||
direct lineage
|
||||
"""
|
||||
@ -162,11 +162,11 @@ def make_details(gender, person, sa, sd, database, stab) :
|
||||
else :
|
||||
person = None
|
||||
|
||||
def make_details_child(gender, person, sa, sd, database) :
|
||||
def make_details_child(gender, person, sa, sd, database):
|
||||
""" Function that prints the details of the children in the
|
||||
male/female lineage
|
||||
"""
|
||||
def make_child_line(child, prepend, generation) :
|
||||
def make_child_line(child, prepend, generation):
|
||||
""" Recursively called function to write one child line
|
||||
Person is the child, prepend is the string that precedes it
|
||||
on print. As the recursion grows, prepend is increased
|
||||
|
@ -354,7 +354,7 @@ def _get_mother(level, inlaw="", step=""):
|
||||
taula = _MOTHER_LEVEL_STP
|
||||
nom = "aviastra"
|
||||
|
||||
if level < len(taula) :
|
||||
if level < len(taula):
|
||||
return taula[level] % inlaw
|
||||
|
||||
# limitation gen = 30
|
||||
@ -579,10 +579,10 @@ def _get_uncles(level, inlaw=""):
|
||||
|
||||
if inlaw != "" and level == 1 :
|
||||
return "els cunyats i les cunyades"
|
||||
elif level < len(_SIBLINGS_LEVEL) :
|
||||
elif level < len(_SIBLINGS_LEVEL):
|
||||
return "%s%s" % \
|
||||
(_SIBLINGS_LEVEL[level], inlaw)
|
||||
elif level <= len(_LEVEL_NAME_P) :
|
||||
elif level <= len(_LEVEL_NAME_P):
|
||||
return "els oncles i les ties %s%s" % \
|
||||
(_LEVEL_NAME_P[level-1], inlaw)
|
||||
else:
|
||||
@ -690,12 +690,12 @@ def _get_nephews(level, inlaw=""):
|
||||
"""
|
||||
if (inlaw != ""):
|
||||
inlaw += "s"
|
||||
if level <= len(_NEPHEWS_NIECES_LEVEL) :
|
||||
if level <= len(_NEPHEWS_NIECES_LEVEL):
|
||||
|
||||
# limitation gen = 30
|
||||
|
||||
return "%s%s" % (_NEPHEWS_NIECES_LEVEL[level-1], inlaw)
|
||||
elif level <= len(_LEVEL_NAME_P) :
|
||||
elif level <= len(_LEVEL_NAME_P):
|
||||
|
||||
return "els nebots i les nebodes %s%s" % \
|
||||
(_LEVEL_NAME_P[level-1], inlaw)
|
||||
|
@ -64,7 +64,7 @@ WIKI_HELP_SEC = _('manual|Not_Related')
|
||||
# NotRelated class
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class NotRelated(tool.ActivePersonTool, ManagedWindow) :
|
||||
class NotRelated(tool.ActivePersonTool, ManagedWindow):
|
||||
|
||||
def __init__(self, dbstate, user, options_class, name, callback=None):
|
||||
uistate = user.uistate
|
||||
@ -184,14 +184,14 @@ class NotRelated(tool.ActivePersonTool, ManagedWindow) :
|
||||
self.show()
|
||||
|
||||
|
||||
def iterIsSeparator(self, model, iter) :
|
||||
def iterIsSeparator(self, model, iter):
|
||||
# return True only if the row is to be treated as a separator
|
||||
if self.model.get_value(iter, 1) == '': # does the row have a GID?
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def selectIsAllowed(self, selection, model, path, isSelected, userData) :
|
||||
def selectIsAllowed(self, selection, model, path, isSelected, userData):
|
||||
# return True/False depending on if the row being selected is a leaf node
|
||||
iter = self.model.get_iter(path)
|
||||
if self.model.get_value(iter, 1) == '': # does the row have a GID?
|
||||
@ -199,13 +199,13 @@ class NotRelated(tool.ActivePersonTool, ManagedWindow) :
|
||||
return True
|
||||
|
||||
|
||||
def rowSelectionChanged(self, selection) :
|
||||
def rowSelectionChanged(self, selection):
|
||||
state = selection.count_selected_rows() > 0
|
||||
self.tagcombo.set_sensitive(state)
|
||||
self.tagapply.set_sensitive(state)
|
||||
|
||||
|
||||
def rowActivated(self, treeView, path, column) :
|
||||
def rowActivated(self, treeView, path, column):
|
||||
# first we need to check that the row corresponds to a person
|
||||
iter = self.model.get_iter(path)
|
||||
personGid = self.model.get_value(iter, 1)
|
||||
@ -234,7 +234,7 @@ class NotRelated(tool.ActivePersonTool, ManagedWindow) :
|
||||
display_help(WIKI_HELP_PAGE , WIKI_HELP_SEC)
|
||||
|
||||
|
||||
def applyTagClicked(self, button) :
|
||||
def applyTagClicked(self, button):
|
||||
progress = None
|
||||
rows = self.treeSelection.count_selected_rows()
|
||||
tag_name = str(self.tagcombo.get_active_text())
|
||||
@ -297,7 +297,7 @@ class NotRelated(tool.ActivePersonTool, ManagedWindow) :
|
||||
if progress:
|
||||
progress.close()
|
||||
|
||||
def findRelatedPeople(self) :
|
||||
def findRelatedPeople(self):
|
||||
|
||||
self.progress.set_pass(
|
||||
# translators: leave all/any {...} untranslated
|
||||
@ -370,7 +370,7 @@ class NotRelated(tool.ActivePersonTool, ManagedWindow) :
|
||||
self.handlesOfPeopleToBeProcessed.add(childHandle)
|
||||
|
||||
|
||||
def findUnrelatedPeople(self) :
|
||||
def findUnrelatedPeople(self):
|
||||
|
||||
# update our numbers
|
||||
self.numberOfRelatedPeople = len(self.handlesOfPeopleAlreadyProcessed)
|
||||
@ -406,7 +406,7 @@ class NotRelated(tool.ActivePersonTool, ManagedWindow) :
|
||||
self.handlesOfPeopleNotRelated.add(handle)
|
||||
|
||||
|
||||
def populateModel(self) :
|
||||
def populateModel(self):
|
||||
|
||||
self.progress.set_pass(
|
||||
# translators: leave all/any {...} untranslated
|
||||
|
Loading…
Reference in New Issue
Block a user