Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CCT-118: Fix flake8 error E721 #3353

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cloud_what/providers/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def is_likely_running_on_cloud(self) -> float:
found_amazon_ec2 = False
found_aws = False
for hw_item in self.hw_info.values():
if type(hw_item) != str:
if not (type(hw_item) is str):
continue
if "amazon ec2" in hw_item.lower():
found_amazon_ec2 = True
Expand Down
2 changes: 1 addition & 1 deletion src/cloud_what/providers/azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def is_likely_running_on_cloud(self):
found_microsoft = False
found_azure = False
for hw_item in self.hw_info.values():
if type(hw_item) != str:
if not (type(hw_item) is str):
continue
if "microsoft" in hw_item.lower():
found_microsoft = True
Expand Down
2 changes: 1 addition & 1 deletion src/cloud_what/providers/gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def is_likely_running_on_cloud(self):
found_google = False
found_gcp = False
for hw_item in self.hw_info.values():
if type(hw_item) != str:
if not (type(hw_item) is str):
continue
if "google" in hw_item.lower():
found_google = True
Expand Down
2 changes: 1 addition & 1 deletion src/rhsmlib/client_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def get_cmd_line(sender, bus=None):
if bus is None:
bus = dbus.SystemBus()
cmd_line = dbus_utils.command_of_sender(bus, sender)
if cmd_line is not None and type(cmd_line) == str:
if cmd_line is not None and type(cmd_line) is str:
# Store only first argument of command line (no argument including username or password)
cmd_line = cmd_line.split()[0]
return cmd_line
Expand Down
2 changes: 1 addition & 1 deletion src/subscription_manager/productid.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ def _get_cert(self, filename):
f = open(filename)
try:
pem = f.read()
if type(pem) == bytes:
if type(pem) is bytes:
pem = pem.decode("utf-8")
cert = create_from_pem(pem)
cert.pem = pem
Expand Down
2 changes: 1 addition & 1 deletion src/syspurpose/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ def detect_changed(base: dict, other: dict, key: str, source: str = "server") ->
return bool(base_val)

# Handle "addons" (the lists might be out of order from the server)
if type(base_val) == list and type(other_val) == list:
if type(base_val) is list and type(other_val) is list:
return sorted(base_val) != sorted(other_val)

# When value is removed from server, then it is set to empty string, but
Expand Down