Skip to content

Commit

Permalink
Upgrade black from 22.3.0 to 23.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
markpeek committed Aug 13, 2023
1 parent 0da2df2 commit a577431
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pre-commit>=2.16
pytest>=4.1
pytest-cov>=2.6

black==22.3.0
black==23.7.0
build==0.5.1
click==8.0.4
isort==5.10.1
Expand Down
13 changes: 6 additions & 7 deletions scripts/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def _fix_tags(self):
UNSUPPORTED_TAG_NAMES = ["TagMap"]

for service_name, service in self.services.items():
for (class_name, key, value) in service.get_property_items():
for class_name, key, value in service.get_property_items():
if key in service.property_validators:
continue
if value.item_type in UNSUPPORTED_TAG_NAMES:
Expand Down Expand Up @@ -345,20 +345,19 @@ def update_property(old, new: str, value: Property):
dup_class_name
)

for (class_name, key, value) in service.get_property_items():
for class_name, key, value in service.get_property_items():
update_property(dup_class_name, new_class_name, value)

def _fix_standalone_types(self):
for service_name, service in self.services.items():
for (class_name, key, value) in service.get_property_items():
for class_name, key, value in service.get_property_items():
if key == "Tags":
continue

if (
value.type in service.standalone_types
or value.item_type in service.standalone_types
):

# Determine if matching a type or item_type
if value.type in service.standalone_types:
update_name = value.type
Expand Down Expand Up @@ -646,7 +645,7 @@ def _walk_for_stub_type(self, check_type: str) -> bool:
"""
Walk the resources/properties looking for a specific type.
"""
for (class_name, key, value) in self.service.get_property_items():
for class_name, key, value in self.service.get_property_items():
if value.type == check_type:
return True
return False
Expand All @@ -655,7 +654,7 @@ def _walk_for_type(self, check_type: str) -> bool:
"""
Walk the resources/properties looking for a specific type via _check_type()
"""
for (class_name, key, value) in self.service.get_property_items():
for class_name, key, value in self.service.get_property_items():
# Don't import if we will be overwriting with a validator
if key in self.property_validators[class_name]:
continue
Expand All @@ -667,7 +666,7 @@ def _walk_for_tags(self) -> bool:
"""
Walk the resources/properties looking for tags
"""
for (class_name, key, value) in self.service.get_property_items():
for class_name, key, value in self.service.get_property_items():
# Don't import if we will be overwriting with a validator
if key in self.property_validators[class_name]:
continue
Expand Down
1 change: 0 additions & 1 deletion troposphere/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ def depends_on_helper(


class BaseAWSObject:

attributes: List[str]
dictname: Optional[str]
do_validation: bool
Expand Down
2 changes: 0 additions & 2 deletions troposphere/openstack/neutron.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ class HealthMonitor(AWSObject):
}

def validate(self):

if "type" in self.resource:
mon_type = self.resource["type"]
if mon_type not in ["PING", "TCP", "HTTP", "HTTPS"]:
Expand Down Expand Up @@ -168,7 +167,6 @@ class Pool(AWSObject):
}

def validate(self):

if "lb_method" in self.resource:
lb_method = self.resource["lb_method"]
if lb_method not in ["ROUND_ROBIN", "LEAST_CONNECTIONS", "SOURCE_IP"]:
Expand Down
1 change: 0 additions & 1 deletion troposphere/validators/emr.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ def validate_simple_scaling_policy_configuration(self):
"""

if "AdjustmentType" in self.properties and "ScalingAdjustment" in self.properties:

valid_values = [
CHANGE_IN_CAPACITY,
PERCENT_CHANGE_IN_CAPACITY,
Expand Down
1 change: 0 additions & 1 deletion troposphere/validators/rds.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ def validate_dbinstance(self) -> None:
)

if "SourceDBInstanceIdentifier" in self.properties:

invalid_replica_properties = (
"DBName",
"MasterUsername",
Expand Down

0 comments on commit a577431

Please sign in to comment.