Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
fix: new lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Nukesor committed May 6, 2024
1 parent f8b7167 commit 8d682a1
Show file tree
Hide file tree
Showing 38 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions stickerfinder/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Config values for stickerfinder."""

import logging
import os
import sys
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/db.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Helper class to get a database engine and to get a session."""

from sqlalchemy import create_engine
from sqlalchemy.ext.compiler import compiles
from sqlalchemy.ext.declarative import declarative_base
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/helper/display.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Helper for compiling text."""

from stickerfinder.i18n import i18n
from stickerfinder.telegram.keyboard import get_help_keyboard

Expand Down
1 change: 1 addition & 0 deletions stickerfinder/helper/plot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module responsibel for plotting statistics."""

import io

import matplotlib
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/helper/text.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Helper for text handling."""

MAX_LENGTH = 4096


Expand Down
1 change: 1 addition & 0 deletions stickerfinder/i18n.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Translation module."""

import i18n

i18n.set("filename_format", "{locale}.{format}")
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/logic/cleanup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Some functions to cleanup the database."""

from datetime import datetime, timedelta

from sqlalchemy import or_
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/logic/maintenance.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Helper functions for maintenance."""

from sqlalchemy import func
from telegram.error import BadRequest, ChatMigrated, Unauthorized

Expand Down
1 change: 1 addition & 0 deletions stickerfinder/logic/sticker_set.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Helper functions for handling sticker sets."""

from telegram.error import BadRequest

from stickerfinder.config import config
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/logic/tag.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Helper functions for tagging."""

from collections import OrderedDict

from sqlalchemy import func
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/models/change.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The sqlite model for a change."""

from sqlalchemy import Column, ForeignKey, Table, func
from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy.orm import relationship
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/models/chat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The sqlite model for a chat."""

import logging

from sqlalchemy import Column, ForeignKey, Table, UniqueConstraint, func
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/models/inline_query.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The sqlite model for a inline search."""

from sqlalchemy import Column, ForeignKey, func
from sqlalchemy.orm import relationship
from sqlalchemy.types import BigInteger, DateTime, String
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/models/inline_query_request.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The sqlite model for a inline query request."""

from sqlalchemy import Boolean, Column, ForeignKey, UniqueConstraint, func
from sqlalchemy.orm import relationship
from sqlalchemy.types import BigInteger, DateTime, Interval, String
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/models/proposed_tags.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The sqlite model for a change."""

from sqlalchemy import Column, ForeignKey, func
from sqlalchemy.orm import relationship
from sqlalchemy.types import BigInteger, DateTime, Integer, String
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/models/report.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The sqlite model for a change."""

from sqlalchemy import Column, ForeignKey, func
from sqlalchemy.orm import relationship
from sqlalchemy.types import DateTime, Integer, String
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/models/sticker.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The sqlite model for a sticker."""

from sqlalchemy import (
Column,
ForeignKey,
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/models/sticker_set.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The sqlite model for a sticker set."""

from sqlalchemy import CheckConstraint, Column, Index, func
from sqlalchemy.exc import IntegrityError
from sqlalchemy.orm import relationship
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/models/sticker_usages.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The sqlite model for a sticker."""

from sqlalchemy import Column, ForeignKey, func
from sqlalchemy.orm import relationship
from sqlalchemy.types import BigInteger, DateTime, Integer, String
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/models/tag.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The sqlite model for a tag."""

from sqlalchemy import Column, Index, func
from sqlalchemy.orm import relationship
from sqlalchemy.types import Boolean, DateTime, String
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/models/task.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The sqlite model for a task."""

from uuid import uuid4

from sqlalchemy import CheckConstraint, Column, ForeignKey, func
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/models/user.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The sqlite model for a user."""

from sqlalchemy import Boolean, Column, func
from sqlalchemy.exc import IntegrityError
from sqlalchemy.orm import relationship
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/sentry.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Simple wrapper around sentry that allows for lazy initilization."""

import sentry_sdk
from sentry_sdk import configure_scope

Expand Down
1 change: 1 addition & 0 deletions stickerfinder/session.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Session helper functions."""

import traceback
from datetime import datetime, timedelta
from functools import wraps
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/stickerfinder.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""A bot for stickers."""

import logging

from telegram.ext import (
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/telegram/commands/admin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""General admin commands."""

import secrets
import time

Expand Down
1 change: 1 addition & 0 deletions stickerfinder/telegram/commands/chat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Chat related commands."""

from stickerfinder.logic.tag import send_tagged_count_message
from stickerfinder.session import message_wrapper
from stickerfinder.telegram.keyboard import get_main_keyboard
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/telegram/commands/maintenance.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Maintenance related commands."""

from stickerfinder.logic.maintenance import check_maintenance_chat, check_newsfeed_chat
from stickerfinder.session import message_wrapper

Expand Down
1 change: 1 addition & 0 deletions stickerfinder/telegram/commands/misc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Misc telegram commands."""

from stickerfinder.helper.display import get_help_text_and_keyboard
from stickerfinder.i18n import i18n
from stickerfinder.session import message_wrapper
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/telegram/commands/sticker_set.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Sticker set related commands."""

from stickerfinder.models import Report, Sticker
from stickerfinder.session import message_wrapper

Expand Down
1 change: 1 addition & 0 deletions stickerfinder/telegram/commands/usage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Sticker usage related commands."""

from stickerfinder.models import Sticker, StickerUsage
from stickerfinder.session import message_wrapper

Expand Down
1 change: 1 addition & 0 deletions stickerfinder/telegram/inline_query/context.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Object representing a inline query search for easier parameter handling."""

from stickerfinder.logic.tag import get_tags_from_text


Expand Down
1 change: 1 addition & 0 deletions stickerfinder/telegram/inline_query/search.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Entry points for inline query search."""

import hashlib
from datetime import datetime

Expand Down
1 change: 1 addition & 0 deletions stickerfinder/telegram/inline_query/sql_query.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Query composition for inline search."""

from pprint import pprint

from sqlalchemy import Numeric, and_, case, cast, func, or_
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/telegram/jobs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Telegram job tasks."""

from datetime import datetime, timedelta

from sqlalchemy import and_, func
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/telegram/keyboard/maintenance.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Maintenance related keyboards."""

from telegram import InlineKeyboardButton, InlineKeyboardMarkup

from stickerfinder.helper.callback import CallbackResult, CallbackType, build_set_data
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/telegram/keyboard/settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Maintenance related keyboards."""

from telegram import InlineKeyboardButton, InlineKeyboardMarkup

from stickerfinder.helper.callback import build_data, build_user_data
Expand Down
1 change: 1 addition & 0 deletions stickerfinder/telegram/message_handlers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Message handler functions."""

from stickerfinder.enums import TagMode
from stickerfinder.logic.tag import (
current_sticker_tags_message,
Expand Down

0 comments on commit 8d682a1

Please sign in to comment.