Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
skarimo committed Jan 19, 2024
1 parent 9f46345 commit c94ada5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions datadog/dogshell/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def _update(cls, args):
to_update["type"] = args.type_opt
if args.query_opt:
to_update["query"] = args.query_opt
if args.restricted_roles != None:
if args.restricted_roles is not None:
if args.restricted_roles == "":
to_update["restricted_roles"] = None
else:
Expand Down Expand Up @@ -304,7 +304,7 @@ def _file_update(cls, args):
}
# Default value is False to defferentiate between explicit None and not set
restricted_roles = monitor.get("restricted_roles", False)
if restricted_roles != False:
if restricted_roles is not False:
body["restricted_roles"] = restricted_roles
tags = monitor.get("tags", None)
if tags:
Expand Down Expand Up @@ -451,7 +451,7 @@ def _validate(cls, args):
else:
tags = None

if args.restricted_roles != None:
if args.restricted_roles is not None:
if args.restricted_roles == "":
restricted_roles = None
else:
Expand Down

0 comments on commit c94ada5

Please sign in to comment.