0019-misc-fix-import-error-pylint-error-56982.patch
src/authentic2/management/commands/check-and-repair.py | ||
---|---|---|
42 | 42 | |
43 | 43 |
MULTITENANT = 'hobo.multitenant' in settings.INSTALLED_APPS |
44 | 44 |
if MULTITENANT: |
45 |
from hobo.multitenant.middleware import TenantMiddleware |
|
46 |
from tenant_schemas.utils import tenant_context |
|
45 |
from hobo.multitenant.middleware import TenantMiddleware # pylint: disable=import-error
|
|
46 |
from tenant_schemas.utils import tenant_context # pylint: disable=import-error
|
|
47 | 47 | |
48 | 48 | |
49 | 49 |
class FakeState: |
src/authentic2/manager/user_import.py | ||
---|---|---|
198 | 198 |
def publik_provisionning(): |
199 | 199 |
if 'hobo.agent.authentic2' in settings.INSTALLED_APPS and not simulate: |
200 | 200 |
# provisionning is initialied in hobo.agent.authentic2.provisionning.apps |
201 |
# pylint: disable=import-error |
|
201 | 202 |
from hobo.agent.authentic2.provisionning import provisionning as engine |
202 | 203 | |
203 | 204 |
with engine: |
src/authentic2/nonce/utils.py | ||
---|---|---|
102 | 102 | |
103 | 103 | |
104 | 104 |
def accept_nonce_model(now, value, context=None, not_on_or_after=None): |
105 |
import models
|
|
105 |
from authentic2.nonce.models import Nonce
|
|
106 | 106 | |
107 | 107 |
if not_on_or_after: |
108 | 108 |
not_on_or_after = compute_not_on_or_after(now, not_on_or_after) |
109 |
nonce, created = models.Nonce.objects.get_or_create(value=value, context=context)
|
|
109 |
nonce, created = Nonce.objects.get_or_create(value=value, context=context) |
|
110 | 110 |
if created or (nonce.not_on_or_after and nonce.not_on_or_after < now): |
111 | 111 |
nonce.not_on_or_after = not_on_or_after |
112 | 112 |
nonce.save() |
... | ... | |
142 | 142 |
a datetime value to define what is the current time, if None is |
143 | 143 |
given, datetime.now() is used. It can be used for unit testing. |
144 | 144 |
""" |
145 |
import models
|
|
145 |
from authentic2.nonce.models import Nonce
|
|
146 | 146 | |
147 | 147 |
now = now or dt.datetime.now() |
148 | 148 |
mode = getattr(settings, 'NONCE_STORAGE', STORAGE_MODEL) |
149 | 149 |
# the model always exists, so we always clean it |
150 |
models.Nonce.objects.cleanup(now)
|
|
150 |
Nonce.objects.cleanup(now) |
|
151 | 151 |
if mode == STORAGE_MODEL: |
152 | 152 |
pass |
153 | 153 |
if mode.startswith(STORAGE_FILESYSTEM): |
src/authentic2/urls.py | ||
---|---|---|
130 | 130 |
urlpatterns += [url(r'^media/(?P<path>.*)$', media_serve, {'document_root': settings.MEDIA_ROOT})] |
131 | 131 | |
132 | 132 |
if settings.DEBUG and 'debug_toolbar' in settings.INSTALLED_APPS: |
133 |
import debug_toolbar |
|
133 |
import debug_toolbar # pylint: disable=import-error
|
|
134 | 134 | |
135 | 135 |
urlpatterns = [ |
136 | 136 |
url(r'^__debug__/', include(debug_toolbar.urls)), |
src/authentic2/utils/spooler.py | ||
---|---|---|
44 | 44 | |
45 | 45 |
@contextlib.contextmanager |
46 | 46 |
def tenant_context(domain): |
47 |
from hobo.multitenant.middleware import TenantMiddleware |
|
48 |
from tenant_schemas.utils import tenant_context |
|
47 |
from hobo.multitenant.middleware import TenantMiddleware # pylint: disable=import-error
|
|
48 |
from tenant_schemas.utils import tenant_context # pylint: disable=import-error
|
|
49 | 49 | |
50 | 50 |
tenant = TenantMiddleware.get_tenant_by_hostname(domain) |
51 | 51 |
with tenant_context(tenant): |
src/authentic2_auth_fc/utils.py | ||
---|---|---|
27 | 27 |
from django.utils.http import urlencode |
28 | 28 |
from django.utils.translation import ugettext_lazy as _ |
29 | 29 |
from requests.adapters import HTTPAdapter |
30 |
from requests.packages.urllib3.util.retry import Retry |
|
30 |
from requests.packages.urllib3.util.retry import Retry # pylint: disable=import-error
|
|
31 | 31 | |
32 | 32 |
from . import app_settings |
33 | 33 |
tox.ini | ||
---|---|---|
68 | 68 |
faker |
69 | 69 |
pylint |
70 | 70 |
pylint-django |
71 |
uwsgidecorators |
|
71 | 72 |
enum34<=1.1.6 |
72 | 73 |
ldaptools>=0.15 |
73 | 74 |
oldldap: python-ldap<3 |
74 |
- |