mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-12 19:44:13 +02:00
Fix remaining Ruff errors with GPT-5.6 Sol high
https://gist.github.com/simonw/6da7906a9fea6e90da131c21a9055199
This commit is contained in:
parent
6ee502d127
commit
48ef55152c
16 changed files with 164 additions and 190 deletions
|
|
@ -1,9 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import inspect
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from subprocess import PIPE, Popen, check_output
|
||||
from subprocess import PIPE, CalledProcessError, Popen, check_output
|
||||
|
||||
# This file is execfile()d with the current directory set to its
|
||||
# containing dir.
|
||||
|
|
@ -49,7 +47,7 @@ extlinks = {
|
|||
def _linkcode_git_ref():
|
||||
try:
|
||||
return check_output(["git", "rev-parse", "HEAD"]).decode("utf8").strip()
|
||||
except Exception:
|
||||
except (CalledProcessError, OSError):
|
||||
return "main"
|
||||
|
||||
|
||||
|
|
@ -78,7 +76,7 @@ def linkcode_resolve(domain, info):
|
|||
obj = inspect.unwrap(obj)
|
||||
source_file = inspect.getsourcefile(obj)
|
||||
_, line_number = inspect.getsourcelines(obj)
|
||||
except Exception:
|
||||
except (OSError, TypeError, ValueError):
|
||||
return None
|
||||
|
||||
if source_file is None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue