Skip to content

Fix scope regex pattern and exit NameError#48

Open
desmondwong1215 wants to merge 2 commits intogit-mastery:mainfrom
desmondwong1215:fix/scope-regex-pattern
Open

Fix scope regex pattern and exit NameError#48
desmondwong1215 wants to merge 2 commits intogit-mastery:mainfrom
desmondwong1215:fix/scope-regex-pattern

Conversation

@desmondwong1215
Copy link

Currently, this regex pattern only matches scopes that are wrapped in single quotes. But there are no single quotes in the older version.
I have modified the regex pattern to make it more flexible, allowing us to parse the scope correctly for all versions.

'NameError' is raised when the process is terminated due to errors. exit() built-in is only available in interactive Python sessions, not in scripts.
I have changed exit() to' sys.exit()`, so that the process will be terminated more cleanly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant