GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Pin `mypy==1.18.2` by George-Ogden · Pull Request #2087 · gitpython-developers/GitPython

Conversation

@George-Ogden

@George-Ogden George-Ogden commented Nov 28, 2025

Copy link
Copy Markdown
Contributor

Pin mypy version and fix errors
Now, the CI will fail when the types are incorrect

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
George-Ogden added 10 commits November 28, 2025 09:04
@George-Ogden
Pin mypy==1.18.2
497ca40
@George-Ogden
Fail remote pipeline when mypy fails
50762f1
@George-Ogden
Fix or ignore all mypy errors
8469a12
@George-Ogden
Fix typing so that code can run
a9756bc
@George-Ogden
Stop Lit_commit_ish being imported
0aba3e7
@George-Ogden
Set __test__ = False in not tested classes
019f270
@George-Ogden
Add missing parentheses around tuple constructor
ca5a2e8
@George-Ogden
Install mypy for Python >= 3.9
c757908
@George-Ogden
Skip mypy when Python < 3.9
9decf74
@George-Ogden
Use git.types.Literal instead of typing.Literal
a1f094c
@George-Ogden
George-Ogden marked this pull request as ready for review November 28, 2025 12:24
@Byron
Byron requested a review from Copilot November 29, 2025 09:46
Copilot started reviewing on behalf of Byron November 29, 2025 09:46
View session
Copilot finished reviewing on behalf of Byron November 29, 2025 09:49
Copilot AI reviewed Nov 29, 2025
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR pins mypy to version 1.18.2 and addresses type checking errors to enable strict type checking in CI. The changes remove continue-on-error: true from the mypy CI step and restrict mypy execution to Python 3.9+, ensuring that type errors will now cause CI failures.

  • Pins mypy version and restricts it to Python 3.9+ environments
  • Adds specific type ignore comments with error codes for legitimate type checking edge cases
  • Fixes type annotations and removes unnecessary casts
  • Prevents pytest from treating test utility classes as test classes

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test-requirements.txt Pins mypy==1.18.2 for Python 3.9+ to prevent new type errors from future mypy releases
pyproject.toml Removes python_version constraint allowing mypy to use the running Python version
.github/workflows/pythonpackage.yml Restricts mypy checks to Python 3.9+ and removes continue-on-error to fail CI on type errors
test/test_submodule.py Adds __test__ = False to prevent pytest treating TestRootProgress as a test class and adds noqa for assertRaises
test/test_remote.py Adds return type annotation and __test__ = False to TestRemoteProgress
test/lib/helper.py Removes unnecessary B001 noqa code from bare except statements
test/deprecation/test_types.py Removes type ignore comment now that Lit_commit_ish is properly defined
git/types.py Guards Lit_commit_ish type alias with TYPE_CHECKING for proper deprecation handling
git/util.py Adds type ignores for IterableList, fixes isinstance check logic, and improves error messages
git/repo/fun.py Removes unnecessary cast from ref.commit
git/repo/base.py Simplifies config reader comprehension and adds type ignores for progress argument
git/refs/tag.py Moves type ignore comments to property decorator line for better clarity
git/refs/symbolic.py Replaces explicit type annotation with cast for instance variable
git/refs/log.py Adds type ignore for RefLogEntry tuple construction
git/refs/head.py Removes duplicate commit type annotation and adds type ignore for delete override
git/objects/submodule/base.py Adds RemoteReference cast for tracking_branch() result and imports RemoteReference
git/objects/commit.py Adds str() cast for message in regex to handle bytes type
git/index/typ.py Adds type ignore comments for IndexEntry tuple construction
git/diff.py Adds type annotation for change_type class variable with noqa comment
git/config.py Updates format string to f-string, removes unnecessary cast and comment, and uses cp._SectionName type
Comments suppressed due to low confidence (1)

git/util.py:1210

  • This method raises ValueError - should raise a LookupError (KeyError or IndexError) instead.
    This method raises AttributeError - should raise a LookupError (KeyError or IndexError) instead.
    def __getitem__(self, index: Union[SupportsIndex, int, slice, str]) -> T_IterableObj:  # type: ignore[override]

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread git/diff.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread git/config.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread git/objects/submodule/base.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Byron
Byron reviewed Nov 29, 2025
View reviewed changes

@Byron Byron left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for making this happen!

Apologies for unleashing AI as well, but I think it can be helpful given that I don't really know python anymore, and am quite clueless 😅.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread .github/workflows/pythonpackage.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread git/util.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

George-Ogden added 2 commits November 29, 2025 11:49
@George-Ogden
Remve comment about skipping mypy
b5c834a
@George-Ogden
Use cast to allow silent getattrs
eb15123
Byron
Byron approved these changes Nov 29, 2025
View reviewed changes

@Byron Byron left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, let's do it then!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Byron
Byron merged commit 0fcf291 into gitpython-developers:main Nov 29, 2025
27 checks passed

Uh oh!

There was an error while loading. Please reload this page.

EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request Oct 25, 2026
@EliahKagan @claude
ci: remove dead Python 3.8 condition from the mypy step
a938d65
The `Check types with mypy` step in the `test` job of
`pythonpackage.yml` ran only `if: matrix.python-version != '3.8'`.
That condition was added in gitpython-developers#2087, alongside a `python_version >= "3.9"`
marker on mypy in `test-requirements.txt`. Since mypy was not
installed on older Pythons, the step had to be skipped there. (The
same pull request also pinned mypy to 1.18.2, which itself requires
Python 3.9 or later.) The condition originally excluded 3.7 as well,
and that part was removed along with 3.7 support.

Since Python 3.8 through 3.10 were moved out of the `test` job's
matrix into the `install/import` job, which does not run mypy, the
`test` job runs only on 3.11 through 3.15t. No row of its matrix, and
no `include` entry, uses 3.8, so the condition is always true. It
suggested that the job still covers 3.8 and did nothing else.

Remove it. The step runs in exactly the same jobs as before.

The `python_version >= "3.9"` marker on the mypy requirement is left
as it is. It is packaging metadata for the `test` extra, not CI
configuration.

`actionlint` reports no problems, and zizmor 1.31.1 at the `pedantic`
level reports no new findings.

Co-authored-by: Claude Opus 5.5 <[email protected]>
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request Oct 25, 2026
@EliahKagan @claude
build(tox): let a mypy failure fail the tox run
8dab43e
The tox `mypy` environment has `ignore_outcome = true`, so a failure
there is reported but does not fail the run. 4bea7cf (gitpython-developers#1667) added
that to match CI, where the mypy step had `continue-on-error: true`
because GitPython was not expected to pass mypy at the time. But
50762f1 (gitpython-developers#2087) removed `continue-on-error` from that step, so a mypy
failure has failed CI since then, and mypy passes there on every
Python version the `test` job covers. The tox environment was never
updated to match.

Now that tox also runs in the weekly `tox` workflow, this matters
more: as things were, that workflow could not fail because of the
`mypy` environment, even if the environment could not be set up at
all.

Remove `ignore_outcome`, so `mypy` failures fail tox as they fail CI.

The `mypy` environment passed, with `ignore_outcome` false, on each of
Python 3.9.6, 3.10.22, and 3.13.17, selected with
`-x tool.tox.env.mypy.base_python=py39` and so on ("Success: no
issues found in 40 source files"). 3.9 and 3.10 are in its
`base_python` list, though CI only type-checks on 3.11 and later.

Co-authored-by: Claude Opus 5.5 <[email protected]>
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request Oct 29, 2026
@EliahKagan @claude
build(tox): let a mypy failure fail the tox run
4e1170e
The tox `mypy` environment has `ignore_outcome = true`, so a failure
there is reported but does not fail the run. 4bea7cf (gitpython-developers#1667) added
that to match CI, where the mypy step had `continue-on-error: true`
because GitPython was not expected to pass mypy at the time. But
50762f1 (gitpython-developers#2087) removed `continue-on-error` from that step, so a mypy
failure has failed CI since then, and mypy passes there on every
Python version the `test` job covers. The tox environment was never
updated to match.

Now that tox also runs in the weekly `tox` workflow, this matters
more: as things were, that workflow could not fail because of the
`mypy` environment, even if the environment could not be set up at
all.

Remove `ignore_outcome`, so `mypy` failures fail tox as they fail CI.

The `mypy` environment passed, with `ignore_outcome` false, on each of
Python 3.9.6, 3.10.22, and 3.13.17, selected with
`-x tool.tox.env.mypy.base_python=py39` and so on ("Success: no
issues found in 40 source files"). 3.9 and 3.10 are in its
`base_python` list, though CI only type-checks on 3.11 and later.

Co-authored-by: Claude Opus 5.5 <[email protected]>
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request Oct 29, 2026
@EliahKagan @claude
build(tox): let a mypy failure fail the tox run
1bb2119
The tox `mypy` environment has `ignore_outcome = true`, so a failure
there is reported but does not fail the run. 4bea7cf (gitpython-developers#1667) added
that to match CI, where the mypy step had `continue-on-error: true`
because GitPython was not expected to pass mypy at the time. But
50762f1 (gitpython-developers#2087) removed `continue-on-error` from that step, so a mypy
failure has failed CI since then, and mypy passes there on every
Python version the `test` job covers. The tox environment was never
updated to match.

Now that tox also runs in the weekly `tox` workflow, this matters
more: as things were, that workflow could not fail because of the
`mypy` environment, even if the environment could not be set up at
all.

Remove `ignore_outcome`, so `mypy` failures fail tox as they fail CI.

The `mypy` environment passed, with `ignore_outcome` false, on each of
Python 3.9.6, 3.10.22, and 3.13.17, selected with
`-x tool.tox.env.mypy.base_python=py39` and so on ("Success: no
issues found in 40 source files"). 3.9 and 3.10 are in its
`base_python` list, though CI only type-checks on 3.11 and later.

Co-authored-by: Claude Opus 5.5 <[email protected]>
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request Oct 29, 2026
@EliahKagan @claude
build(tox): let a mypy failure fail the tox run
f250b35
The tox `mypy` environment has `ignore_outcome = true`, so a failure
there is reported but does not fail the run. 4bea7cf (gitpython-developers#1667) added
that to match CI, where the mypy step had `continue-on-error: true`
because GitPython was not expected to pass mypy at the time. But
50762f1 (gitpython-developers#2087) removed `continue-on-error` from that step, so a mypy
failure has failed CI since then, and mypy passes there on every
Python version the `test` job covers. The tox environment was never
updated to match.

Now that tox also runs in the weekly `tox` workflow, this matters
more: as things were, that workflow could not fail because of the
`mypy` environment, even if the environment could not be set up at
all.

Remove `ignore_outcome`, so `mypy` failures fail tox as they fail CI.

The `mypy` environment passed, with `ignore_outcome` false, on each of
Python 3.9.6, 3.10.22, and 3.13.17, selected with
`-x tool.tox.env.mypy.base_python=py39` and so on ("Success: no
issues found in 40 source files"). 3.9 and 3.10 are in its
`base_python` list, though CI only type-checks on 3.11 and later.

Co-authored-by: Claude Opus 5.5 <[email protected]>
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request Oct 29, 2026
@EliahKagan @claude
build(tox): let a mypy failure fail the tox run
d9c4a48
The tox `mypy` environment has `ignore_outcome = true`, so a failure
there is reported but does not fail the run. 4bea7cf (gitpython-developers#1667) added
that to match CI, where the mypy step had `continue-on-error: true`
because GitPython was not expected to pass mypy at the time. But
50762f1 (gitpython-developers#2087) removed `continue-on-error` from that step, so a mypy
failure has failed CI since then, and mypy passes there on every
Python version the `test` job covers. The tox environment was never
updated to match.

Now that tox also runs in the weekly `tox` workflow, this matters
more: as things were, that workflow could not fail because of the
`mypy` environment, even if the environment could not be set up at
all. In a minimal project with tox 4.22.0 and 4.67.1, an environment
with `ignore_outcome = true` and a dependency that cannot be installed
let tox exit with status 0; without `ignore_outcome`, the same
environment made tox exit with status 1.

Remove `ignore_outcome`, so `mypy` failures fail tox as they fail CI.

The `mypy` environment passed, with `ignore_outcome` false, on each of
Python 3.9.6, 3.10.22, and 3.13.17, selected with
`-x tool.tox.env.mypy.base_python=py39` and so on ("Success: no
issues found in 40 source files"). 3.9 and 3.10 are in its
`base_python` list, though CI only type-checks on 3.11 and later.

Co-authored-by: Claude Opus 5.5 <[email protected]>
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request Oct 29, 2026
@EliahKagan @claude
build(tox): let a mypy failure fail the tox run
0d6a37a
The tox `mypy` environment has `ignore_outcome = true`, so a failure
there is reported but does not fail the run. 4bea7cf (gitpython-developers#1667) added
that to match CI, where the mypy step had `continue-on-error: true`
because GitPython was not expected to pass mypy at the time. But
50762f1 (gitpython-developers#2087) removed `continue-on-error` from that step, so a mypy
failure has failed CI since then, and mypy passes there on every
Python version the `test` job covers. The tox environment was never
updated to match.

Now that tox also runs in the weekly `tox` workflow, this matters
more: as things were, that workflow could not fail because of the
`mypy` environment, even if the environment could not be set up at
all. In a minimal project with tox 4.22.0 and 4.67.1, an environment
with `ignore_outcome = true` and a dependency that cannot be installed
let tox exit with status 0; without `ignore_outcome`, the same
environment made tox exit with status 1.

Remove `ignore_outcome`, so `mypy` failures fail tox as they fail CI.

The `mypy` environment passed, with `ignore_outcome` false, on each of
Python 3.9.6, 3.10.22, and 3.13.17, selected with
`-x tool.tox.env.mypy.base_python=py39` and so on ("Success: no issues
found in 40 source files"). 3.9 and 3.10 are in its `base_python` list,
though CI only type-checks on 3.11 and later.

Co-authored-by: Claude Opus 5.5 <[email protected]>
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request Oct 29, 2026
@EliahKagan @claude
build(tox): let a mypy failure fail the tox run
c4d6c98
The tox `mypy` environment has `ignore_outcome = true`, so a failure
there is reported but does not fail the run. 4bea7cf (gitpython-developers#1667) added
that to match CI, where the mypy step had `continue-on-error: true`
because GitPython was not expected to pass mypy at the time. But
50762f1 (gitpython-developers#2087) removed `continue-on-error` from that step, so a mypy
failure has failed CI since then, and mypy passes there on every
Python version the `test` job covers. The tox environment was never
updated to match.

Now that tox also runs in the weekly `tox` workflow, this matters
more: as things were, that workflow could not fail because of the
`mypy` environment, even if the environment could not be set up at
all. In a minimal project with tox 4.22.0 and 4.67.1, an environment
with `ignore_outcome = true` and a dependency that cannot be installed
let tox exit with status 0; without `ignore_outcome`, the same
environment made tox exit with status 1.

Remove `ignore_outcome`, so `mypy` failures fail tox as they fail CI.

The `mypy` environment passed, with `ignore_outcome` false, on each of
Python 3.9.6, 3.10.22, and 3.13.17, selected with
`-x tool.tox.env.mypy.base_python=py39` and so on ("Success: no issues
found in 40 source files"). 3.9 and 3.10 are in its `base_python` list,
though CI only type-checks on 3.11 and later.

Co-authored-by: Claude Opus 5.5 <[email protected]>
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request Oct 29, 2026
@EliahKagan @claude
build(tox): let a mypy failure fail the tox run
17d7d2b
The tox `mypy` environment has `ignore_outcome = true`, so a failure
there is reported but does not fail the run. 4bea7cf (gitpython-developers#1667) added
that to match CI, where the mypy step had `continue-on-error: true`
because GitPython was not expected to pass mypy at the time. But
50762f1 (gitpython-developers#2087) removed `continue-on-error` from that step, so a mypy
failure has failed CI since then, and mypy passes there on every
Python version the `test` job covers. The tox environment was never
updated to match.

Now that tox also runs in the weekly `tox` workflow, this matters
more: as things were, that workflow could not fail because of the
`mypy` environment, even if the environment could not be set up at
all. In a minimal project with tox 4.22.0 and 4.67.1, an environment
with `ignore_outcome = true` and a dependency that cannot be installed
let tox exit with status 0; without `ignore_outcome`, the same
environment made tox exit with status 1.

Remove `ignore_outcome`, so `mypy` failures fail tox as they fail CI.

The `mypy` environment passed, with `ignore_outcome` false, on each of
Python 3.9.6, 3.10.22, and 3.13.17, selected with
`-x tool.tox.env.mypy.base_python=py39` and so on ("Success: no issues
found in 40 source files"). 3.9 and 3.10 are in its `base_python` list,
though CI only type-checks on 3.11 and later.

Co-authored-by: Claude Opus 5.5 <[email protected]>
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request Oct 29, 2026
@EliahKagan @claude
build(tox): let a mypy failure fail the tox run
ae11f49
The tox `mypy` environment has `ignore_outcome = true`, so a failure
there is reported but does not fail the run. 4bea7cf (gitpython-developers#1667) added
that to match CI, where the mypy step had `continue-on-error: true`
because GitPython was not expected to pass mypy at the time. But
50762f1 (gitpython-developers#2087) removed `continue-on-error` from that step, so a mypy
failure has failed CI since then, and mypy passes there on every
Python version the `test` job covers. The tox environment was never
updated to match.

Now that tox also runs in the weekly `tox` workflow, this matters
more: as things were, that workflow could not fail because of the
`mypy` environment, even if the environment could not be set up at
all. In a minimal project with tox 4.22.0 and 4.67.1, an environment
with `ignore_outcome = true` and a dependency that cannot be installed
let tox exit with status 0; without `ignore_outcome`, the same
environment made tox exit with status 1.

Remove `ignore_outcome`, so `mypy` failures fail tox as they fail CI.

The `mypy` environment passed, with `ignore_outcome` false, on each of
Python 3.9.6, 3.10.22, and 3.13.17, selected with
`-x tool.tox.env.mypy.base_python=py39` and so on ("Success: no issues
found in 40 source files"). 3.9 and 3.10 are in its `base_python` list,
though CI only type-checks on 3.11 and later.

Co-authored-by: Claude Opus 5.5 <[email protected]>
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request Oct 29, 2026
@EliahKagan @claude
build(tox): let a mypy failure fail the tox run
d453af4
The tox `mypy` environment has `ignore_outcome = true`, so a failure
there is reported but does not fail the run. 4bea7cf (gitpython-developers#1667) added
that to match CI, where the mypy step had `continue-on-error: true`
because GitPython was not expected to pass mypy at the time. But
50762f1 (gitpython-developers#2087) removed `continue-on-error` from that step, so a mypy
failure has failed CI since then, and mypy passes there on every
Python version the `test` job covers. The tox environment was never
updated to match.

Now that tox also runs in the weekly `tox` workflow, this matters
more: as things were, that workflow could not fail because of the
`mypy` environment, even if the environment could not be set up at
all. In a minimal project with tox 4.22.0 and 4.67.1, an environment
with `ignore_outcome = true` and a dependency that cannot be installed
let tox exit with status 0; without `ignore_outcome`, the same
environment made tox exit with status 1.

Remove `ignore_outcome`, so `mypy` failures fail tox as they fail CI.

The `mypy` environment passed, with `ignore_outcome` false, on each of
Python 3.9.6, 3.10.22, and 3.13.17, selected with
`-x tool.tox.env.mypy.base_python=py39` and so on ("Success: no issues
found in 40 source files"). 3.9 and 3.10 are in its `base_python` list,
though CI only type-checks on 3.11 and later.

Co-authored-by: Claude Opus 5.5 <[email protected]>
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request Oct 29, 2026
@EliahKagan @claude
build(tox): let a mypy failure fail the tox run
63763e7
The tox `mypy` environment has `ignore_outcome = true`, so a failure
there is reported but does not fail the run. 4bea7cf (gitpython-developers#1667) added
that to match CI, where the mypy step had `continue-on-error: true`
because GitPython was not expected to pass mypy at the time. But
50762f1 (gitpython-developers#2087) removed `continue-on-error` from that step, so a mypy
failure has failed CI since then, and mypy passes there on every
Python version the `test` job covers. The tox environment was never
updated to match.

Now that tox also runs in the weekly `tox` workflow, this matters
more: as things were, that workflow could not fail because of the
`mypy` environment, even if the environment could not be set up at
all. In a minimal project with tox 4.22.0 and 4.67.1, an environment
with `ignore_outcome = true` and a dependency that cannot be installed
let tox exit with status 0; without `ignore_outcome`, the same
environment made tox exit with status 1.

Remove `ignore_outcome`, so `mypy` failures fail tox as they fail CI.

The `mypy` environment passed, with `ignore_outcome` false, on each of
Python 3.9.6, 3.10.22, and 3.13.17, selected with
`-x tool.tox.env.mypy.base_python=py39` and so on ("Success: no issues
found in 40 source files"). 3.9 and 3.10 are in its `base_python` list,
though CI only type-checks on 3.11 and later.

Co-authored-by: Claude Opus 5.5 <[email protected]>
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request Oct 29, 2026
@EliahKagan @claude
build(tox): let a mypy failure fail the tox run
6439586
The tox `mypy` environment has `ignore_outcome = true`, so a failure
there is reported but does not fail the run. 4bea7cf (gitpython-developers#1667) added
that to match CI, where the mypy step had `continue-on-error: true`
because GitPython was not expected to pass mypy at the time. But
50762f1 (gitpython-developers#2087) removed `continue-on-error` from that step, so a mypy
failure has failed CI since then, and mypy passes there on every
Python version the `test` job covers. The tox environment was never
updated to match.

`ignore_outcome` also hides failures to set the environment up at
all. In a minimal project with tox 4.22.0 and 4.67.1, an environment
with `ignore_outcome = true` and a dependency that cannot be installed
let tox exit with status 0; without `ignore_outcome`, the same
environment made tox exit with status 1.

Remove `ignore_outcome`, so `mypy` failures fail tox as they fail CI.

With tox 4.67.1, the `mypy` environment now passes on Python 3.9.6
and 3.13.18, selected with `-x testenv:mypy.base_python=py39` and
`py313` ("Success: no issues found in 40 source files"). 3.9 is in its
`base_python` list, though CI only type-checks on 3.11 and later.

Co-authored-by: Claude Opus 5.5 <[email protected]>
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request Oct 30, 2026
@EliahKagan @claude
build(tox): let a mypy failure fail the tox run
24cdcef
The tox `mypy` environment has `ignore_outcome = true`, so a failure
there is reported but does not fail the run. 4bea7cf (gitpython-developers#1667) added
that to match CI, where the mypy step had `continue-on-error: true`
because GitPython was not expected to pass mypy at the time. But
50762f1 (gitpython-developers#2087) removed `continue-on-error` from that step, so a mypy
failure has failed CI since then, and mypy passes there on every
Python version the `test` job covers. The tox environment was never
updated to match.

`ignore_outcome` also hides failures to set the environment up at
all. In a minimal project with tox 4.22.0 and 4.67.1, an environment
with `ignore_outcome = true` and a dependency that cannot be installed
let tox exit with status 0; without `ignore_outcome`, the same
environment made tox exit with status 1.

Remove `ignore_outcome`, so `mypy` failures fail tox as they fail CI.

With tox 4.67.1, the `mypy` environment now passes on Python 3.9.6
and 3.13.18, selected with `-x testenv:mypy.base_python=py39` and
`py313` ("Success: no issues found in 40 source files"). 3.9 is in its
`base_python` list, though CI only type-checks on 3.11 and later.

Co-authored-by: Claude Opus 5.5 <[email protected]>
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request Oct 30, 2026
@EliahKagan @claude
build(tox): let a mypy failure fail the tox run
9e279a8
The tox `mypy` environment has `ignore_outcome = true`, so a failure
there is reported but does not fail the run. 4bea7cf (gitpython-developers#1667) added
that to match CI, where the mypy step had `continue-on-error: true`
because GitPython was not expected to pass mypy at the time. But
50762f1 (gitpython-developers#2087) removed `continue-on-error` from that step, so a mypy
failure has failed CI since then, and mypy passes there on every
Python version the `test` job covers. The tox environment was never
updated to match.

`ignore_outcome` also hides failures to set the environment up at
all. In a minimal project with tox 4.22.0 and 4.67.1, an environment
with `ignore_outcome = true` and a dependency that cannot be installed
let tox exit with status 0; without `ignore_outcome`, the same
environment made tox exit with status 1.

Remove `ignore_outcome`, so `mypy` failures fail tox as they fail CI.

With tox 4.67.1, the `mypy` environment now passes on Python 3.9.6
and 3.13.18, selected with `-x testenv:mypy.base_python=py39` and
`py313` ("Success: no issues found in 40 source files"). 3.9 is in its
`base_python` list, though CI only type-checks on 3.11 and later.

Co-authored-by: Claude Opus 5.5 <[email protected]>
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request Oct 30, 2026
@EliahKagan @claude
build(tox): let a mypy failure fail the tox run
9b764f4
The tox `mypy` environment has `ignore_outcome = true`, so a failure
there is reported but does not fail the run. 4bea7cf (gitpython-developers#1667) added
that to match CI, where the mypy step had `continue-on-error: true`
because GitPython was not expected to pass mypy at the time. But
50762f1 (gitpython-developers#2087) removed `continue-on-error` from that step, so a mypy
failure has failed CI since then, and mypy passes there on every
Python version the `test` job covers. The tox environment was never
updated to match.

`ignore_outcome` also hides failures to set the environment up at
all. In a minimal project with tox 4.22.0 and 4.67.1, an environment
with `ignore_outcome = true` and a dependency that cannot be installed
let tox exit with status 0; without `ignore_outcome`, the same
environment made tox exit with status 1.

Remove `ignore_outcome`, so `mypy` failures fail tox as they fail CI.

With tox 4.67.1, the `mypy` environment now passes on Python 3.9.6
and 3.13.18, selected with `-x testenv:mypy.base_python=py39` and
`py313` ("Success: no issues found in 40 source files"). 3.9 is in its
`base_python` list, though CI only type-checks on 3.11 and later.

Co-authored-by: Claude Opus 5.5 <[email protected]>
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request Oct 31, 2026
@EliahKagan @claude
build(tox): let a mypy failure fail the tox run
9c7ba76
The tox `mypy` environment has `ignore_outcome = true`, so a failure
there is reported but does not fail the run. 4bea7cf (gitpython-developers#1667) added
that to match CI, where the mypy step had `continue-on-error: true`
because GitPython was not expected to pass mypy at the time. But
50762f1 (gitpython-developers#2087) removed `continue-on-error` from that step, so a mypy
failure has failed CI since then, and mypy passes there on every
Python version the `test` job covers. The tox environment was never
updated to match.

`ignore_outcome` also hides failures to set the environment up at
all. In a minimal project with tox 4.22.0 and 4.67.1, an environment
with `ignore_outcome = true` and a dependency that cannot be installed
let tox exit with status 0; without `ignore_outcome`, the same
environment made tox exit with status 1.

Remove `ignore_outcome`, so `mypy` failures fail tox as they fail CI.

With tox 4.67.1, the `mypy` environment now passes on Python 3.9.6
and 3.13.18, selected with `-x testenv:mypy.base_python=py39` and
`py313` ("Success: no issues found in 40 source files"). 3.9 is in its
`base_python` list, though CI only type-checks on 3.11 and later.

Co-authored-by: Claude Opus 5.5 <[email protected]>
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request Oct 31, 2026
@EliahKagan @claude
build(tox): let a mypy failure fail the tox run
967247a
The tox `mypy` environment has `ignore_outcome = true`, so a failure
there is reported but does not fail the run. 4bea7cf (gitpython-developers#1667) added
that to match CI, where the mypy step had `continue-on-error: true`
because GitPython was not expected to pass mypy at the time. But
50762f1 (gitpython-developers#2087) removed `continue-on-error` from that step, so a mypy
failure has failed CI since then, and mypy passes there on every
Python version the `test` job covers. The tox environment was never
updated to match.

`ignore_outcome` also hides failures to set the environment up at
all. In a minimal project with tox 4.22.0 and 4.67.1, an environment
with `ignore_outcome = true` and a dependency that cannot be installed
let tox exit with status 0; without `ignore_outcome`, the same
environment made tox exit with status 1.

Remove `ignore_outcome`, so `mypy` failures fail tox as they fail CI.

With tox 4.67.1, the `mypy` environment now passes on Python 3.9.6
and 3.13.18, selected with `-x testenv:mypy.base_python=py39` and
`py313` ("Success: no issues found in 40 source files"). 3.9 is in its
`base_python` list, though CI only type-checks on 3.11 and later.

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@Byron Byron Byron approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@George-Ogden @Byron
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.