Skip to content

Commit

Permalink
update local env, add python 3.12 tests, update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jpetrucciani committed Oct 17, 2023
1 parent 03b62dc commit 5e1a2e8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,34 @@ jobs:
archives:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: jpetrucciani/archives-check@main
with:
path: 'gamble/'
mypy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: jpetrucciani/mypy-check@master
black:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: jpetrucciani/black-check@master
ruff:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: jpetrucciani/ruff-check@main
tests:
runs-on: ubuntu-22.04
needs: [archives, mypy, black, ruff]
strategy:
matrix:
python-version: ['3.10', '3.11']
python-version: ['3.10', '3.11', '3.12']
name: python ${{ matrix.python-version }} tests
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v3
with:
Expand Down
6 changes: 3 additions & 3 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{ pkgs ? import
(fetchTarball {
name = "jpetrucciani-2023-06-26";
url = "https://github.com/jpetrucciani/nix/archive/cfbb79b2245dcc3d06f6bd80892d346363a8b9e5.tar.gz";
sha256 = "15wa55yhmv3hfsx29zabg6q5sqy9y3xrxy7w0dlrzfpkpy6xk56n";
name = "jpetrucciani-2023-10-17";
url = "https://github.com/jpetrucciani/nix/archive/d944b2ed0e17f5e8e12332d21d226038ccb77ccb.tar.gz";
sha256 = "0dzcqs7614pd0z0n17d3y6n6w1snk0x54pj8m740w4657i538g7s";
})
{ }
}:
Expand Down
2 changes: 1 addition & 1 deletion gamble/models/dice.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def roll_many(self, num_rolls: int = 2) -> list[int]:
@arg num_rolls: the number of times to roll the dice
@ret list of values rolled by these dice
"""
return [self.roll() for _ in range(0, num_rolls)]
return [self.roll() for _ in range(num_rolls)]

def max_of(self, num_rolls: int = 2) -> tuple[int, list[int]]:
"""
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"License :: OSI Approved :: MIT License",
Expand All @@ -34,7 +35,7 @@ target-version = ["py311"]
line-length = 100
select = ["A", "ANN", "ARG", "B", "C4", "D", "E", "F", "ICN", "ISC", "N", "PD", "PGH", "PLR", "PLW", "PIE", "PT", "Q", "RET", "RUF", "S", "SIM", "TID", "UP", "W", "YTT"]
ignore = ["A001", "A003", "ANN101", "ANN102", "ANN401", "B008", "B019", "C405", "D200", "D203", "D205", "D212", "D400", "D403", "D404", "D415", "E501", "N818", "PGH003", "PGH004", "PLR2004", "PT012", "S101", "S105", "S108", "S311", "W605"]
target-version = "py310"
target-version = "py311"
exclude = [
".direnv",
".git",
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py39,py310,py311
envlist = py310,py311,py312

[testenv]
deps =
Expand Down

0 comments on commit 5e1a2e8

Please sign in to comment.