Passed
Push — main ( 6693a8...9599de )
by Yohann
01:21
created

get_pypi_downloads   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A get_pypi_stats() 0 3 1
1
from __future__ import annotations
2
3
import requests
4
from typing import TYPE_CHECKING
5
6
if TYPE_CHECKING:
7
    from pincer_bot.bot import Bot
8
9
API_LINK: str = "https://api.pepy.tech/api/projects/Pincer"
10
11
12
async def get_pypi_stats(self: Bot):
13
    response = requests.get(API_LINK)
14
    self.pypi.update(response.json())
15