Commit 523eeb4
authored
Fix unexpected
* fix unexpected '__doc__' values
some '__doc__' fields of standard library
symbols (e.g. WrapperDescriptorType.__doc__) don't return a string,
they return a 'getset_descriptor'. Thus, an attempt to print "as
string" fails. The solution is to check that __doc__ is an instance
of str.
Note that it wasn't uncovered by the tests due to classes not being
attached to their parent in some cases. This is be done in one of
the subsequent commits.
it's a part of the campaign to get rid of non-module roots
* put the "temporary_class" for the metaclass hack into adhoc module
it's a part of the campaign to get rid of non-module roots__doc__ values (pylint-dev#2556)1 parent e442776 commit 523eeb4
File tree
3 files changed
+18
-10
lines changed- astroid
- nodes
- scoped_nodes
3 files changed
+18
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2061 | 2061 | | |
2062 | 2062 | | |
2063 | 2063 | | |
2064 | | - | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
2065 | 2074 | | |
2066 | 2075 | | |
2067 | 2076 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1624 | 1624 | | |
1625 | 1625 | | |
1626 | 1626 | | |
1627 | | - | |
| 1627 | + | |
1628 | 1628 | | |
1629 | 1629 | | |
1630 | 1630 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
319 | | - | |
| 320 | + | |
320 | 321 | | |
321 | 322 | | |
322 | 323 | | |
| |||
357 | 358 | | |
358 | 359 | | |
359 | 360 | | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
| 361 | + | |
| 362 | + | |
365 | 363 | | |
366 | 364 | | |
367 | 365 | | |
| |||
718 | 716 | | |
719 | 717 | | |
720 | 718 | | |
| 719 | + | |
721 | 720 | | |
722 | 721 | | |
723 | 722 | | |
724 | 723 | | |
725 | | - | |
| 724 | + | |
726 | 725 | | |
727 | 726 | | |
728 | 727 | | |
| |||
0 commit comments