Skip to content

Commit

Permalink
Switch to ruff, bump Python version in GitHub Actions to 3.11.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukegb committed Feb 4, 2024
1 parent 5f7661b commit ea8db68
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 11 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8]
python-version: [3.11]

steps:
- uses: actions/checkout@v2
Expand All @@ -19,11 +19,9 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get install coinor-cbc
python -m pip install --upgrade pip
pip install flake8==3.8.3 black==19.10b0 pytest==5.4.3
pip install -e .
python -m pip install --upgrade pip poetry
poetry install --with dev
- name: Test with pytest
run: |
black --check ./slotmachine ./tests
flake8
pytest
poetry run ruff check ./
poetry run pytest
123 changes: 122 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ pulp = "2.1"
python-dateutil = ">=2.5.3"


[tool.poetry.group.dev.dependencies]
ruff = "^0.2.0"
pytest = "^8.0.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.ruff]
ignore = ["E741"]
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion slotmachine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from datetime import datetime
from dateutil import parser, relativedelta
from dataclasses import dataclass, field
from typing import Iterable, NewType, cast
from typing import NewType, cast
import json
import time
import logging
Expand Down

0 comments on commit ea8db68

Please sign in to comment.