Skip to content

Commit aade508

Browse files
harshil21Bibo-Joshi
authored andcommitted
Update Code Quality Dependencies (python-telegram-bot#2748)
1 parent 2250412 commit aade508

File tree

8 files changed

+15
-17
lines changed

8 files changed

+15
-17
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
# * the additional_dependencies here match requirements.txt
44
repos:
55
- repo: https://github.com/psf/black
6-
rev: 20.8b1
6+
rev: 21.9b0
77
hooks:
88
- id: black
99
args:
1010
- --diff
1111
- --check
1212
- repo: https://gitlab.com/pycqa/flake8
13-
rev: 3.9.2
13+
rev: 4.0.1
1414
hooks:
1515
- id: flake8
1616
- repo: https://github.com/PyCQA/pylint
17-
rev: v2.10.2
17+
rev: v2.11.1
1818
hooks:
1919
- id: pylint
2020
files: ^(telegram|examples)/.*\.py$
@@ -56,7 +56,7 @@ repos:
5656
- cachetools==4.2.2
5757
- . # this basically does `pip install -e .`
5858
- repo: https://github.com/asottile/pyupgrade
59-
rev: v2.24.0
59+
rev: v2.29.0
6060
hooks:
6161
- id: pyupgrade
6262
files: ^(telegram|examples|tests)/.*\.py$

requirements-dev.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ cryptography!=3.4,!=3.4.1,!=3.4.2,!=3.4.3
33

44
pre-commit
55
# Make sure that the versions specified here match the pre-commit settings!
6-
black==20.8b1
7-
flake8==3.9.2
8-
pylint==2.10.2
6+
black==21.9b0
7+
flake8==4.0.1
8+
pylint==2.11.1
99
mypy==0.910
10-
pyupgrade==2.24.0
10+
pyupgrade==2.29.0
1111

12-
pytest==6.2.4
12+
pytest==6.2.5
1313

1414
flaky
1515
beautifulsoup4

telegram/_bot.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2259,9 +2259,7 @@ def get_file(
22592259
if result.get('file_path') and not is_local_file( # type: ignore[union-attr]
22602260
result['file_path'] # type: ignore[index]
22612261
):
2262-
result['file_path'] = '{}/{}'.format( # type: ignore[index]
2263-
self.base_file_url, result['file_path'] # type: ignore[index]
2264-
)
2262+
result['file_path'] = f"{self.base_file_url}/{result['file_path']}" # type: ignore
22652263

22662264
return File.de_json(result, self) # type: ignore[return-value, arg-type]
22672265

telegram/error.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def __init__(self, message: str):
5454
self.message = msg
5555

5656
def __str__(self) -> str:
57-
return '%s' % self.message
57+
return self.message
5858

5959
def __reduce__(self) -> Tuple[type, Tuple[str]]:
6060
return self.__class__, (self.message,)

telegram/ext/_builders.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@
133133
# the UpdaterBuilder has all method that the DispatcherBuilder has
134134
class _BaseBuilder(Generic[ODT, BT, CCT, UD, CD, BD, JQ, PT]):
135135
# pylint reports false positives here:
136-
# pylint: disable=unused-private-member
137136

138137
__slots__ = (
139138
'_token',

telegram/ext/_dispatcher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
from telegram.ext._utils.stack import was_called_by
5252

5353
if TYPE_CHECKING:
54-
from .jobqueue import Job
55-
from .builders import InitDispatcherBuilder
54+
from telegram.ext._jobqueue import Job
55+
from telegram.ext._builders import InitDispatcherBuilder
5656

5757
DEFAULT_GROUP: int = 0
5858

telegram/ext/_updater.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
from telegram.ext._utils.types import BT
4747

4848
if TYPE_CHECKING:
49-
from .builders import InitUpdaterBuilder
49+
from telegram.ext._builders import InitUpdaterBuilder
5050

5151

5252
DT = TypeVar('DT', bound=Union[None, Dispatcher])

telegram/ext/filters.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2072,6 +2072,7 @@ def filter(self, message: Message) -> bool:
20722072

20732073
class _Dice(_DiceEmoji):
20742074
__slots__ = ()
2075+
# pylint: disable=no-member
20752076
dice = _DiceEmoji(DiceEmoji.DICE, DiceEmoji.DICE.name.lower())
20762077
darts = _DiceEmoji(DiceEmoji.DARTS, DiceEmoji.DARTS.name.lower())
20772078
basketball = _DiceEmoji(DiceEmoji.BASKETBALL, DiceEmoji.BASKETBALL.name.lower())

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy