Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
fantix committed Feb 14, 2025
1 parent b3960d6 commit e9504b1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
16 changes: 10 additions & 6 deletions edgedb/ai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.ai import * # noqa
create_ai = create_rag_client
EdgeDBAI = RAGClient
create_async_ai = create_async_rag_client
AsyncEdgeDBAI = AsyncRAGClient
AIOptions = RAGOptions
create_ai = create_rag_client # noqa
EdgeDBAI = RAGClient # noqa
create_async_ai = create_async_rag_client # noqa
AsyncEdgeDBAI = AsyncRAGClient # noqa
AIOptions = RAGOptions # noqa
import gel.ai as _mod
import sys as _sys
_cur = _sys.modules['edgedb.ai']
Expand All @@ -20,7 +20,11 @@
setattr(_cur, 'AIOptions', getattr(_mod, 'RAGOptions'))
if hasattr(_cur, '__all__'):
setattr(_cur, '__all__', getattr(_cur, '__all__') + [
'create_ai', 'EdgeDBAI', 'create_async_ai', 'AsyncEdgeDBAI', 'AIOptions',
'create_ai',
'EdgeDBAI',
'create_async_ai',
'AsyncEdgeDBAI',
'AIOptions',
])
del _cur
del _sys
Expand Down
4 changes: 2 additions & 2 deletions tools/make_import_shims.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def main():
''')
if mod in COMPAT:
for k, v in COMPAT[mod].items():
f.write(f' {k} = {v}\n')
f.write(f' {k} = {v} # noqa\n')
f.write(f'''\
import {mod} as _mod
import sys as _sys
Expand All @@ -53,7 +53,7 @@ def main():
f.write(f'''\
if hasattr(_cur, '__all__'):
setattr(_cur, '__all__', getattr(_cur, '__all__') + [
{', '.join(repr(k) for k in COMPAT[mod])},
{',\n '.join(repr(k) for k in COMPAT[mod])},
])
''')
f.write(f'''\
Expand Down

0 comments on commit e9504b1

Please sign in to comment.