Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Roman Karwacik
website
Commits
8f47ce02
Unverified
Commit
8f47ce02
authored
Aug 02, 2019
by
Andreas Valder
Browse files
fix some linter errors
parent
8f7ccbad
Changes
3
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
8f47ce02
...
...
@@ -7,7 +7,7 @@ linter:
-
python3 -V
-
uname -a
-
apt install -y sqlite3 locales-all git python3-flask python3-ldap3 python3-requests python3-lxml python3-icalendar python3-mysql.connector python3-requests python3-coverage pylint3
-
pylint3 --indent-string='\t' --indent-after-paren=1 --max-line-length=160 --d
ocstring-min-length=9999
--output-format=text *.py | tee pylint.txt
-
pylint3 --indent-string='\t' --indent-after-paren=1 --max-line-length=160 --d
isable=missing-docstring,unused-wildcard-import
--output-format=text *.py | tee pylint.txt
artifacts
:
paths
:
-
pylint.txt
...
...
sorter.py
View file @
8f47ce02
...
...
@@ -152,7 +152,7 @@ def sort_file(filename, course=None, lectures=None):
matches
=
filter_lectures_by_datetime
(
lectures
,
data
.
get
(
'date'
),
data
.
get
(
'time'
))
# if we can't match exactly based on date and time, we have to match keywords
if
((
len
(
matches
)
!=
1
)
and
(
len
(
data
[
'keywords'
])
>
0
)):
if
not
len
(
matches
)
==
0
:
if
not
matches
:
# only test lectures with the correct date/time, if we have any
matches
=
filter_lectures_by_keywords
(
matches
,
data
[
'keywords'
])
else
:
...
...
stats.py
View file @
8f47ce02
...
...
@@ -12,12 +12,12 @@ def stats():
for
s
in
semester
:
year
=
int
(
s
[
'semester'
][
0
:
4
])
if
s
[
'semester'
].
endswith
(
'ss'
):
s
[
'from'
]
=
datetime
(
year
,
4
,
1
)
s
[
'to'
]
=
datetime
(
year
,
10
,
1
)
s
[
'from'
]
=
datetime
(
year
,
4
,
1
)
s
[
'to'
]
=
datetime
(
year
,
10
,
1
)
if
s
[
'semester'
].
endswith
(
'ws'
):
s
[
'from'
]
=
datetime
(
year
,
10
,
1
)
s
[
'to'
]
=
datetime
(
year
+
1
,
4
,
1
)
return
render_template
(
'stats.html'
,
semester
=
semester
,
filter
=
request
.
args
.
get
(
'filter'
))
s
[
'from'
]
=
datetime
(
year
,
10
,
1
)
s
[
'to'
]
=
datetime
(
year
+
1
,
4
,
1
)
return
render_template
(
'stats.html'
,
semester
=
semester
,
filter
=
request
.
args
.
get
(
'filter'
))
statsqueries
=
{}
statsqueries
[
'formats_views'
]
=
"SELECT formats.description AS labels, count(DISTINCT log.id) AS `values` FROM log JOIN videos ON (videos.id = log.video) JOIN formats ON (formats.id = videos.video_format) GROUP BY formats.id"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment