mirror of
https://github.com/beetbox/beets.git
synced 2025-12-27 11:02:43 +01:00
Remove unnecessary equality check
- Remove unnecessary equality check and wrap the value in `bool`. - Remove unnecessary `bool` wrapping.
This commit is contained in:
parent
99326192eb
commit
f8b1a2e565
1 changed files with 2 additions and 2 deletions
|
|
@ -30,7 +30,7 @@ def _is_hidden_osx(path):
|
|||
file_stat = os.lstat(path)
|
||||
|
||||
if hasattr(file_stat, 'st_flags') and hasattr(stat, 'UF_HIDDEN'):
|
||||
return (file_stat.st_flags & stat.UF_HIDDEN) == stat.UF_HIDDEN
|
||||
return bool(file_stat.st_flags & stat.UF_HIDDEN)
|
||||
else:
|
||||
return False
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ def _is_hidden_win(path):
|
|||
attrs = ctypes.windll.kernel32.GetFileAttributesW(path)
|
||||
|
||||
# Ensure we have valid attribues and compare them against the mask.
|
||||
return attrs >= 0 and bool(attrs & hidden_mask)
|
||||
return attrs >= 0 and attrs & hidden_mask
|
||||
|
||||
|
||||
def _is_hidden_dot(path):
|
||||
|
|
|
|||
Loading…
Reference in a new issue