mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 22:09:38 +07:00
PY-21883: PR remarks. Show elements from 'Other Parameters' inside 'Parameters' section in Numpy docstrings
Removed redundant keyword arguments in parameters section, cosmetics. GitOrigin-RevId: 213132671cc844eb31a168c4e8a17af169d1aac2
This commit is contained in:
committed by
intellij-monorepo-bot
parent
680913f146
commit
2c35b284f9
@@ -368,7 +368,6 @@ public abstract class SectionBasedDocString extends DocStringLineParser implemen
|
||||
final List<Section> parameters = new ArrayList<>();
|
||||
parameters.addAll(getSectionsWithNormalizedTitle(PARAMETERS_SECTION));
|
||||
parameters.addAll(getSectionsWithNormalizedTitle(OTHER_PARAMETERS_SECTION));
|
||||
parameters.addAll(getSectionsWithNormalizedTitle(KEYWORD_ARGUMENTS_SECTION));
|
||||
return parameters;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
def func(param1):
|
||||
"""
|
||||
Args:
|
||||
x:
|
||||
y:
|
||||
|
||||
Keyword Args:
|
||||
z:
|
||||
"""
|
||||
pass
|
||||
@@ -1,4 +1,4 @@
|
||||
def func(param1):
|
||||
def func(x, y, z):
|
||||
"""
|
||||
Parameters
|
||||
----------
|
||||
@@ -235,11 +235,10 @@ public class PySectionBasedDocStringTest extends PyTestCase {
|
||||
"Line after single break", param1.getDescription());
|
||||
}
|
||||
|
||||
public void testNumpyCombinesParameterSections() {
|
||||
// PY-21883
|
||||
public void testNumpyCombinesParamsAndOtherParamsSections() {
|
||||
final NumpyDocString docString = findAndParseNumpyStyleDocString();
|
||||
|
||||
final List<String> parameters = docString.getParameters();
|
||||
|
||||
assertEquals(List.of("x", "y", "z"), parameters);
|
||||
}
|
||||
|
||||
@@ -428,14 +427,6 @@ public class PySectionBasedDocStringTest extends PyTestCase {
|
||||
assertEquals("return value description", docString.getReturnDescription());
|
||||
}
|
||||
|
||||
public void testGoogleCombinesParameterSections() {
|
||||
final GoogleCodeStyleDocString docString = findAndParseGoogleStyleDocString();
|
||||
|
||||
final List<String> parameters = docString.getParameters();
|
||||
|
||||
assertEquals(List.of("x", "y", "z"), parameters);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getTestDataPath() {
|
||||
return super.getTestDataPath() + "/docstrings";
|
||||
|
||||
Reference in New Issue
Block a user