mirror of
https://github.com/kk7ds/chirp.git
synced 2024-09-21 02:27:21 +00:00
Remove future library dependency
This commit is contained in:
parent
df26891bcb
commit
83084f72ff
@ -64,8 +64,6 @@ import logging
|
||||
import re
|
||||
import warnings
|
||||
|
||||
from builtins import bytes
|
||||
|
||||
from chirp import bitwise_grammar
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -13,8 +13,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from builtins import bytes
|
||||
|
||||
import base64
|
||||
import json
|
||||
import inspect
|
||||
|
@ -51,18 +51,6 @@ import logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
# Gross hack to handle missing future module on un-updatable
|
||||
# platforms like MacOS. Just avoid registering these radio
|
||||
# classes for now.
|
||||
try:
|
||||
from builtins import bytes
|
||||
has_future = True
|
||||
except ImportError:
|
||||
has_future = False
|
||||
LOG.debug('python-future package is not '
|
||||
'available; %s requires it' % __name__)
|
||||
|
||||
|
||||
# Here is where we define the memory map for the radio. Since
|
||||
# We often just know small bits of it, we can use #seekto to skip
|
||||
# around as needed.
|
||||
@ -1730,7 +1718,6 @@ class AnyTone778UVBase(chirp_common.CloneModeRadio,
|
||||
|
||||
|
||||
# Original non-VOX models
|
||||
if has_future:
|
||||
@directory.register
|
||||
class AnyTone778UV(AnyTone778UVBase):
|
||||
VENDOR = "AnyTone"
|
||||
@ -1739,6 +1726,7 @@ if has_future:
|
||||
# strings
|
||||
ALLOWED_RADIO_TYPES = {'AT778UV': ['V100', 'V200']}
|
||||
|
||||
|
||||
@directory.register
|
||||
class RetevisRT95(AnyTone778UVBase):
|
||||
VENDOR = "Retevis"
|
||||
@ -1747,6 +1735,7 @@ if has_future:
|
||||
# strings
|
||||
ALLOWED_RADIO_TYPES = {'RT95': ['V100']}
|
||||
|
||||
|
||||
@directory.register
|
||||
class CRTMicronUV(AnyTone778UVBase):
|
||||
VENDOR = "CRT"
|
||||
@ -1755,6 +1744,7 @@ if has_future:
|
||||
# strings
|
||||
ALLOWED_RADIO_TYPES = {'MICRON': ['V100']}
|
||||
|
||||
|
||||
@directory.register
|
||||
class MidlandDBR2500(AnyTone778UVBase):
|
||||
VENDOR = "Midland"
|
||||
@ -1763,6 +1753,7 @@ if has_future:
|
||||
# strings
|
||||
ALLOWED_RADIO_TYPES = {'DBR2500': ['V100']}
|
||||
|
||||
|
||||
@directory.register
|
||||
class YedroYCM04vus(AnyTone778UVBase):
|
||||
VENDOR = "Yedro"
|
||||
@ -1779,7 +1770,6 @@ class AnyTone778UVvoxBase(AnyTone778UVBase):
|
||||
|
||||
|
||||
# New VOX models
|
||||
if has_future:
|
||||
@directory.register
|
||||
class AnyTone778UVvox(AnyTone778UVvoxBase):
|
||||
VENDOR = "AnyTone"
|
||||
@ -1788,6 +1778,7 @@ if has_future:
|
||||
# strings
|
||||
ALLOWED_RADIO_TYPES = {'778UV-P': ['V100']}
|
||||
|
||||
|
||||
@directory.register
|
||||
class RetevisRT95vox(AnyTone778UVvoxBase):
|
||||
VENDOR = "Retevis"
|
||||
@ -1796,6 +1787,7 @@ if has_future:
|
||||
# strings
|
||||
ALLOWED_RADIO_TYPES = {'RT95-P': ['V100']}
|
||||
|
||||
|
||||
@directory.register
|
||||
class CRTMicronUVvox(AnyTone778UVvoxBase):
|
||||
VENDOR = "CRT"
|
||||
|
@ -15,8 +15,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from builtins import bytes
|
||||
|
||||
import struct
|
||||
import logging
|
||||
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
"""FT817 - FT817ND - FT817ND/US management module"""
|
||||
|
||||
from builtins import bytes
|
||||
from chirp.drivers import yaesu_clone
|
||||
from chirp import chirp_common, util, memmap, errors, directory, bitwise
|
||||
from chirp.settings import RadioSetting, RadioSettingGroup, \
|
||||
|
@ -29,14 +29,6 @@ from chirp.settings import RadioSettingValueInteger, RadioSettingValueString
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
try:
|
||||
from builtins import bytes
|
||||
has_future = True
|
||||
except ImportError:
|
||||
has_future = False
|
||||
LOG.debug('python-future package is not available; '
|
||||
'%s requires it' % __name__)
|
||||
|
||||
# GA510 and SHX8800 also have DTCS code 645
|
||||
DTCS_CODES = tuple(sorted(chirp_common.DTCS_CODES + (645,)))
|
||||
|
||||
|
@ -13,8 +13,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from builtins import bytes
|
||||
|
||||
import binascii
|
||||
import hashlib
|
||||
import os
|
||||
|
@ -12,7 +12,6 @@
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
from builtins import bytes
|
||||
|
||||
import logging
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
from builtins import bytes
|
||||
|
||||
import logging
|
||||
|
||||
|
@ -14,8 +14,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from __future__ import division
|
||||
|
||||
import struct
|
||||
import logging
|
||||
from math import floor
|
||||
|
@ -13,7 +13,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from builtins import bytes
|
||||
import logging
|
||||
import struct
|
||||
|
||||
|
@ -27,18 +27,6 @@ from chirp.settings import RadioSettings, RadioSettingSubGroup
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
# Gross hack to handle missing future module on un-updatable
|
||||
# platforms like MacOS. Just avoid registering these radio
|
||||
# classes for now.
|
||||
try:
|
||||
from builtins import bytes
|
||||
has_future = True
|
||||
except ImportError:
|
||||
has_future = False
|
||||
LOG.debug('python-future package is not '
|
||||
'available; %s requires it' % __name__)
|
||||
|
||||
|
||||
HEADER_FORMAT = """
|
||||
#seekto 0x0100;
|
||||
struct {
|
||||
@ -1225,25 +1213,27 @@ class KenwoodTKx180RadioZone(KenwoodTKx180Radio):
|
||||
return []
|
||||
|
||||
|
||||
if has_future:
|
||||
@directory.register
|
||||
class KenwoodTK7180Radio(KenwoodTKx180Radio):
|
||||
MODEL = 'TK-7180'
|
||||
VALID_BANDS = [(136000000, 174000000)]
|
||||
_model = b'M7180\x04'
|
||||
|
||||
|
||||
@directory.register
|
||||
class KenwoodTK8180Radio(KenwoodTKx180Radio):
|
||||
MODEL = 'TK-8180'
|
||||
VALID_BANDS = [(400000000, 520000000)]
|
||||
_model = b'M8180\x06'
|
||||
|
||||
|
||||
@directory.register
|
||||
class KenwoodTK2180Radio(KenwoodTKx180Radio):
|
||||
MODEL = 'TK-2180'
|
||||
VALID_BANDS = [(136000000, 174000000)]
|
||||
_model = b'P2180\x04'
|
||||
|
||||
|
||||
# K1,K3 are technically 450-470 (K3 == keypad)
|
||||
@directory.register
|
||||
class KenwoodTK3180K1Radio(KenwoodTKx180Radio):
|
||||
@ -1251,6 +1241,7 @@ if has_future:
|
||||
VALID_BANDS = [(400000000, 520000000)]
|
||||
_model = b'P3180\x06'
|
||||
|
||||
|
||||
# K2,K4 are technically 400-470 (K4 == keypad)
|
||||
@directory.register
|
||||
class KenwoodTK3180K2Radio(KenwoodTKx180Radio):
|
||||
@ -1258,12 +1249,14 @@ if has_future:
|
||||
VALID_BANDS = [(400000000, 520000000)]
|
||||
_model = b'P3180\x07'
|
||||
|
||||
|
||||
@directory.register
|
||||
class KenwoodTK8180E(KenwoodTKx180Radio):
|
||||
MODEL = 'TK-8180E'
|
||||
VALID_BANDS = [(400000000, 520000000)]
|
||||
_model = b'M8189\''
|
||||
|
||||
|
||||
@directory.register
|
||||
class KenwoodTK7180ERadio(KenwoodTKx180Radio):
|
||||
MODEL = 'TK-7180E'
|
||||
|
@ -13,8 +13,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from builtins import bytes
|
||||
|
||||
import struct
|
||||
import time
|
||||
import logging
|
||||
|
@ -13,7 +13,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from builtins import bytes
|
||||
import time
|
||||
import logging
|
||||
|
||||
|
@ -13,8 +13,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from builtins import bytes
|
||||
|
||||
from chirp import util
|
||||
|
||||
|
||||
|
@ -5,7 +5,6 @@ pytest-html
|
||||
six
|
||||
pep8
|
||||
pyserial
|
||||
future
|
||||
requests
|
||||
pyyaml
|
||||
pywin32; platform_system=="Windows"
|
||||
|
Loading…
Reference in New Issue
Block a user