-
-
Notifications
You must be signed in to change notification settings - Fork 288
First modification for pep237 with pydocstringformatter #1792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Pull Request Test Coverage Report for Build 3082403333
💛 - Coveralls |
astroid/inference.py
Outdated
@@ -971,7 +972,8 @@ def _do_compare( | |||
) -> bool | type[util.Uninferable]: | |||
""" | |||
If all possible combinations are either True or False, return that: | |||
>>> _do_compare([1, 2], '<=', [3, 4]) | |||
>>> _do_compare([1, 2], '<=', [3, 4]). |
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.
It will be fixed in DanielNoord/pydocstringformatter#168
@Pierre-Sassoulas Will you open issues about stuff that is broken? |
Yes, if you think it's necessary : #1792 (comment) for example would be hard to fix imo ? I think the only clear cut one would be : #1792 (comment) (only typing information without text) |
DanielNoord/pydocstringformatter#127
I think this can also be fixed. We just need to wrap>split>period instead of split>wrap>period. Something to investigate at least! |
I created DanielNoord/pydocstringformatter#175 I think we can"t add pydocstringformatter right now, but we might want to integrate the change that make sense right now, what do you think ? |
Agreed! Is this reviewable? |
Not yet, I'll clean this up in the coming week |
186df95
to
90c4e43
Compare
This is reviewable now :) |
astroid/astroid_manager.py
Outdated
@@ -1,5 +1,7 @@ | |||
""" | |||
This file contain the global astroid MANAGER, to prevent circular import that happened | |||
This file contain the global astroid MANAGER, to prevent circular import that | |||
happened. |
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.
This sentence is now broken.
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.
I missed so much of those that I'll need to redo the commit entirely. I'll get to it. There's a lot of change to review.
astroid/brain/brain_hypothesis.py
Outdated
@@ -39,7 +38,8 @@ def is_decorated_with_st_composite(node): | |||
|
|||
def remove_draw_parameter_from_composite_strategy(node): | |||
"""Given that the FunctionDef is decorated with @st.composite, remove the | |||
first argument (`draw`) - it's always supplied by Hypothesis so we don't | |||
first argument (`draw`) - it's always supplied by Hypothesis so we don't. |
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.
This is broken.
astroid/exceptions.py
Outdated
"""Raised when a call to node.statement() does not return a node. This is because | ||
"""Raised when a call to node.statement() does not return a node. | ||
|
||
This is because |
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.
L406 should probably be appended here.
astroid/manager.py
Outdated
possible by providing a class responsible to get astroid representation | ||
"""Astroid manager: avoid multiple astroid build of a same module when | ||
possible by providing a class responsible to get astroid representation. | ||
|
||
from various source and using a cache of built modules) |
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.
This is broken. Also note there is a single )
without a (
astroid/nodes/as_string.py
Outdated
if self._should_wrap(node, child, is_left): | ||
return f"({child.accept(self)})" | ||
|
||
return child.accept(self) | ||
|
||
def _should_wrap(self, node, child, is_left): | ||
"""Wrap child if: | ||
- it has lower precedence | ||
- it has lower precedence. |
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.
This should probably be done differently.
astroid/nodes/node_classes.py
Outdated
"""Module for some node classes. More nodes in scoped_nodes.py""" | ||
"""Module for some node classes. | ||
|
||
More nodes in scoped_nodes.py |
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.
This is nog longer true. It is now a package.
astroid/nodes/scoped_nodes/mixin.py
Outdated
"""this class provides locals handling common to Module, FunctionDef | ||
and ClassDef nodes, including a dict like interface for direct access | ||
"""This class provides locals handling common to Module, FunctionDef | ||
and ClassDef nodes, including a dict like interface for direct access. |
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.
This is broken.
@@ -691,6 +692,7 @@ def __init__( | |||
): | |||
""" | |||
:param lineno: The line that this node appears on in the source code. | |||
|
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.
I think this breaks valid Sphinx documentation
astroid/raw_building.py
Outdated
"""build astroid from a living module (i.e. using inspect) | ||
this is used when there is no python source code available (either | ||
"""Build astroid from a living module (i.e. using inspect) | ||
this is used when there is no python source code available (either. |
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.
This is broken
Arg, and there's also conflicts now. Damn. |
90c4e43
to
45ed29b
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1792 +/- ##
=======================================
Coverage 92.63% 92.63%
=======================================
Files 94 94
Lines 10869 10869
=======================================
Hits 10069 10069
Misses 800 800
Flags with carried forward coverage won't be shown. Click here to find out more.
|
45ed29b
to
850fa7c
Compare
Description
Type of Changes
Related Issue
Some results are not correct, this is the occasion to make pydocstringformatter better and to add astroid to its primer. We will handle the incorrect one in #1796