mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Fixed the errors from my last PRs
I testet all using pytest and python versions 3.6-3.9 on macOS
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# credits: https://adamj.eu/tech/2021/05/13/python-type-hints-how-to-fix-circular-imports/
|
||||
from __future__ import annotations
|
||||
import random
|
||||
import re
|
||||
import string
|
||||
@@ -8,13 +6,12 @@ import threading
|
||||
import traceback
|
||||
import warnings
|
||||
import functools
|
||||
from typing import Any, List, Dict, TYPE_CHECKING
|
||||
from typing import Any, List, Dict
|
||||
|
||||
import queue as Queue
|
||||
import logging
|
||||
# credits: https://adamj.eu/tech/2021/05/13/python-type-hints-how-to-fix-circular-imports/
|
||||
if TYPE_CHECKING:
|
||||
from telebot import types
|
||||
|
||||
from telebot import types
|
||||
|
||||
try:
|
||||
from PIL import Image
|
||||
@@ -198,7 +195,7 @@ def is_command(text: str) -> bool:
|
||||
:param text: Text to check.
|
||||
:return: True if `text` is a command, else False.
|
||||
"""
|
||||
if (text is None): return None
|
||||
if (text is None): return False
|
||||
return text.startswith('/')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user