Lint fixes and added lint config file

This commit is contained in:
jeffser 2024-08-04 20:41:35 -06:00
parent ccb59c7f02
commit 1fbd6a0824
3 changed files with 19 additions and 8 deletions

View File

@ -1,15 +1,19 @@
# connection_handler.py # connection_handler.py
import json, requests """
Handles requests to remote and integrated instances of Ollama
"""
import json
import requests
#OK=200 response.status_code #OK=200 response.status_code
url = None URL = None
bearer_token = None BEARER_TOKEN = None
def get_headers(include_json:bool) -> dict: def get_headers(include_json:bool) -> dict:
headers = {} headers = {}
if include_json: if include_json:
headers["Content-Type"] = "application/json" headers["Content-Type"] = "application/json"
if bearer_token: if BEARER_TOKEN:
headers["Authorization"] = "Bearer {}".format(bearer_token) headers["Authorization"] = "Bearer {}".format(BEARER_TOKEN)
return headers if len(headers.keys()) > 0 else None return headers if len(headers.keys()) > 0 else None
def simple_get(connection_url:str) -> dict: def simple_get(connection_url:str) -> dict:

View File

@ -1,10 +1,13 @@
# dialogs.py # dialogs.py
"""
from gi.repository import Adw, Gtk, Gdk, GLib, GtkSource, Gio, GdkPixbuf Handles UI dialogs
import os, logging """
import os
import logging
from pytube import YouTube from pytube import YouTube
from html2text import html2text from html2text import html2text
from . import connection_handler from . import connection_handler
from gi.repository import Adw, Gtk
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
# CLEAR CHAT | WORKS # CLEAR CHAT | WORKS

4
unsaved file 2 Normal file
View File

@ -0,0 +1,4 @@
[MASTER]
[TYPECHECK]
ignored-variables=_