Better score for pylint

This commit is contained in:
SNoiraud
2019-09-17 00:48:20 +02:00
committed by Nick Hall
parent 95a0216287
commit 4e2f98da02
3 changed files with 49 additions and 47 deletions

View File

@@ -752,7 +752,6 @@ class BasePage: # pylint: disable=C1001
if latitude and longitude:
latitude, longitude = conv_lat_lon(latitude, longitude, "D.D8")
if latitude is not None:
etype = event.get_type()
place_lat_long.append([latitude, longitude, placetitle,
place_handle, event])
@@ -2992,4 +2991,3 @@ class BasePage: # pylint: disable=C1001
# closes the file
self.report.close_file(output_file, sio, date)

View File

@@ -1695,13 +1695,15 @@ class NavWebOptions(MenuReportOptions):
cright.set_help(_("The copyright to be used for the web files"))
addopt("cright", cright)
self.__css = EnumeratedListOption(('StyleSheet'), CSS["Basic-Ash"]["id"])
self.__css = EnumeratedListOption(('StyleSheet'),
CSS["Basic-Ash"]["id"])
for (dummy_fname, gid) in sorted(
[(CSS[key]["translation"], CSS[key]["id"])
for key in list(CSS.keys())]):
if CSS[gid]["user"]:
self.__css.add_item(CSS[gid]["id"], CSS[gid]["translation"])
self.__css.set_help(_('The default stylesheet to be used for the pages'))
self.__css.set_help(_('The default stylesheet to be used for'
' the pages'))
addopt("css", self.__css)
self.__css.connect("value-changed", self.__stylesheet_changed)

View File

@@ -182,6 +182,8 @@ def load_on_reg(dbstate, uistate, plugin):
def looking_for_urls_in_user_css(css_file):
"""
At each time we find the tag url, we get the content and add it
to the images list. This content must be local.
"""
images = []
cssfile = os.path.join(USER_CSS, css_file)
@@ -207,7 +209,7 @@ def process_list(data):
for row in data:
file = row[3]
if file:
path, filename = os.path.split(file)
dummy_path, filename = os.path.split(file)
# is there a override file in the VERSION_DIR/webstuff?
# eg, ~/.gramps/gramps34/webstuff/Web_Nebraska.css
# if so, replace this one: