{"action":"created","comment":{"url":"https://api.github.com/repos/kapouille/mongoquery/pulls/comments/63509758","id":63509758,"diff_hunk":"@@ -29,7 +29,10 @@ def _match(self, condition, entry):\n                 for sub_operator, sub_condition in condition.items()\n             )\n         else:\n-            if isinstance(entry, Sequence):\n+            # strings are a subtype of Sequence, thus checking first\n+            if isinstance(entry, string_type):\n+                return condition == entry\n+            elif isinstance(entry, Sequence):","path":"mongoquery/__init__.py","position":8,"original_position":8,"commit_id":"d5fc5e897d3e872a0f4fe0b37deb68c72b05aa4f","original_commit_id":"d5fc5e897d3e872a0f4fe0b37deb68c72b05aa4f","user":{"login":"foolswood","id":306638,"avatar_url":"https://avatars.githubusercontent.com/u/306638?v=3","gravatar_id":"","url":"https://api.github.com/users/foolswood","html_url":"https://github.com/foolswood","followers_url":"https://api.github.com/users/foolswood/followers","following_url":"https://api.github.com/users/foolswood/following{/other_user}","gists_url":"https://api.github.com/users/foolswood/gists{/gist_id}","starred_url":"https://api.github.com/users/foolswood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foolswood/subscriptions","organizations_url":"https://api.github.com/users/foolswood/orgs","repos_url":"https://api.github.com/users/foolswood/repos","events_url":"https://api.github.com/users/foolswood/events{/privacy}","received_events_url":"https://api.github.com/users/foolswood/received_events","type":"User","site_admin":false},"body":"It could be cast as a compound conditional (e.g. if isinstance(Sequence) and not isinstance(string_type)).","created_at":"2016-05-17T12:06:15Z","updated_at":"2016-05-17T12:06:15Z","html_url":"https://github.com/kapouille/mongoquery/pull/4#discussion_r63509758","pull_request_url":"https://api.github.com/repos/kapouille/mongoquery/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/kapouille/mongoquery/pulls/comments/63509758"},"html":{"href":"https://github.com/kapouille/mongoquery/pull/4#discussion_r63509758"},"pull_request":{"href":"https://api.github.com/repos/kapouille/mongoquery/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/kapouille/mongoquery/pulls/4","id":70343383,"html_url":"https://github.com/kapouille/mongoquery/pull/4","diff_url":"https://github.com/kapouille/mongoquery/pull/4.diff","patch_url":"https://github.com/kapouille/mongoquery/pull/4.patch","issue_url":"https://api.github.com/repos/kapouille/mongoquery/issues/4","number":4,"state":"open","locked":false,"title":"Handle checks against strings correctly","user":{"login":"rajcze","id":110312,"avatar_url":"https://avatars.githubusercontent.com/u/110312?v=3","gravatar_id":"","url":"https://api.github.com/users/rajcze","html_url":"https://github.com/rajcze","followers_url":"https://api.github.com/users/rajcze/followers","following_url":"https://api.github.com/users/rajcze/following{/other_user}","gists_url":"https://api.github.com/users/rajcze/gists{/gist_id}","starred_url":"https://api.github.com/users/rajcze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajcze/subscriptions","organizations_url":"https://api.github.com/users/rajcze/orgs","repos_url":"https://api.github.com/users/rajcze/repos","events_url":"https://api.github.com/users/rajcze/events{/privacy}","received_events_url":"https://api.github.com/users/rajcze/received_events","type":"User","site_admin":false},"body":"Fixes #3","created_at":"2016-05-17T11:51:11Z","updated_at":"2016-05-17T12:06:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f82d66dfe9d7ed1a2788aad8cc1f0f65715a8c6e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kapouille/mongoquery/pulls/4/commits","review_comments_url":"https://api.github.com/repos/kapouille/mongoquery/pulls/4/comments","review_comment_url":"https://api.github.com/repos/kapouille/mongoquery/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kapouille/mongoquery/issues/4/comments","statuses_url":"https://api.github.com/repos/kapouille/mongoquery/statuses/d5fc5e897d3e872a0f4fe0b37deb68c72b05aa4f","head":{"label":"rajcze:master","ref":"master","sha":"d5fc5e897d3e872a0f4fe0b37deb68c72b05aa4f","user":{"login":"rajcze","id":110312,"avatar_url":"https://avatars.githubusercontent.com/u/110312?v=3","gravatar_id":"","url":"https://api.github.com/users/rajcze","html_url":"https://github.com/rajcze","followers_url":"https://api.github.com/users/rajcze/followers","following_url":"https://api.github.com/users/rajcze/following{/other_user}","gists_url":"https://api.github.com/users/rajcze/gists{/gist_id}","starred_url":"https://api.github.com/users/rajcze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajcze/subscriptions","organizations_url":"https://api.github.com/users/rajcze/orgs","repos_url":"https://api.github.com/users/rajcze/repos","events_url":"https://api.github.com/users/rajcze/events{/privacy}","received_events_url":"https://api.github.com/users/rajcze/received_events","type":"User","site_admin":false},"repo":{"id":58939373,"name":"mongoquery","full_name":"rajcze/mongoquery","owner":{"login":"rajcze","id":110312,"avatar_url":"https://avatars.githubusercontent.com/u/110312?v=3","gravatar_id":"","url":"https://api.github.com/users/rajcze","html_url":"https://github.com/rajcze","followers_url":"https://api.github.com/users/rajcze/followers","following_url":"https://api.github.com/users/rajcze/following{/other_user}","gists_url":"https://api.github.com/users/rajcze/gists{/gist_id}","starred_url":"https://api.github.com/users/rajcze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajcze/subscriptions","organizations_url":"https://api.github.com/users/rajcze/orgs","repos_url":"https://api.github.com/users/rajcze/repos","events_url":"https://api.github.com/users/rajcze/events{/privacy}","received_events_url":"https://api.github.com/users/rajcze/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rajcze/mongoquery","description":"A python implementation of mongodb queries","fork":true,"url":"https://api.github.com/repos/rajcze/mongoquery","forks_url":"https://api.github.com/repos/rajcze/mongoquery/forks","keys_url":"https://api.github.com/repos/rajcze/mongoquery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rajcze/mongoquery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rajcze/mongoquery/teams","hooks_url":"https://api.github.com/repos/rajcze/mongoquery/hooks","issue_events_url":"https://api.github.com/repos/rajcze/mongoquery/issues/events{/number}","events_url":"https://api.github.com/repos/rajcze/mongoquery/events","assignees_url":"https://api.github.com/repos/rajcze/mongoquery/assignees{/user}","branches_url":"https://api.github.com/repos/rajcze/mongoquery/branches{/branch}","tags_url":"https://api.github.com/repos/rajcze/mongoquery/tags","blobs_url":"https://api.github.com/repos/rajcze/mongoquery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rajcze/mongoquery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rajcze/mongoquery/git/refs{/sha}","trees_url":"https://api.github.com/repos/rajcze/mongoquery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rajcze/mongoquery/statuses/{sha}","languages_url":"https://api.github.com/repos/rajcze/mongoquery/languages","stargazers_url":"https://api.github.com/repos/rajcze/mongoquery/stargazers","contributors_url":"https://api.github.com/repos/rajcze/mongoquery/contributors","subscribers_url":"https://api.github.com/repos/rajcze/mongoquery/subscribers","subscription_url":"https://api.github.com/repos/rajcze/mongoquery/subscription","commits_url":"https://api.github.com/repos/rajcze/mongoquery/commits{/sha}","git_commits_url":"https://api.github.com/repos/rajcze/mongoquery/git/commits{/sha}","comments_url":"https://api.github.com/repos/rajcze/mongoquery/comments{/number}","issue_comment_url":"https://api.github.com/repos/rajcze/mongoquery/issues/comments{/number}","contents_url":"https://api.github.com/repos/rajcze/mongoquery/contents/{+path}","compare_url":"https://api.github.com/repos/rajcze/mongoquery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rajcze/mongoquery/merges","archive_url":"https://api.github.com/repos/rajcze/mongoquery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rajcze/mongoquery/downloads","issues_url":"https://api.github.com/repos/rajcze/mongoquery/issues{/number}","pulls_url":"https://api.github.com/repos/rajcze/mongoquery/pulls{/number}","milestones_url":"https://api.github.com/repos/rajcze/mongoquery/milestones{/number}","notifications_url":"https://api.github.com/repos/rajcze/mongoquery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rajcze/mongoquery/labels{/name}","releases_url":"https://api.github.com/repos/rajcze/mongoquery/releases{/id}","deployments_url":"https://api.github.com/repos/rajcze/mongoquery/deployments","created_at":"2016-05-16T14:33:21Z","updated_at":"2016-05-16T14:33:22Z","pushed_at":"2016-05-17T11:41:59Z","git_url":"git://github.com/rajcze/mongoquery.git","ssh_url":"git@github.com:rajcze/mongoquery.git","clone_url":"https://github.com/rajcze/mongoquery.git","svn_url":"https://github.com/rajcze/mongoquery","homepage":null,"size":20,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kapouille:master","ref":"master","sha":"759677a81968ec264caa65020777cdae11d8a5e2","user":{"login":"kapouille","id":532063,"avatar_url":"https://avatars.githubusercontent.com/u/532063?v=3","gravatar_id":"","url":"https://api.github.com/users/kapouille","html_url":"https://github.com/kapouille","followers_url":"https://api.github.com/users/kapouille/followers","following_url":"https://api.github.com/users/kapouille/following{/other_user}","gists_url":"https://api.github.com/users/kapouille/gists{/gist_id}","starred_url":"https://api.github.com/users/kapouille/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kapouille/subscriptions","organizations_url":"https://api.github.com/users/kapouille/orgs","repos_url":"https://api.github.com/users/kapouille/repos","events_url":"https://api.github.com/users/kapouille/events{/privacy}","received_events_url":"https://api.github.com/users/kapouille/received_events","type":"User","site_admin":false},"repo":{"id":28091964,"name":"mongoquery","full_name":"kapouille/mongoquery","owner":{"login":"kapouille","id":532063,"avatar_url":"https://avatars.githubusercontent.com/u/532063?v=3","gravatar_id":"","url":"https://api.github.com/users/kapouille","html_url":"https://github.com/kapouille","followers_url":"https://api.github.com/users/kapouille/followers","following_url":"https://api.github.com/users/kapouille/following{/other_user}","gists_url":"https://api.github.com/users/kapouille/gists{/gist_id}","starred_url":"https://api.github.com/users/kapouille/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kapouille/subscriptions","organizations_url":"https://api.github.com/users/kapouille/orgs","repos_url":"https://api.github.com/users/kapouille/repos","events_url":"https://api.github.com/users/kapouille/events{/privacy}","received_events_url":"https://api.github.com/users/kapouille/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kapouille/mongoquery","description":"A python implementation of mongodb queries","fork":false,"url":"https://api.github.com/repos/kapouille/mongoquery","forks_url":"https://api.github.com/repos/kapouille/mongoquery/forks","keys_url":"https://api.github.com/repos/kapouille/mongoquery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kapouille/mongoquery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kapouille/mongoquery/teams","hooks_url":"https://api.github.com/repos/kapouille/mongoquery/hooks","issue_events_url":"https://api.github.com/repos/kapouille/mongoquery/issues/events{/number}","events_url":"https://api.github.com/repos/kapouille/mongoquery/events","assignees_url":"https://api.github.com/repos/kapouille/mongoquery/assignees{/user}","branches_url":"https://api.github.com/repos/kapouille/mongoquery/branches{/branch}","tags_url":"https://api.github.com/repos/kapouille/mongoquery/tags","blobs_url":"https://api.github.com/repos/kapouille/mongoquery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kapouille/mongoquery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kapouille/mongoquery/git/refs{/sha}","trees_url":"https://api.github.com/repos/kapouille/mongoquery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kapouille/mongoquery/statuses/{sha}","languages_url":"https://api.github.com/repos/kapouille/mongoquery/languages","stargazers_url":"https://api.github.com/repos/kapouille/mongoquery/stargazers","contributors_url":"https://api.github.com/repos/kapouille/mongoquery/contributors","subscribers_url":"https://api.github.com/repos/kapouille/mongoquery/subscribers","subscription_url":"https://api.github.com/repos/kapouille/mongoquery/subscription","commits_url":"https://api.github.com/repos/kapouille/mongoquery/commits{/sha}","git_commits_url":"https://api.github.com/repos/kapouille/mongoquery/git/commits{/sha}","comments_url":"https://api.github.com/repos/kapouille/mongoquery/comments{/number}","issue_comment_url":"https://api.github.com/repos/kapouille/mongoquery/issues/comments{/number}","contents_url":"https://api.github.com/repos/kapouille/mongoquery/contents/{+path}","compare_url":"https://api.github.com/repos/kapouille/mongoquery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kapouille/mongoquery/merges","archive_url":"https://api.github.com/repos/kapouille/mongoquery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kapouille/mongoquery/downloads","issues_url":"https://api.github.com/repos/kapouille/mongoquery/issues{/number}","pulls_url":"https://api.github.com/repos/kapouille/mongoquery/pulls{/number}","milestones_url":"https://api.github.com/repos/kapouille/mongoquery/milestones{/number}","notifications_url":"https://api.github.com/repos/kapouille/mongoquery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kapouille/mongoquery/labels{/name}","releases_url":"https://api.github.com/repos/kapouille/mongoquery/releases{/id}","deployments_url":"https://api.github.com/repos/kapouille/mongoquery/deployments","created_at":"2014-12-16T15:01:16Z","updated_at":"2016-04-22T04:59:37Z","pushed_at":"2016-05-17T11:51:12Z","git_url":"git://github.com/kapouille/mongoquery.git","ssh_url":"git@github.com:kapouille/mongoquery.git","clone_url":"https://github.com/kapouille/mongoquery.git","svn_url":"https://github.com/kapouille/mongoquery","homepage":null,"size":19,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":2,"forks":5,"open_issues":2,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kapouille/mongoquery/pulls/4"},"html":{"href":"https://github.com/kapouille/mongoquery/pull/4"},"issue":{"href":"https://api.github.com/repos/kapouille/mongoquery/issues/4"},"comments":{"href":"https://api.github.com/repos/kapouille/mongoquery/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/kapouille/mongoquery/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/kapouille/mongoquery/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kapouille/mongoquery/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/kapouille/mongoquery/statuses/d5fc5e897d3e872a0f4fe0b37deb68c72b05aa4f"}}}}