Shorten code to declare namespace
This is the recommened way of declaring namespace. Also remove unneeded unicode_literals import.
This commit is contained in:
parent
3433a911cc
commit
7d998a45f2
|
@ -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__)
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -1,4 +1 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# this is a namespace package
|
||||
__import__('pkg_resources').declare_namespace(__name__)
|
||||
|
|
|
@ -1,4 +1 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# this is a namespace package
|
||||
__import__('pkg_resources').declare_namespace(__name__)
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue