Skip to content

Commit a6b09e7

Browse files
committed
quickfix detection of python source code
1 parent d9086bc commit a6b09e7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

aura/analyzers/python/readonly.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def __init__(self, *, location: ScanLocation):
1717
def __call__(self) -> typing.Generator[Detection, None, None]:
1818
if not self.hooks:
1919
return
20-
elif self.location.metadata["mime"] != "text/x-python":
20+
elif self.location.is_python_source_code:
2121
return
2222
try:
2323
for x in self.hooks:

aura/uri_handlers/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def filename(self) -> Optional[str]:
216216

217217
@property
218218
def is_python_source_code(self) -> bool:
219-
return (self.metadata["mime"] == "text/x-python")
219+
return (self.metadata["mime"] in ("text/x-python", "text/x-script.python"))
220220

221221
def create_child(self, new_location: Union[str, Path], metadata=None, **kwargs) -> ScanLocation:
222222
if metadata is None:

0 commit comments

Comments
 (0)