Skip to content

Commit

Permalink
Fix new E721 flake8 warning
Browse files Browse the repository at this point in the history
  • Loading branch information
arichardson committed Jul 31, 2023
1 parent 121bc5c commit 6d85f66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pycheribuild/mtree.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def exclude_matching(self, globs, exceptions=None, print_status=False) -> None:
"""Remove paths matching any pattern in globs (but not matching any in exceptions)"""
if exceptions is None:
exceptions = []
if type(globs) == str:
if isinstance(globs, str):
globs = [globs]
for glob in globs + exceptions:
# glob must be anchored at the root (./) or start with a pattern
Expand Down
2 changes: 1 addition & 1 deletion pycheribuild/projects/cross/cheribsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def __init__(self, kernconf: str, platforms: "set[ConfigPlatform]", kernel_abi=K
self.fett = fett

def __repr__(self) -> str:
flags = [key for key, val in self.__dict__.items() if type(val) == bool and val]
flags = [key for key, val in self.__dict__.items() if isinstance(val, bool) and val]
return "CheriBSDConfig({kernconf} {platform}:{kernel_abi} [{flags}])".format(
kernconf=self.kernconf, platform=self.platforms, kernel_abi=self.kernel_abi.value, flags=" ".join(flags))

Expand Down

0 comments on commit 6d85f66

Please sign in to comment.