FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
GitPython/test/deprecation/__init__.py at main · gitpython-developers/GitPython · GitHub
gitpython-developers
GitPython
Repository navigation
Code
Issues
6
(6)
Pull requests
3
(3)
Discussions
Actions
Security and quality
41
(41)
Insights
Expand file tree
Breadcrumbs
GitPython
/
test
/
deprecation
/
__init__.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
19 lines (16 loc) · 1.19 KB
Breadcrumbs
GitPython
/
test
/
deprecation
/
__init__.py
Copy path
File metadata and controls
19 lines (16 loc) · 1.19 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
"""Tests of deprecation warnings and possible related attribute bugs.
Most deprecation warnings are "basic" in the sense that there is no special complexity
to consider, in introducing them. However, to issue deprecation warnings on mere
attribute access can involve adding new dynamic behavior. This can lead to subtle bugs
or less useful dynamic metadata. It can also weaken static typing, as happens if a type
checker sees a method like ``__getattr__`` in a module or class whose attributes it did
not already judge to be dynamic. This test.deprecation submodule covers all three cases:
the basic cases, subtle dynamic behavior, and subtle static type checking issues.
Static type checking is "tested" by a combination of code that should not be treated as
a type error but would be in the presence of particular bugs, and code that *should* be
treated as a type error and is accordingly marked ``# type: ignore[REASON]`` (for
specific ``REASON``. The latter will only produce mypy errors when the expectation is
not met if it is configured with ``warn_unused_ignores = true``.
"""
Back
|
FazBrowse Home
|
New Git URL