Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
continue-on-error: true
- name: Lint with ruff
run: |
ruff src
ruff check src
- name: Format with ruff
run: |
ruff format src --diff
Expand Down
32 changes: 23 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[tool.ruff]
line-length = 88
line-length = 100
src = ["src"]
target-version = "py311"

# Enable Pyflakes `E` and `F` codes by default.
# Enable only style-related checks by default.
select = [
# Pyflakes
"F",
# Pycodestyle
"E",
"W",
Expand Down Expand Up @@ -35,16 +35,30 @@ exclude = [
"node_modules",
"venv",
]
per-file-ignores = {}

# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

# Assume Python 3.11.
target-version = "py311"

[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10

[tool.poetry.dependencies]
[tool.ruff.isort]
known-first-party = ["src"]

[tool.ruff.lint]
select = [
"E",
"W",
"I001",
]
ignore = []
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

[tool.ruff.lint.mccabe]
max-complexity = 10

[tool.ruff.lint.isort]
known-first-party = ["src"]

[tool.poetry.dependencies]
2 changes: 1 addition & 1 deletion src/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import orjson

import redis.asyncio as aioredis
from redis import asyncio as aioredis
from src.config import settings
from src.models import CustomModel

Expand Down
8 changes: 2 additions & 6 deletions src/tgbot/handlers/reaction.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
"""
Handle reactions on sent memes
"""
"""Handle reactions on sent memes."""

import asyncio
import logging

from telegram import Update
from telegram.ext import (
ContextTypes,
)
from telegram.ext import ContextTypes

from src.flows.rewards.daily import reward_user_for_daily_activity
from src.recommendations.service import (
Expand Down
Loading