Skip to content

Commit 3904124

Browse files
committed
chore: add __all__ for explicit module exports
1 parent eb54332 commit 3904124

File tree

9 files changed

+50
-0
lines changed

9 files changed

+50
-0
lines changed

tfinance/blast.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,9 @@ async def daily(update: Update, _):
3636
else:
3737
await update.message.reply_text("Ежедневная рассылка включена")
3838
db.user_daily_notify(user)
39+
40+
41+
__all__ = [
42+
"daily",
43+
"notify_assignees",
44+
]

tfinance/database.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,3 +353,8 @@ def add_point(self, user: User):
353353
)
354354
user.points += 1
355355
self.con.commit()
356+
357+
358+
__all__ = [
359+
"Database",
360+
]

tfinance/exceptions.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,11 @@ class EmptyDataFrameError(Exception): # Пустой дата фрейм
1414

1515
class WrongPeriodError(Exception): # Неверный период
1616
pass
17+
18+
19+
__all__ = [
20+
"StockSelectedAlready",
21+
"PredictionAlreadySet",
22+
"EmptyDataFrameError",
23+
"WrongPeriodError",
24+
]

tfinance/functions.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@ def create_user(update: Update) -> User:
1313
user_data["language_code"],
1414
user_data["is_bot"],
1515
)
16+
17+
18+
__all__ = [
19+
"create_user",
20+
]

tfinance/game.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,3 +223,9 @@ async def game_results(context: CallbackContext):
223223
},
224224
fallbacks=[CommandHandler("game", game_menu)],
225225
)
226+
227+
228+
__all__ = [
229+
"game_handler",
230+
"game_results",
231+
]

tfinance/graphics/visualize.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,9 @@ def check_stock_prices(stock_name) -> bool:
6363
curr_price = stock["Close"][-1]
6464

6565
return curr_price > prev_price
66+
67+
68+
__all__ = [
69+
"check_stock_prices",
70+
"do_stock_image",
71+
]

tfinance/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
from stock import check_stock, get_all_stocks, load_stocks
2727
from config import BOT_TOKEN, TIMEZONE
2828

29+
__all__ = []
30+
2931
# Запускаем логирование
3032
Path("logs").mkdir(exist_ok=True)
3133
logging.basicConfig(

tfinance/models.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,8 @@ def __init__(
2121
self.prediction = prediction
2222
self.selected_stock = selected_stock
2323
self.points: int = 0
24+
25+
26+
__all__ = [
27+
"User",
28+
]

tfinance/stock.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,10 @@ def get_all_stocks():
6060
} for i in stocks
6161
]
6262
save_stocks("stocks.json", stocks)
63+
64+
65+
__all__ = [
66+
"check_stock",
67+
"get_all_stocks",
68+
"load_stocks",
69+
]

0 commit comments

Comments
 (0)