Skip to content

Commit

Permalink
update supported python versions, update actions (#18)
Browse files Browse the repository at this point in the history
jpetrucciani authored Dec 2, 2022
1 parent f6b9559 commit f15b19f
Showing 9 changed files with 33 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ jobs:
needs: [archives, mypy, prospector, black]
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
name: python ${{ matrix.python-version }} tests
steps:
- uses: actions/checkout@v2
21 changes: 6 additions & 15 deletions .prospector.yaml
Original file line number Diff line number Diff line change
@@ -10,18 +10,6 @@ ignore-patterns:
- tmp\.py

pylint:
disable:
- bad-continuation
- broad-except
- import-error
- import-self
- logging-format-interpolation
- missing-docstring
- no-self-use
- unused-argument
- wrong-import-order
- unsubscriptable-object

options:
max-args: 10
max-locals: 100
@@ -43,6 +31,7 @@ pycodestyle:
disable:
- N802
- N807
- N818
- W503
options:
max-line-length: 100
@@ -56,9 +45,6 @@ bandit:

pyroma:
run: false
disable:
- PYR19
- PYR16

pydocstyle:
disable:
@@ -82,3 +68,8 @@ pydocstyle:
- D404
- D403
- D415

pyflakes:
disable:
- F401
- F403
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,8 +2,8 @@
version](https://badge.fury.io/py/gamble.svg)](https://badge.fury.io/py/gamble)
[![Code style:
black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
[![Python 3.6+
supported](https://img.shields.io/badge/python-3.6+-blue.svg)](https://www.python.org/downloads/release/python-360/)
[![Python 3.7+
supported](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/release/python-370/)
[![Documentation style:
archives](https://img.shields.io/badge/docstyle-archives-lightblue.svg)](https://github.com/jpetrucciani/archives)

18 changes: 10 additions & 8 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{ jacobi ? import
(
fetchTarball {
name = "jpetrucciani-2022-08-17";
url = "https://github.com/jpetrucciani/nix/archive/93ad4046a5fe9924282af9c56dc88012d8b5315e.tar.gz";
sha256 = "1ps5d55qvmh66n3xlmm1avsczl6xz82xic2n3vqrd1aj31kzdkm3";
}
)
(fetchTarball {
name = "jacobi-2022-12-01";
url = "https://nix.cobi.dev/x/15e5cfd7927420eddc8d822e2dc0ee32908c850b";
sha256 = "139k9dnqb5k1n7r1i6hk7vfiy9nmmla4hdvczi14sa4lv7grg7aq";
})
{ }
}:
let
@@ -32,7 +30,11 @@ let
];
scripts = [
(writeShellScriptBin "test_actions" ''
${jacobi.act}/bin/act --artifact-server-path ./.cache/ -r --rm
export DOCKER_HOST=$(${jacobi.docker-client}/bin/docker context inspect --format '{{.Endpoints.docker.Host}}')
${jacobi.act}/bin/act --container-architecture linux/amd64 -r --rm
'')
(writeShellScriptBin "prospector" ''
${prospector}/bin/prospector $@
'')
];
};
8 changes: 5 additions & 3 deletions gamble/models/cards.py
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
import random
from collections import Counter
from types import SimpleNamespace
from typing import Any, Dict, List, Union
from typing import Any, Dict, List, Optional, Union
from gamble.errors import InvalidCard


@@ -491,7 +491,9 @@ class Deck:
@desc playing card deck model
"""

def __init__(self, cards: List[Card] = None, shuffle: bool = True) -> None:
def __init__(
self, cards: Optional[List[Card]] = None, shuffle: bool = True
) -> None:
"""
@cc 3
@desc deck constructor
@@ -608,7 +610,7 @@ class EuchreDeck(Deck):
@desc deck specifically for euchre
"""

def __init__(self, **kwargs: Any) -> None:
def __init__(self, **_: Any) -> None:
"""
@cc 2
@desc euchre deck constructor
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[mypy]
python_version = 3.9
python_version = 3.10
disallow_untyped_defs = True
ignore_missing_imports = True

@@ -9,4 +9,4 @@ max-line-length = 100
max-complexity = 20

[tool:pytest]
log_print = False
filterwarnings = ignore::pytest.PytestConfigWarning
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@

__library__ = "gamble"
__version__ = "VERSION"

__user__ = "https://github.com/jpetrucciani"


with open("README.md", "r", encoding="UTF-8") as readme:
LONG_DESCRIPTION = readme.read()

@@ -29,11 +29,11 @@
install_requires=[],
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
],
4 changes: 4 additions & 0 deletions tests/models/test_cards.py
Original file line number Diff line number Diff line change
@@ -2,10 +2,14 @@
tests for the cards submodule of gamble
"""
import pytest
import random
from gamble import Card, Deck, EuchreDeck, Hand
from gamble.errors import InvalidCard


random.seed(420)


def test_card_init() -> None:
"""test that a card can be created"""
card = Card()
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py36,py37,py38,py39,py310
envlist = py37,py38,py39,py310,py311

[testenv]
deps =

0 comments on commit f15b19f

Please sign in to comment.