Commit 382c3162 authored by Michael Loipführer's avatar Michael Loipführer
Browse files

fix flake, pylint

parent 867e6562
Pipeline #771 passed with stage
in 2 minutes and 18 seconds
[flake8]
max-line-length = 120
\ No newline at end of file
......@@ -20,7 +20,7 @@ flake8:
- source .venv/bin/activate
- pip install flake8
script:
- flake8 --max-line-length=120 --exclude=.venv .
- flake8 --exclude=.venv .
# general linter
pylint:
......
[MASTER]
[MESSAGES CONTROL]
disable=print-statement,
missing-function-docstring,
missing-module-docstring,
missing-class-docstring,
line-too-long,
invalid-name,
unused-argument,
unused-import,
too-many-locals,
too-many-statements,
too-many-instance-arguments,
too-few-public-methods,
bad-indentation,
bad-continuation,
import-error,
wildcard-import,
no-self-use,
duplicate-code,
wrong-import-position,
no-member,
too-many-arguments,
too-many-instance-attributes,
too-many-lines,
too-many-branches,
too-many-public-methods,
broad-except,
fixme, # no TODOs
\ No newline at end of file
......@@ -20,12 +20,9 @@ import smtplib
import sys
import urllib.parse
from datetime import datetime, timedelta
from email.message import EmailMessage
from email.utils import make_msgid, formatdate, formataddr
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email import encoders
import mwclient
import pytz
......@@ -122,7 +119,7 @@ def send_mail(subject, author, body, calendar=None):
from_addr = "no-reply@stusta.mhn.de"
from_domain = from_addr.split('@')[1]
to_addr = "announce@lists.stusta.mhn.de"
msg = MIMEMultipart()
msg['date'] = formatdate(localtime=True)
......@@ -131,7 +128,7 @@ def send_mail(subject, author, body, calendar=None):
msg['to'] = to_addr
msg['reply-to'] = "StuStaNet e. V. Admins <admins@lists.stusta.de>"
msg['Message-ID'] = make_msgid(domain=from_domain)
msg.attach(MIMEText(body, 'plain'))
if calendar:
......
......@@ -157,7 +157,7 @@ class MediaWikiUpdater:
process = subprocess.Popen(
'git branch -r', cwd=self.wiki_dir, shell=True, stdout=subprocess.PIPE).stdout.read()
branches = sorted(self.get_branches(process.decode("utf-8")),
key=lambda v: self.__branch_version(v))
key=self.__branch_version)
if not branches:
return None
i = len(branches) - 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment