Lint fixes and added lint config file
This commit is contained in:
parent
ccb59c7f02
commit
1fbd6a0824
@ -1,15 +1,19 @@
|
||||
# connection_handler.py
|
||||
import json, requests
|
||||
"""
|
||||
Handles requests to remote and integrated instances of Ollama
|
||||
"""
|
||||
import json
|
||||
import requests
|
||||
#OK=200 response.status_code
|
||||
url = None
|
||||
bearer_token = None
|
||||
URL = None
|
||||
BEARER_TOKEN = None
|
||||
|
||||
def get_headers(include_json:bool) -> dict:
|
||||
headers = {}
|
||||
if include_json:
|
||||
headers["Content-Type"] = "application/json"
|
||||
if bearer_token:
|
||||
headers["Authorization"] = "Bearer {}".format(bearer_token)
|
||||
if BEARER_TOKEN:
|
||||
headers["Authorization"] = "Bearer {}".format(BEARER_TOKEN)
|
||||
return headers if len(headers.keys()) > 0 else None
|
||||
|
||||
def simple_get(connection_url:str) -> dict:
|
||||
|
@ -1,10 +1,13 @@
|
||||
# dialogs.py
|
||||
|
||||
from gi.repository import Adw, Gtk, Gdk, GLib, GtkSource, Gio, GdkPixbuf
|
||||
import os, logging
|
||||
"""
|
||||
Handles UI dialogs
|
||||
"""
|
||||
import os
|
||||
import logging
|
||||
from pytube import YouTube
|
||||
from html2text import html2text
|
||||
from . import connection_handler
|
||||
from gi.repository import Adw, Gtk
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
# CLEAR CHAT | WORKS
|
||||
|
4
unsaved file 2
Normal file
4
unsaved file 2
Normal file
@ -0,0 +1,4 @@
|
||||
[MASTER]
|
||||
|
||||
[TYPECHECK]
|
||||
ignored-variables=_
|
Loading…
x
Reference in New Issue
Block a user