mirror of https://github.com/Textualize/rich.git
magick mock
This commit is contained in:
parent
cfcd74dc00
commit
aaa99b7c2c
|
@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
- Fixed panel cropping when shrunk too bar
|
- Fixed panel cropping when shrunk too bar
|
||||||
- Allow passing markdown over STDIN when using `python -m rich.markdown`
|
- Allow passing markdown over STDIN when using `python -m rich.markdown`
|
||||||
|
- Fix printing MagicMock.mock_calls https://github.com/willmcgugan/rich/issues/903
|
||||||
|
|
||||||
## [9.7.0] - 2021-01-09
|
## [9.7.0] - 2021-01-09
|
||||||
|
|
||||||
|
|
|
@ -1058,7 +1058,9 @@ class Console:
|
||||||
for renderable in objects:
|
for renderable in objects:
|
||||||
# I promise this is sane
|
# I promise this is sane
|
||||||
# This detects an object which claims to have all attributes, such as MagicMock.mock_calls
|
# This detects an object which claims to have all attributes, such as MagicMock.mock_calls
|
||||||
if hasattr(renderable, "jwevpw_eors4dfo6mwo345ermk7kdnfnwerwer"):
|
if hasattr(
|
||||||
|
renderable, "jwevpw_eors4dfo6mwo345ermk7kdnfnwerwer"
|
||||||
|
): # pragma: no cover
|
||||||
renderable = repr(renderable)
|
renderable = repr(renderable)
|
||||||
rich_cast = getattr(renderable, "__rich__", None)
|
rich_cast = getattr(renderable, "__rich__", None)
|
||||||
if rich_cast:
|
if rich_cast:
|
||||||
|
|
Loading…
Reference in New Issue