PY-17002 Suggest types inside unclosed parentheses in Google docstrings
[idea/community.git] / python / src / com / jetbrains / python / documentation / docstrings / GoogleCodeStyleDocString.java
index 1cb57a177cd0be6f4536a92a25c224688c743324..f2c9b50e01ddfa9d9f8bafc311916ec3c870d769 100644 (file)
@@ -31,7 +31,7 @@ import java.util.regex.Pattern;
  */
 public class GoogleCodeStyleDocString extends SectionBasedDocString {
   public static final Pattern SECTION_HEADER = Pattern.compile("^[ \t]*([\\w \t]+):[ \t]*$", Pattern.MULTILINE);
-  private static final Pattern FIELD_NAME_AND_TYPE = Pattern.compile("^[ \t]*(.+?)[ \t]*\\([ \t]*(.*?)[ \t]*\\)[ \t]*$", Pattern.MULTILINE);
+  private static final Pattern FIELD_NAME_AND_TYPE = Pattern.compile("^[ \t]*(.+?)[ \t]*\\([ \t]*(.*?)[ \t]*\\)?[ \t]*$", Pattern.MULTILINE);
 
   public GoogleCodeStyleDocString(@NotNull Substring text) {
     super(text);