You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def subresource_integrity(reqs: dict, expectation='sri-implemented-and-external-scripts-loaded-securely') -> dict:
output = {
}
if response.headers.get('Content-Type', '').split(';')[0] not in HTML_TYPES:
try:
soup = bs(reqs['resources']['__path__'], 'html.parser')
except:
output['result'] = 'html-not-parsable'
for script in scripts:
samesld = True if (psl.privatesuffix(urlparse(response.url).netloc) ==
psl.privatesuffix(src.netloc)) else False
if src.scheme == '':
securescheme = True
error:
error: Autofix introduced a syntax error. Reverting all changes.
This indicates a bug in `ruff`. If you could open an issue at:
https://github.com/astral-sh/ruff/issues/new?title=%5BAutofix%20error%5D
...quoting the contents of `7675231.py`, the rule codes SIM210, along with the `pyproject.toml` settings and executed command, we'd be very appreciative!
7675231.py:10:27: SIM210 Use `bool(psl.privatesuffix(urlparse(response.url).netloc) == psl.privatesuffix(src.netloc))` instead of `True if psl.privatesuffix(urlparse(response.url).netloc) == psl.privatesuffix(src.netloc) else False`
Found 1 error.
Ruff 0.0.287 (latest changes from main branch)
file content:
error:
7675231.py.zip
The text was updated successfully, but these errors were encountered: