Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
soitool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bachelor-paa-bittet
soitool
Commits
b571720b
Commit
b571720b
authored
5 years ago
by
Thomas Holene Løkkeborg
Browse files
Options
Downloads
Patches
Plain Diff
#54 lint fix
parent
9a279a2c
No related branches found
Branches containing commit
No related tags found
1 merge request
!28
#54 Rectpack for reorganisering av moduler + litt black
Pipeline
#74454
passed
5 years ago
Stage: lint
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
soitool/soi.py
+12
-3
12 additions, 3 deletions
soitool/soi.py
test/test_soi.py
+1
-1
1 addition, 1 deletion
test/test_soi.py
with
13 additions
and
4 deletions
soitool/soi.py
+
12
−
3
View file @
b571720b
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
test/test_soi.py
+
1
−
1
View file @
b571720b
...
...
@@ -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
#
FIXM
E the only meta information necessary here is "name", if we assume
#
NOT
E the only meta information necessary here is "name", if we assume
# automatic sorting..
TEST_MODULES
=
[
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment