-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into cottsay/flake8-quotes
- Loading branch information
Showing
31 changed files
with
31 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,8 +27,6 @@ | |
|
||
# Author Tully Foote/[email protected], Ken Conley/[email protected] | ||
|
||
from __future__ import print_function | ||
|
||
import os | ||
import subprocess | ||
import traceback | ||
|
@@ -341,13 +339,13 @@ def resolve(self, rosdep_args): | |
See :meth:`Installer.resolve()` | ||
""" | ||
packages = None | ||
if type(rosdep_args) == dict: | ||
if type(rosdep_args) is dict: | ||
packages = rosdep_args.get('packages', []) | ||
if isinstance(packages, str): | ||
packages = packages.split() | ||
elif isinstance(rosdep_args, str): | ||
packages = rosdep_args.split(' ') | ||
elif type(rosdep_args) == list: | ||
elif type(rosdep_args) is list: | ||
packages = rosdep_args | ||
else: | ||
raise InvalidData('Invalid rosdep args: %s' % (rosdep_args)) | ||
|
@@ -399,7 +397,7 @@ def get_depends(self, rosdep_args): | |
necessary if the package manager doesn't handle | ||
dependencies. | ||
""" | ||
if self.supports_depends and type(rosdep_args) == dict: | ||
if self.supports_depends and type(rosdep_args) is dict: | ||
return rosdep_args.get('depends', []) | ||
return [] # Default return empty list | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,8 +27,6 @@ | |
|
||
# Author Tully Foote/[email protected], Ken Conley/[email protected] | ||
|
||
from __future__ import print_function | ||
|
||
import sys | ||
import yaml | ||
|
||
|
@@ -102,12 +100,12 @@ def get_rule_for_platform(self, os_name, os_version, installer_keys, default_ins | |
queried_os = os_name | ||
queried_ver = os_version | ||
|
||
if type(data) != dict: | ||
if type(data) is not dict: | ||
raise InvalidData('rosdep value for [%s] must be a dictionary' % (self.rosdep_key), origin=self.origin) | ||
if os_name not in data: | ||
if '*' not in data: | ||
raise ResolutionError(rosdep_key, data, queried_os, queried_ver, 'No definition of [%s] for OS [%s]' % (rosdep_key, os_name)) | ||
elif type(data['*']) != dict: | ||
elif type(data['*']) is not dict: | ||
raise InvalidData('rosdep value under OS wildcard for [%s] must specify a package manager' % (rosdep_key)) | ||
os_name = '*' | ||
data = data[os_name] | ||
|
@@ -116,15 +114,15 @@ def get_rule_for_platform(self, os_name, os_version, installer_keys, default_ins | |
# REP 111: rosdep first interprets the key as a | ||
# PACKAGE_MANAGER. If this test fails, it will be interpreted | ||
# as an OS_VERSION_CODENAME. | ||
if type(data) == dict: | ||
if type(data) is dict: | ||
for installer_key in installer_keys: | ||
if installer_key in data: | ||
data = data[installer_key] | ||
return_key = installer_key | ||
break | ||
else: | ||
# data must be a dictionary, string, or list | ||
if type(data) == dict: | ||
if type(data) is dict: | ||
# check for | ||
# hardy: | ||
# apt: | ||
|
@@ -143,7 +141,7 @@ def get_rule_for_platform(self, os_name, os_version, installer_keys, default_ins | |
if os_version not in data: | ||
os_version = '*' | ||
data = data[os_version] | ||
if type(data) == dict: | ||
if type(data) is dict: | ||
for installer_key in installer_keys: | ||
if installer_key in data: | ||
data = data[installer_key] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,6 @@ | |
|
||
# Author Tully Foote/[email protected] | ||
|
||
from __future__ import print_function | ||
import subprocess | ||
import sys | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,8 +27,6 @@ | |
|
||
# Tingfan Wu [email protected] | ||
|
||
from __future__ import print_function | ||
|
||
from rospkg.os_detect import OS_CYGWIN | ||
|
||
from .source import SOURCE_INSTALLER | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,6 @@ | |
|
||
# Author Tully Foote, Ken Conley | ||
|
||
from __future__ import print_function | ||
import subprocess | ||
import sys | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,8 +28,6 @@ | |
|
||
# Author Ruben Smits/[email protected] | ||
|
||
from __future__ import print_function | ||
|
||
import subprocess | ||
|
||
from ..core import InstallFailed | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,8 +27,6 @@ | |
|
||
# Author Tully Foote/[email protected] | ||
|
||
from __future__ import print_function | ||
|
||
import os | ||
import subprocess | ||
import sys | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,6 @@ | |
|
||
# Author Tully Foote/[email protected] | ||
|
||
from __future__ import print_function | ||
import subprocess | ||
import sys | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,8 +27,6 @@ | |
|
||
# Author Tully Foote/[email protected] | ||
|
||
from __future__ import print_function | ||
|
||
import os | ||
try: | ||
from urllib.request import urlretrieve | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,8 +32,6 @@ | |
filesystem. | ||
""" | ||
|
||
from __future__ import print_function | ||
|
||
import os | ||
|
||
import catkin_pkg.package | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,8 +27,6 @@ | |
|
||
# Author Tully Foote/[email protected] | ||
|
||
from __future__ import print_function | ||
|
||
import os | ||
import sys | ||
import stat | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,8 +27,6 @@ | |
|
||
# Author Ken Conley/[email protected] | ||
|
||
from __future__ import print_function | ||
|
||
import os | ||
import sys | ||
import yaml | ||
|
@@ -144,7 +142,7 @@ def __init__(self, type_, url, tags, origin=None): | |
parsed = urlparse.urlparse(url) | ||
if not parsed.scheme or (parsed.scheme != 'file' and not parsed.netloc) or parsed.path in ('', '/'): | ||
raise ValueError('url must be a fully-specified URL with scheme, hostname, and path: %s' % (str(url))) | ||
if not type(tags) == list: | ||
if not type(tags) is list: | ||
raise ValueError('tags must be a list: %s' % (str(tags))) | ||
|
||
self.type = type_ | ||
|
@@ -231,8 +229,8 @@ def __str__(self): | |
def __repr__(self): | ||
return repr((self.type, self.url, self.tags, self.rosdep_data, self.origin)) | ||
|
||
@property | ||
def type(self): | ||
@property # noqa: A003 | ||
def type(self): # noqa: A003 | ||
""" | ||
:returns: data source type | ||
""" | ||
|
@@ -304,7 +302,7 @@ def download_rosdep_data(url): | |
text = f.read() | ||
f.close() | ||
data = yaml.safe_load(text) | ||
if type(data) != dict: | ||
if type(data) is not dict: | ||
raise DownloadFailure('rosdep data from [%s] is not a YAML dictionary' % (url)) | ||
return data | ||
except (URLError, httplib.HTTPException) as e: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.