holger krekel avatar holger krekel committed b32b529

Changes between 1.4.12 and 1.4.13.dev
==================================================

iniconfig: allow "name:value" settings in config files, no space after
"name" required

Comments (0)

Files changed (3)

+Changes between 1.4.12 and 1.4.13.dev
+==================================================
+
+- iniconfig: allow "name:value" settings in config files, no space after
+  "name" required
+  
 Changes between 1.4.11 and 1.4.12
 ==================================================
 
         elif not line[0].isspace():
             try:
                 name, value = line.split('=', 1)
-                if ": " in name:
+                if ":" in name:
                     raise ValueError()
             except ValueError:
                 try:
-                    name, value = line.split(": ", 1)
+                    name, value = line.split(":", 1)
                 except ValueError:
                     self._raise(lineno, 'unexpected line: %r' % line)
             return name.strip(), value.strip()

testing/test_iniconfig.py

         [(0, None, 'value', 'x = 3')]
     ),
     'use of colon for name-values': (
-        'name: y=5',
-        [(0, None, 'name', 'y=5')]
+        'name: y',
+        [(0, None, 'name', 'y')]
     ),
     'use of colon without space': (
-        'value:xyz=5',
-        [(0, None, 'value:xyz', '5')]
+        'value:y=5',
+        [(0, None, 'value', 'y=5')]
     ),
     'equality gets precedence': (
         'value=xyz:5',
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.