mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
PY-21883: PR. Show elements from 'Other Parameters' inside 'Parameters' section in Numpy docstrings
closes https://github.com/JetBrains/intellij-community/pull/2051 GitOrigin-RevId: 2438d1c9fdf8d90fd2c046c8a9a55c07f6683778
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7e2482b363
commit
680913f146
@@ -235,6 +235,14 @@ public class PySectionBasedDocStringTest extends PyTestCase {
|
||||
"Line after single break", param1.getDescription());
|
||||
}
|
||||
|
||||
public void testNumpyCombinesParameterSections() {
|
||||
final NumpyDocString docString = findAndParseNumpyStyleDocString();
|
||||
|
||||
final List<String> parameters = docString.getParameters();
|
||||
|
||||
assertEquals(List.of("x", "y", "z"), parameters);
|
||||
}
|
||||
|
||||
public void testGoogleEmptyParamTypeInParenthesis() {
|
||||
final GoogleCodeStyleDocString docString = findAndParseGoogleStyleDocString();
|
||||
assertSize(1, docString.getSections());
|
||||
@@ -394,12 +402,11 @@ public class PySectionBasedDocStringTest extends PyTestCase {
|
||||
" Example:\n" +
|
||||
" addresses = field.Collection(AddressObject)\n" +
|
||||
"\"\"\""));
|
||||
|
||||
|
||||
assertEquals(DocStringFormat.REST, DocStringUtil.guessDocStringFormat("\"\"\"\n" +
|
||||
"Args:\n" +
|
||||
" :param Tuple[int, int] name: Some description\n" +
|
||||
"\"\"\""));
|
||||
|
||||
}
|
||||
|
||||
// PY-31025
|
||||
@@ -421,6 +428,14 @@ 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