mirror of
https://github.com/wassname/ray.git
synced 2026-07-28 11:25:04 +08:00
Enforce quoting style in Travis. (#4589)
This commit is contained in:
committed by
Robert Nishihara
parent
6697407ec4
commit
e88e706fcc
@@ -746,7 +746,7 @@ def hash_runtime_conf(file_mounts, extra_objs):
|
||||
def add_content_hashes(path):
|
||||
def add_hash_of_file(fpath):
|
||||
with open(fpath, "rb") as f:
|
||||
for chunk in iter(lambda: f.read(2**20), b''):
|
||||
for chunk in iter(lambda: f.read(2**20), b""):
|
||||
hasher.update(chunk)
|
||||
|
||||
path = os.path.expanduser(path)
|
||||
|
||||
@@ -173,7 +173,7 @@ def _configure_subnet(config):
|
||||
"on instance launch unless you set 'use_internal_ips': True in "
|
||||
"the 'provider' config.")
|
||||
if "availability_zone" in config["provider"]:
|
||||
azs = config["provider"]["availability_zone"].split(',')
|
||||
azs = config["provider"]["availability_zone"].split(",")
|
||||
subnets = [s for s in subnets if s.availability_zone in azs]
|
||||
if not subnets:
|
||||
raise Exception(
|
||||
@@ -315,11 +315,11 @@ def _get_key(key_name, config):
|
||||
|
||||
|
||||
def _client(name, config):
|
||||
boto_config = Config(retries={'max_attempts': BOTO_MAX_RETRIES})
|
||||
boto_config = Config(retries={"max_attempts": BOTO_MAX_RETRIES})
|
||||
return boto3.client(name, config["provider"]["region"], config=boto_config)
|
||||
|
||||
|
||||
def _resource(name, config):
|
||||
boto_config = Config(retries={'max_attempts': BOTO_MAX_RETRIES})
|
||||
boto_config = Config(retries={"max_attempts": BOTO_MAX_RETRIES})
|
||||
return boto3.resource(
|
||||
name, config["provider"]["region"], config=boto_config)
|
||||
|
||||
@@ -36,7 +36,7 @@ def from_aws_format(tags):
|
||||
class AWSNodeProvider(NodeProvider):
|
||||
def __init__(self, provider_config, cluster_name):
|
||||
NodeProvider.__init__(self, provider_config, cluster_name)
|
||||
config = Config(retries={'max_attempts': BOTO_MAX_RETRIES})
|
||||
config = Config(retries={"max_attempts": BOTO_MAX_RETRIES})
|
||||
self.ec2 = boto3.resource(
|
||||
"ec2", region_name=provider_config["region"], config=config)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user