Commit 0fbb3d11 authored by Jérome Perrin's avatar Jérome Perrin

mypy

parent 5cefe319
......@@ -159,7 +159,7 @@ except ImportError:
ez_code = urllib2.urlopen(
options.setup_source).read().replace('\r\n', '\n')
ez = {}
exec ez_code in ez
exec(ez_code, ez)
setup_args = dict(to_dir=eggs_dir, download_delay=0)
if options.download_base:
setup_args['download_base'] = options.download_base
......
......@@ -166,7 +166,7 @@ import six
from six.moves import map
try:
PermissionError
PermissionError # type: ignore
except NameError: # make pylint happy on python2...
PermissionError = Exception
......
......@@ -41,7 +41,7 @@ from six.moves import http_client
try:
import subprocess32 as subprocess
except ImportError:
import subprocess
import subprocess # type: ignore
import xml_marshaller
import zope.interface
......
......@@ -31,14 +31,14 @@ import shutil
import tempfile
import slapos.slap
import slapos.cli.configure_local
from slapos.cli.configure_local import ConfigureLocalCommand, _createConfigurationDirectory
from slapos.cli.configure_local import ConfigureLocalCommand, _createConfigurationDirectory
from slapos.cli.entry import SlapOSApp
from argparse import Namespace
from six.moves.configparser import ConfigParser
# Disable any command to launch slapformat and supervisor
slapos.cli.configure_local._runFormat = lambda x: "Do nothing"
slapos.cli.configure_local.launchSupervisord = lambda instance_root, logger: "Do nothing"
slapos.cli.configure_local.launchSupervisord = lambda *args, **kw: "Do nothing"
class TestConfigureLocal(unittest.TestCase):
......
......@@ -53,9 +53,14 @@ from .test_slapgrid import DummyManager
import six
try:
from typing import Dict, Any
except ImportError:
pass
USER_LIST = []
GROUP_LIST = []
INTERFACE_DICT = {}
INTERFACE_DICT = {} # type: Dict[str, Any]
def file_content(file_path):
......
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