mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
*: Various isort fixes
- Done automatically by running isort . in top level directory. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
dcb69b447b
commit
a3e21adc8b
@ -8,8 +8,8 @@ import argparse
|
||||
from pathlib import Path
|
||||
|
||||
from plinth import action_utils
|
||||
from plinth.modules.bind import CONFIG_FILE, DEFAULT_CONFIG, ZONES_DIR
|
||||
from plinth.modules.bind import set_forwarders, set_dnssec
|
||||
from plinth.modules.bind import (CONFIG_FILE, DEFAULT_CONFIG, ZONES_DIR,
|
||||
set_dnssec, set_forwarders)
|
||||
|
||||
|
||||
def parse_arguments():
|
||||
|
||||
@ -15,9 +15,10 @@ import sys
|
||||
from distutils.version import LooseVersion as LV
|
||||
from pathlib import Path
|
||||
|
||||
from plinth import action_utils
|
||||
from ruamel.yaml import YAML, scalarstring
|
||||
|
||||
from plinth import action_utils
|
||||
|
||||
EJABBERD_CONFIG = '/etc/ejabberd/ejabberd.yml'
|
||||
EJABBERD_BACKUP = '/var/log/ejabberd/ejabberd.dump'
|
||||
EJABBERD_BACKUP_NEW = '/var/log/ejabberd/ejabberd_new.dump'
|
||||
|
||||
@ -5,6 +5,7 @@ Configuration helper for Minetest server.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
|
||||
import augeas
|
||||
|
||||
from plinth import action_utils
|
||||
|
||||
@ -14,9 +14,9 @@ from collections import defaultdict
|
||||
from importlib import import_module
|
||||
|
||||
import apt.cache
|
||||
|
||||
import apt_inst
|
||||
import apt_pkg
|
||||
|
||||
from plinth import cfg
|
||||
from plinth.action_utils import (apt_hold_freedombox, is_package_manager_busy,
|
||||
run_apt_command)
|
||||
|
||||
@ -6,4 +6,5 @@ Helper to test whether action scripts use the correct PYTHONPATH.
|
||||
"""
|
||||
|
||||
import plinth
|
||||
|
||||
print(plinth.__file__)
|
||||
|
||||
@ -19,9 +19,9 @@ from plinth.action_utils import (apt_hold, apt_hold_flag, apt_hold_freedombox,
|
||||
is_package_manager_busy, run_apt_command,
|
||||
service_daemon_reload, service_restart)
|
||||
from plinth.modules.apache.components import check_url
|
||||
from plinth.modules.snapshot import (is_apt_snapshots_enabled, is_supported as
|
||||
snapshot_is_supported, load_augeas as
|
||||
snapshot_load_augeas)
|
||||
from plinth.modules.snapshot import is_apt_snapshots_enabled
|
||||
from plinth.modules.snapshot import is_supported as snapshot_is_supported
|
||||
from plinth.modules.snapshot import load_augeas as snapshot_load_augeas
|
||||
from plinth.modules.upgrades import (BACKPORTS_SOURCES_LIST, SOURCES_LIST,
|
||||
get_current_release, is_backports_current)
|
||||
|
||||
|
||||
@ -13,6 +13,7 @@ import string
|
||||
import subprocess
|
||||
|
||||
import augeas
|
||||
|
||||
from plinth import action_utils
|
||||
from plinth.modules.wordpress import PUBLIC_ACCESS_FILE
|
||||
|
||||
|
||||
@ -3,9 +3,10 @@
|
||||
Utility methods for providing client information.
|
||||
"""
|
||||
|
||||
from django.utils.functional import Promise
|
||||
from enum import Enum
|
||||
|
||||
from django.utils.functional import Promise
|
||||
|
||||
|
||||
class Desktop_OS(Enum):
|
||||
GNU_LINUX = 'gnu-linux'
|
||||
|
||||
@ -7,6 +7,7 @@ Simple key/value store using Django models
|
||||
def get(key):
|
||||
"""Return the value of a key"""
|
||||
from plinth.models import KVStore
|
||||
|
||||
# pylint: disable-msg=E1101
|
||||
return KVStore.objects.get(pk=key).value
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@ and only use the new entry 'firstboot_completed' instead.
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
from plinth.models import KVStore
|
||||
|
||||
|
||||
|
||||
@ -2,10 +2,11 @@
|
||||
# Generated by Django 1.10.5 on 2018-01-29 10:21
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.contrib.auth.models import User
|
||||
from django.db import migrations, models
|
||||
|
||||
from plinth.models import UserProfile
|
||||
|
||||
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
Test module for (U)ser (Web) (S)ites.
|
||||
"""
|
||||
|
||||
from plinth.modules.apache import (uws_directory_of_user, uws_url_of_user,
|
||||
uws_directory_of_url, uws_url_of_directory,
|
||||
user_of_uws_directory, user_of_uws_url)
|
||||
from plinth.modules.apache import (user_of_uws_directory, user_of_uws_url,
|
||||
uws_directory_of_url, uws_directory_of_user,
|
||||
uws_url_of_directory, uws_url_of_user)
|
||||
|
||||
|
||||
def test_uws_namings():
|
||||
|
||||
@ -4,6 +4,7 @@ Functional, browser based tests for avahi app.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
from plinth.tests import functional
|
||||
|
||||
pytestmark = [pytest.mark.system, pytest.mark.essential, pytest.mark.avahi]
|
||||
|
||||
@ -10,6 +10,7 @@ import urllib.parse
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
|
||||
from plinth.tests import functional
|
||||
|
||||
pytestmark = [pytest.mark.system, pytest.mark.backups]
|
||||
|
||||
@ -17,7 +17,6 @@ from plinth.views import AppView
|
||||
|
||||
from .forms import AddPasswordForm, SetDefaultPermissionsForm
|
||||
|
||||
|
||||
# i18n for permission comments
|
||||
PERMISSION_COMMENTS_STRINGS = {
|
||||
'admin': _('admin'),
|
||||
|
||||
@ -4,6 +4,7 @@ Functional, browser based tests for cockpit app.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
from plinth.tests import functional
|
||||
|
||||
pytestmark = [pytest.mark.system, pytest.mark.essential, pytest.mark.cockpit]
|
||||
|
||||
@ -10,6 +10,7 @@ import types
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
from plinth.modules import ejabberd
|
||||
|
||||
current_directory = pathlib.Path(__file__).parent
|
||||
|
||||
@ -3,12 +3,6 @@
|
||||
Provides diagnosis and repair of email server configuration issues
|
||||
"""
|
||||
|
||||
from . import domain
|
||||
from . import home
|
||||
from . import ldap
|
||||
from . import models
|
||||
from . import rcube
|
||||
from . import spam
|
||||
from . import tls
|
||||
from . import domain, home, ldap, models, rcube, spam, tls
|
||||
|
||||
__all__ = ['domain', 'home', 'ldap', 'models', 'rcube', 'spam', 'tls']
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
from django.urls import path
|
||||
from plinth.utils import non_admin_view
|
||||
from stronghold.decorators import public
|
||||
from . import views
|
||||
|
||||
from plinth.utils import non_admin_view
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('apps/email_server/', views.EmailServerView.as_view(), name='index'),
|
||||
|
||||
@ -4,6 +4,7 @@ Functional, browser based tests for i2p app.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
from plinth.tests import functional
|
||||
|
||||
pytestmark = [pytest.mark.apps, pytest.mark.i2p]
|
||||
|
||||
@ -4,6 +4,7 @@ URLs for the I2P module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
|
||||
from plinth.modules.i2p import views
|
||||
|
||||
urlpatterns = [url(r'^apps/i2p/$', views.I2PAppView.as_view(), name='index')]
|
||||
|
||||
@ -4,6 +4,7 @@ Functional, browser based tests for infinoted app.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
from plinth.tests import functional
|
||||
|
||||
pytestmark = [pytest.mark.apps, pytest.mark.infinoted]
|
||||
|
||||
@ -4,6 +4,7 @@ Functional, browser based tests for jsxc app.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
from plinth.tests import functional
|
||||
|
||||
pytestmark = [pytest.mark.apps, pytest.mark.jsxc]
|
||||
|
||||
@ -4,6 +4,7 @@ Functional, browser based tests for matrixsynapse app.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
from plinth.tests import functional
|
||||
|
||||
pytestmark = [pytest.mark.apps, pytest.mark.matrixsynapse]
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
Common test fixtures for MediaWiki.
|
||||
"""
|
||||
|
||||
import shutil
|
||||
import importlib
|
||||
import pathlib
|
||||
import shutil
|
||||
import types
|
||||
from unittest.mock import patch
|
||||
|
||||
|
||||
@ -7,9 +7,10 @@ import pathlib
|
||||
from urllib.parse import urlparse
|
||||
|
||||
import requests
|
||||
from pytest_bdd import given, parsers, scenarios, then, when
|
||||
|
||||
from plinth.tests import functional
|
||||
from plinth.tests.functional import config
|
||||
from pytest_bdd import given, parsers, scenarios, then, when
|
||||
|
||||
scenarios('mediawiki.feature')
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ Functional, browser based tests for minetest app.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
from plinth.tests import functional
|
||||
|
||||
pytestmark = [pytest.mark.apps, pytest.mark.minetest]
|
||||
|
||||
@ -4,6 +4,7 @@ Functional, browser based tests for minidlna app.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
from plinth.tests import functional
|
||||
|
||||
pytestmark = [pytest.mark.apps, pytest.mark.minidlna]
|
||||
|
||||
@ -5,7 +5,7 @@ URLs for the PageKite module
|
||||
|
||||
from django.conf.urls import url
|
||||
|
||||
from .views import (ConfigurationView, AddCustomServiceView, DeleteServiceView)
|
||||
from .views import AddCustomServiceView, ConfigurationView, DeleteServiceView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/pagekite/$', ConfigurationView.as_view(), name='index'),
|
||||
|
||||
@ -4,6 +4,7 @@ Functional, browser based tests for performance app.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
from plinth.tests import functional
|
||||
|
||||
pytestmark = [pytest.mark.system, pytest.mark.performance]
|
||||
|
||||
@ -10,6 +10,7 @@ from unittest.mock import patch
|
||||
import pytest
|
||||
from django import urls
|
||||
from django.contrib.messages.storage.fallback import FallbackStorage
|
||||
|
||||
from plinth import module_loader
|
||||
from plinth.errors import ActionError
|
||||
from plinth.modules.samba import views
|
||||
|
||||
@ -4,10 +4,11 @@ URLs for the Single Sign On module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from stronghold.decorators import public
|
||||
|
||||
from plinth.utils import non_admin_view
|
||||
|
||||
from .views import SSOLoginView, refresh
|
||||
from stronghold.decorators import public
|
||||
from plinth.utils import non_admin_view
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^accounts/sso/login/$', public(SSOLoginView.as_view()),
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
Functional, browser based tests for storage app.
|
||||
"""
|
||||
import pytest
|
||||
|
||||
from pytest_bdd import given, parsers, scenarios, then
|
||||
|
||||
from plinth.tests import functional
|
||||
|
||||
@ -4,6 +4,7 @@ Functional, browser based tests for WordPress.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
from plinth.tests import functional
|
||||
|
||||
|
||||
|
||||
@ -13,9 +13,9 @@ import shutil
|
||||
import tempfile
|
||||
from unittest.mock import patch
|
||||
|
||||
import apt_pkg
|
||||
import pytest
|
||||
|
||||
import apt_pkg
|
||||
from plinth import cfg
|
||||
from plinth.actions import _log_command as log_command
|
||||
from plinth.actions import run, superuser_run
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user