Skip to content

Commit 431867e

Browse files
committed
Fix linting
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
1 parent f490cb6 commit 431867e

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

scanpipe/models.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2008,18 +2008,16 @@ def elfs(self):
20082008
| Q(file_type__icontains="shared object")
20092009
)
20102010
)
2011-
2011+
20122012
def win_exes(self):
20132013
"""
20142014
Resources that are ``files`` and their filetype contains "for ms windows" or
20152015
starts with "pe32".
20162016
Keep sync with the content type implementation at ``typecode.contenttype``.
20172017
"""
2018-
return (
2019-
self.files()
2020-
.filter(
2021-
Q(file_type__icontains="for ms windows") | Q(filetype_file__istartswith='pe32')
2022-
)
2018+
return self.files().filter(
2019+
Q(file_type__icontains="for ms windows")
2020+
| Q(filetype_file__istartswith="pe32")
20232021
)
20242022

20252023
def mach_os(self):
@@ -2028,14 +2026,11 @@ def mach_os(self):
20282026
contains "application/x-mach-binary".
20292027
Keep sync with the content type implementation at ``typecode.contenttype``.
20302028
"""
2031-
return (
2032-
self.files()
2033-
.filter(
2034-
models.Q(filetype__icontains="mach-o") |
2035-
models.Q(mimetype__icontains="application/x-mach-binary")
2036-
)
2029+
return self.files().filter(
2030+
models.Q(filetype__icontains="mach-o")
2031+
| models.Q(mimetype__icontains="application/x-mach-binary")
20372032
)
2038-
2033+
20392034
def is_executable_binary(self):
20402035
return self.elfs().union(self.win_exes(), self.mach_os())
20412036

0 commit comments

Comments
 (0)