Skip to content

Commit

Permalink
updated to python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin committed Oct 31, 2022
1 parent f5a95b5 commit 97b0e63
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
python-version: ["3.11"]
poetry-version: [1.2.2]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
python-version: ["3.10"]
python-version: ["3.11"]
poetry-version: [1.2.2]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
python-version: ["3.10"]
python-version: ["3.11"]
poetry-version: [1.2.2]

steps:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10-alpine
FROM python:3.11-alpine

# Environment variables
ENV PYTHONFAULTHANDLER=1 \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ⚡ OverFast API

![Python](https://img.shields.io/badge/python-v3.10-blue)
![Python](https://img.shields.io/badge/python-v3.11-blue)
![Pylint](https://img.shields.io/badge/pylint-10%2F10-brightgreen)
![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)
[![Issues](https://img.shields.io/github/issues/TeKrop/overfast-api)](https://github.com/TeKrop/overfast-api/issues)
Expand Down Expand Up @@ -78,7 +78,7 @@ Using this way (only using the image built with the `Dockerfile` alone), there w
## 💽 Installation

### Requirements
* Python 3.10
* Python 3.11
* Poetry
* Docker & Docker Compose (production)

Expand Down
4 changes: 2 additions & 2 deletions overfastapi/commands/check_new_hero.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ def main():
# Compare both sets. If we have a difference, notify the developer
new_hero_keys = distant_hero_keys - local_hero_keys
if len(new_hero_keys) > 0:
logger.info("New hero keys were found : {}", str(new_hero_keys))
logger.info("New hero keys were found : {}", new_hero_keys)
send_discord_webhook_message(
"New Overwatch heroes detected, please add the following "
f"keys into the configuration : {str(new_hero_keys)}"
f"keys into the configuration : {new_hero_keys}"
)
else:
logger.info("No new hero found. Exiting.")
Expand Down
6 changes: 1 addition & 5 deletions overfastapi/common/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
heroes, gamemodes, etc.
"""
from enum import Enum


class StrEnum(str, Enum):
"""Generic Enum which will be casted easily as a string"""
from enum import StrEnum


class HeroKey(StrEnum):
Expand Down
2 changes: 1 addition & 1 deletion overfastapi/config.example.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""Project constants module"""
import os

OVERFAST_API_VERSION = "2.0.2"
OVERFAST_API_VERSION = "2.0.3"

OVERFAST_API_BASE_URL = "https://overfast-api.tekrop.fr"

Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[tool.poetry]
name = "overfast-api"
version = "2.0.2"
version = "2.0.3"
description = "Overwatch API giving data about heroes, maps, and players statistics."
authors = ["TeKrop <[email protected]>"]
license = "MIT"

[tool.poetry.dependencies]
python = "^3.10"
python = "^3.11"
fastapi = "^0.85.0"
beautifulsoup4 = "^4.11.1"
lxml = "^4.9.1"
Expand All @@ -19,7 +19,6 @@ loguru = "^0.6.0"
black = "^22.10.0"
pytest = "^7.1.3"
pytest-cov = "^4.0.0"
pytest-sugar = "^0.9.5"
pylint = "^2.15.3"
isort = "^5.10.1"
ipdb = "^0.13.9"
Expand Down
2 changes: 1 addition & 1 deletion tests/commands/test_check_new_hero.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_check_new_heroes(distant_heroes: set[str], expected: set[str]):
), patch("overfastapi.common.logging.logger.info", logger_info_mock):
check_new_hero_main()

logger_info_mock.assert_called_with("New hero keys were found : {}", str(expected))
logger_info_mock.assert_called_with("New hero keys were found : {}", expected)


def test_check_error_from_blizzard():
Expand Down

0 comments on commit 97b0e63

Please sign in to comment.