File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ files = ["git/", "test/deprecation/"]
2525disallow_untyped_defs = true
2626no_implicit_optional = true
2727warn_redundant_casts = true
28- warn_unused_ignores = true
28+ warn_unused_ignores = true # Useful in general, but especially in test/deprecation.
2929warn_unreachable = true
3030implicit_reexport = true
3131# strict = true
Original file line number Diff line number Diff line change 11# This module is part of GitPython and is released under the
22# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
3+
4+ """Tests of deprecation warnings and possible related attribute bugs.
5+
6+ Most deprecation warnings are "basic" in the sense that there is no special complexity
7+ to consider, in introducing them. However, to issue deprecation warnings on mere
8+ attribute access can involve adding new dynamic behavior. This can lead to subtle bugs
9+ or less useful dynamic metadata. It can also weaken static typing, as happens if a type
10+ checker sees a method like ``__getattr__`` in a module or class whose attributes it did
11+ not already judge to be dynamic. This test.deprecation submodule covers all three cases:
12+ the basic cases, subtle dynamic behavior, and subtle static type checking issues.
13+
14+ Static type checking is "tested" by a combination of code that should not be treated as
15+ a type error but would be in the presence of particular bugs, and code that *should* be
16+ treated as a type error and is accordingly marked ``# type: ignore[REASON]`` (for
17+ specific ``REASON``. The latter will only produce mypy errors when the expectation is
18+ not met if it is configured with ``warn_unused_ignores = true``.
19+ """
Original file line number Diff line number Diff line change 11# This module is part of GitPython and is released under the
22# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
33
4- """Tests for static and dynamic characteristics of Git class and instance attributes.
4+ """Tests for dynamic and static characteristics of Git class and instance attributes.
55
66Currently this all relates to the deprecated :attr:`Git.USE_SHELL` class attribute,
77which can also be accessed through instances. Some tests directly verify its behavior,
You can’t perform that action at this time.
0 commit comments