-
-
Notifications
You must be signed in to change notification settings - Fork 292
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Python parser gets stuck in string state if it sees '' or ""
To Reproduce
Create tmp.py with this content and run scc tmp.py
a = ''
# comment
for i in range(10):
print(i)
Expected behavior
This is the (wrong) output
───────────────────────────────────────────────────────────────────────────────
Language Files Lines Blanks Comments Code Complexity
───────────────────────────────────────────────────────────────────────────────
Python 1 6 0 0 6 0
───────────────────────────────────────────────────────────────────────────────
Total 1 6 0 0 6 0
───────────────────────────────────────────────────────────────────────────────
You get this if you change '' to str()
───────────────────────────────────────────────────────────────────────────────
Language Files Lines Blanks Comments Code Complexity
───────────────────────────────────────────────────────────────────────────────
Python 1 6 2 1 3 1
───────────────────────────────────────────────────────────────────────────────
Total 1 6 2 1 3 1
───────────────────────────────────────────────────────────────────────────────
Desktop (please complete the following information):
Mac OS, tried version in brew and master
eraofballoon, boyter, AH-Merii and FelixFourcolor
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working