Skip to content
Snippets Groups Projects
Commit b571720b authored by Thomas Holene Løkkeborg's avatar Thomas Holene Løkkeborg
Browse files

#54 lint fix

parent 9a279a2c
No related branches found
No related tags found
1 merge request!28#54 Rectpack for reorganisering av moduler + litt black
Pipeline #74454 passed
......@@ -194,7 +194,9 @@ class SOI:
# simple as possible. The proper thing would probably be to put the
# properties in separate data classes (auto-placement stuff in one class,
# styling in another, etc).
# pylint: disable=r0913
# Ignoring pylint's r0914 "Too many local variables" for the same reason as
# r0913
# pylint: disable=r0913,r0914
def __init__(
self,
title="Default SOI title",
......@@ -210,8 +212,8 @@ class SOI:
algorithm_bin="BFF",
algorithm_pack="MaxRectsBl",
algorithm_sort="area",
modules=[],
attachments=[],
modules=None,
attachments=None,
):
# populate date-related arguments if they are not supplied by the user
......@@ -225,6 +227,13 @@ class SOI:
if valid_to is None:
valid_to = date
# reason to not just set to [] as default argument:
# https://stackoverflow.com/questions/9526465/best-practice-for-setting-the-default-value-of-a-parameter-thats-supposed-to-be
if modules is None:
modules = []
if attachments is None:
attachments = []
self.title = title
self.description = description
self.version = version
......
......@@ -69,7 +69,7 @@ class TestModule(ModuleBase, QWidget, metaclass=Meta):
# 'wide_module' have the same area, but 'tall_module' should come first
# because sorting should be stable
# https://en.wikipedia.org/wiki/Category:Stable_sorts
# FIXME the only meta information necessary here is "name", if we assume
# NOTE the only meta information necessary here is "name", if we assume
# automatic sorting..
TEST_MODULES = [
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment