Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove captcha on examples #103

Merged
merged 2 commits into from
May 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions examples/updateTranslationJob.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,11 @@
debug=True
)

# Update a job that has an id of 42, and reject it, cite the reason,
# add a comment, and throw up some captcha stuff. See the docs for
# Update a job that has an id of 42, and reject it, cite the reason
# and add a comment. See the docs for
ryvasquez marked this conversation as resolved.
Show resolved Hide resolved
# more information pertaining to this method, it can do quite a bit. :)
print(gengo.updateTranslationJob(id=42, action={
'action': 'reject',
'reason': 'quality',
'comment': 'My grandmother does better.',
'captcha': 'bert'
}))
2 changes: 0 additions & 2 deletions examples/updateTranslationJobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,10 @@
'job_id': 630,
'reason': 'quality',
'comment': 'This sentence should be in the past tense',
'captcha': 'AAAA'
}, {
'job_id': 631,
'reason': 'quality',
'comment': 'This should have be capitalized',
'captcha': 'BBBB'
}],
})

Expand Down
2 changes: 1 addition & 1 deletion gengo/gengo.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def get(self, **kwargs):
# NOTE: We pop() here because we don't want the extra data
# included and messing up our hash down the road.
base = re.sub(
'\{\{(?P<m>[a-zA-Z_]+)\}\}',
r'\{\{(?P<m>[a-zA-Z_]+)\}\}',
lambda m: '{0}'.format(kwargs.pop(m.group(1),
# In case of debugging needs
'no_argument_specified')),
Expand Down