Skip to content

Commit

Permalink
Fix style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
clenk committed Feb 7, 2024
1 parent d59c568 commit 84d45a5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/api/v2/managers/schedule_api_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ def _merge_dictionaries(self, dict1, dict2):
for key in dict1.keys():
if key not in dict2:
dict2[key] = dict1[key]
elif type(dict1[key]) == dict:
elif isintance(dict1[key], dict):
self._merge_dictionaries(dict1[key], dict2[key])
return dict2
2 changes: 1 addition & 1 deletion app/learning/p_ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ def _is_valid_ip(raw_ip):
if raw_ip in ['0.0.0.0', '127.0.0.1']: # nosec
return False
ip_address(raw_ip)
except BaseException:
except ValueError:
return False
return True
2 changes: 1 addition & 1 deletion app/objects/c_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class SourceSchema(ma.Schema):
def fix_adjustments(self, in_data, **_):
x = []
raw_adjustments = in_data.pop('adjustments', {})
if raw_adjustments and type(raw_adjustments) == dict:
if raw_adjustments and isintance(raw_adjustments, dict):
for ability_id, adjustments in raw_adjustments.items():
for trait, block in adjustments.items():
for change in block:
Expand Down
2 changes: 1 addition & 1 deletion tests/api/v2/handlers/test_schedules_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def expected_updated_schedule_dump(test_schedule, updated_schedule_payload):

def _merge_dictionaries(dict1, dict2):
for key in dict1.keys():
if type(dict1[key]) == dict:
if isinstance(dict1[key], dict):
_merge_dictionaries(dict1[key], dict2[key])
else:
dict2[key] = dict1[key]
Expand Down

0 comments on commit 84d45a5

Please sign in to comment.