Skip to content

Fix CI on current black and mypy - #245

Closed
choosen23 wants to merge 1 commit into
drvinceknight:mainfrom
choosen23:run-black-on-src
Closed

Fix CI on current black and mypy#245
choosen23 wants to merge 1 commit into
drvinceknight:mainfrom
choosen23:run-black-on-src

Conversation

@choosen23

@choosen23 choosen23 commented Aug 26, 2026

Copy link
Copy Markdown

Two commands in the tox env currently fail on main, so CI exits before the tests run. This affects
every open pull request, not just new ones.

1. black --check src/ — recent black releases collapse these short .format calls onto a
single line:

-                  """.format(
-            count
-        )
+                  """.format(count)

2. mypy --ignore-missing-imports src/nashpyimitation_dynamics is annotated
Generator[Tuple[float, float], Any, None] but yields nash_equilibrium_A, nash_equilibrium_B,
which are arrays. Corrected to Tuple[npt.NDArray, npt.NDArray].

No behaviour change in either case. After this, the full tox command set passes locally:

black --check src/ tests/ clean
mypy --ignore-missing-imports src/nashpy Success, no issues in 25 files
interrogate --fail-under 100 100%
pytest . --cov=nashpy --cov-fail-under=100 + doctests 224 passed, 100% coverage
flake8 src/ tests/ clean

Two checks in the tox env currently fail on main, so CI stops before the
tests run. This affects every open pull request.

`black --check src/` fails because recent releases collapse these short
`.format` calls onto a single line.

`mypy` fails on the return annotation of `imitation_dynamics`, which
declares `Tuple[float, float]` but yields a pair of arrays.

No behaviour change.
@choosen23 choosen23 changed the title Run black on src Fix CI on current black and mypy Aug 26, 2026
@choosen23

Copy link
Copy Markdown
Author

Folded into #244 as its first commit, to keep this to a single pull request. Closing — no need to review both.

@choosen23 choosen23 closed this Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant