From dc90449ab0a5119b39e6834e927d0b4ab8187a8b Mon Sep 17 00:00:00 2001 From: Ondrej Nosek Date: Aug 01 2023 21:16:13 +0000 Subject: Fix flake8 complaints E721 do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()` Signed-off-by: Ondrej Nosek --- diff --git a/fedpkg/__init__.py b/fedpkg/__init__.py index b01ca73..15bf8eb 100644 --- a/fedpkg/__init__.py +++ b/fedpkg/__init__.py @@ -238,7 +238,7 @@ class Commands(pyrpkg.Commands): # Find the repo refs for ref in self.repo.refs: # Only find the remote refs - if type(ref) == git.RemoteReference: + if isinstance(ref, git.RemoteReference): # Search for branch name by splitting off the remote # part of the ref name and returning the rest. This may # fail if somebody names a remote with / in the name...