Shorten code to declare namespace

This is the recommened way of declaring namespace.

Also remove unneeded unicode_literals import.
This commit is contained in:
Calum Lind 2018-10-31 11:31:50 +00:00
parent 3433a911cc
commit 7d998a45f2
23 changed files with 21 additions and 129 deletions

View File

@ -1,7 +1,2 @@
"""Deluge"""
from __future__ import unicode_literals
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -1,6 +1 @@
from __future__ import unicode_literals
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -1,6 +1 @@
from __future__ import unicode_literals
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -1,4 +1 @@
from __future__ import unicode_literals
# this is a namespace package
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -1,4 +1 @@
from __future__ import unicode_literals
# this is a namespace package
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -1,6 +1 @@
from __future__ import unicode_literals
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -1,6 +1 @@
from __future__ import unicode_literals
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -1,6 +1 @@
from __future__ import unicode_literals
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -1,6 +1 @@
from __future__ import unicode_literals
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -1,6 +1 @@
from __future__ import unicode_literals
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -1,6 +1 @@
from __future__ import unicode_literals
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -1,6 +1 @@
from __future__ import unicode_literals
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -1,6 +1 @@
from __future__ import unicode_literals
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -1,6 +1 @@
from __future__ import unicode_literals
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -1,6 +1 @@
from __future__ import unicode_literals
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -1,6 +1 @@
from __future__ import unicode_literals
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -1,6 +1 @@
from __future__ import unicode_literals
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -1,6 +1 @@
from __future__ import unicode_literals
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -1,6 +1 @@
from __future__ import unicode_literals
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -1,6 +1 @@
from __future__ import unicode_literals
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -1,6 +1 @@
from __future__ import unicode_literals
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -1,6 +1 @@
from __future__ import unicode_literals
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -388,9 +388,7 @@ GPL = """#
"""
NAMESPACE_INIT = """# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)
NAMESPACE_INIT = """__import__('pkg_resources').declare_namespace(__name__)
"""
CREATE_DEV_LINK = """#!/bin/bash