"""A collection of python stylers"""

import re


def sentencecase(string):
    """returns a string in sentencecase but with text in braces preserved

    parameters
    ----------
    string
        The string
    :returns
        The string in sentence-case (but preserving any text wrapped in braces
    """
    freezecaps = re.findall("\{[^{}]+\}", string)
    datalow = string.capitalize()
    sentencecase = re.split("\{[^{}]+\}", datalow)
    title = ''
    freezecaps.reverse()
    for word in sentencecase:
        if len(freezecaps) > 0:
            title = title + word + freezecaps.pop()
        else:
            title = title + word
    return title

@@ -61,21 +61,23 @@
 cecase(s
-tring
+entence
 ):%0A    %22
@@ -89,21 +89,23 @@
 urns a s
-tring
+entence
  in sent
@@ -152,17 +152,17 @@
 ed%0A%0A    
-p
+P
 arameter
@@ -183,21 +183,28 @@
 --%0A    s
-tring
+entence: str
 %0A       
@@ -213,20 +213,30 @@
 he s
-tring%0A    :r
+entence%0A        %0A    R
 etur
@@ -244,24 +244,38 @@
 s%0A  
+  -------%0A
       
+  
 The s
-tring
+entence
  in 
@@ -330,16 +330,17 @@
 n braces
+)
 %0A    %22%22%22
@@ -383,21 +383,23 @@
 %5D+%5C%7D%22, s
-tring
+entence
 )%0A    da
@@ -411,13 +411,15 @@
  = s
-tring
+entence
 .cap

change string to sentence for variable name and docstring in numpy mode