mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Enable `strict_equality` mypy option
Also fix the following mypy error:
```
lib/galaxy/util/path/__init__.py:247: error: Non-overlapping equality check (left operand type: "struct_passwd", right operand type: "str") [comparison-overlap]
or (file_owner == username and owner_permissions >= 4)
```
This commit is contained in:
@@ -244,7 +244,7 @@ def __path_permission_for_user(path: GenericPath, username: str) -> bool:
|
||||
other_permissions = int(oct_mode[-1])
|
||||
if (
|
||||
other_permissions >= 4
|
||||
or (file_owner == username and owner_permissions >= 4)
|
||||
or (file_owner.pw_name == username and owner_permissions >= 4)
|
||||
or (username in group_members and group_permissions >= 4)
|
||||
):
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user