Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork961
Commitc8e4aa0
committed
Refactor quote parsing, to prepare for more checks
This refactors ConfigParser double-quote parsing near the singleline double-quoted value parsing code, so that:- Code that parses the name is less intermixed with code that parses the value.- Conditional logic is less duplicated.- The `END` comment notation appears next to the code it describes.- The final `else` can be turned into one or more `elif` followed by `else` to cover different cases of `"..."` differently. (But those are not added here. This commit is purely a refactoring.)(The `pass` suite when `len(optval) < 2 or optval[0] != '"'` isawkward and not really justified right now, but it looks like itmay be able to help with readabilty and help keep nesting downwhen new `elif` cases are added.)1 parent646dc16 commitc8e4aa0
1 file changed
+9
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
| 499 | + | |
| 500 | + | |
499 | 501 | | |
500 | 502 | | |
501 | 503 | | |
502 | 504 | | |
503 | 505 | | |
504 | | - | |
505 | | - | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
506 | 510 | | |
507 | 511 | | |
508 | | - | |
509 | | - | |
510 | 512 | | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
511 | 516 | | |
512 | 517 | | |
513 | 518 | | |
| |||
0 commit comments
Comments
(0)