{"action":"created","issue":{"url":"https://api.github.com/repos/coala-analyzer/coala/issues/2400","repository_url":"https://api.github.com/repos/coala-analyzer/coala","labels_url":"https://api.github.com/repos/coala-analyzer/coala/issues/2400/labels{/name}","comments_url":"https://api.github.com/repos/coala-analyzer/coala/issues/2400/comments","events_url":"https://api.github.com/repos/coala-analyzer/coala/issues/2400/events","html_url":"https://github.com/coala-analyzer/coala/issues/2400","id":162549592,"number":2400,"title":"Importers: _iimport_objects shouldn't fail if only path is given","user":{"login":"Adrianzatreanu","id":15572459,"avatar_url":"https://avatars.githubusercontent.com/u/15572459?v=3","gravatar_id":"","url":"https://api.github.com/users/Adrianzatreanu","html_url":"https://github.com/Adrianzatreanu","followers_url":"https://api.github.com/users/Adrianzatreanu/followers","following_url":"https://api.github.com/users/Adrianzatreanu/following{/other_user}","gists_url":"https://api.github.com/users/Adrianzatreanu/gists{/gist_id}","starred_url":"https://api.github.com/users/Adrianzatreanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Adrianzatreanu/subscriptions","organizations_url":"https://api.github.com/users/Adrianzatreanu/orgs","repos_url":"https://api.github.com/users/Adrianzatreanu/repos","events_url":"https://api.github.com/users/Adrianzatreanu/events{/privacy}","received_events_url":"https://api.github.com/users/Adrianzatreanu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/coala-analyzer/coala/labels/difficulty/low","name":"difficulty/low","color":"207de5"}],"state":"closed","locked":false,"assignee":{"login":"Adrianzatreanu","id":15572459,"avatar_url":"https://avatars.githubusercontent.com/u/15572459?v=3","gravatar_id":"","url":"https://api.github.com/users/Adrianzatreanu","html_url":"https://github.com/Adrianzatreanu","followers_url":"https://api.github.com/users/Adrianzatreanu/followers","following_url":"https://api.github.com/users/Adrianzatreanu/following{/other_user}","gists_url":"https://api.github.com/users/Adrianzatreanu/gists{/gist_id}","starred_url":"https://api.github.com/users/Adrianzatreanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Adrianzatreanu/subscriptions","organizations_url":"https://api.github.com/users/Adrianzatreanu/orgs","repos_url":"https://api.github.com/users/Adrianzatreanu/repos","events_url":"https://api.github.com/users/Adrianzatreanu/events{/privacy}","received_events_url":"https://api.github.com/users/Adrianzatreanu/received_events","type":"User","site_admin":false},"assignees":[{"login":"Adrianzatreanu","id":15572459,"avatar_url":"https://avatars.githubusercontent.com/u/15572459?v=3","gravatar_id":"","url":"https://api.github.com/users/Adrianzatreanu","html_url":"https://github.com/Adrianzatreanu","followers_url":"https://api.github.com/users/Adrianzatreanu/followers","following_url":"https://api.github.com/users/Adrianzatreanu/following{/other_user}","gists_url":"https://api.github.com/users/Adrianzatreanu/gists{/gist_id}","starred_url":"https://api.github.com/users/Adrianzatreanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Adrianzatreanu/subscriptions","organizations_url":"https://api.github.com/users/Adrianzatreanu/orgs","repos_url":"https://api.github.com/users/Adrianzatreanu/repos","events_url":"https://api.github.com/users/Adrianzatreanu/events{/privacy}","received_events_url":"https://api.github.com/users/Adrianzatreanu/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2016-06-27T21:13:17Z","updated_at":"2016-07-03T16:22:17Z","closed_at":"2016-07-02T15:44:28Z","body":""},"comment":{"url":"https://api.github.com/repos/coala-analyzer/coala/issues/comments/230161574","html_url":"https://github.com/coala-analyzer/coala/issues/2400#issuecomment-230161574","issue_url":"https://api.github.com/repos/coala-analyzer/coala/issues/2400","id":230161574,"user":{"login":"fneu","id":7591685,"avatar_url":"https://avatars.githubusercontent.com/u/7591685?v=3","gravatar_id":"","url":"https://api.github.com/users/fneu","html_url":"https://github.com/fneu","followers_url":"https://api.github.com/users/fneu/followers","following_url":"https://api.github.com/users/fneu/following{/other_user}","gists_url":"https://api.github.com/users/fneu/gists{/gist_id}","starred_url":"https://api.github.com/users/fneu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fneu/subscriptions","organizations_url":"https://api.github.com/users/fneu/orgs","repos_url":"https://api.github.com/users/fneu/repos","events_url":"https://api.github.com/users/fneu/events{/privacy}","received_events_url":"https://api.github.com/users/fneu/received_events","type":"User","site_admin":false},"created_at":"2016-07-03T16:22:17Z","updated_at":"2016-07-03T16:22:17Z","body":"well this is the function, right?\r\n\r\n```\r\n@arguments_to_lists\r\n@yield_once\r\ndef _iimport_objects(file_paths, names, types, supers, attributes, local):\r\n    \"\"\"\r\n    Import all objects from the given modules that fulfill the requirements\r\n\r\n    :param file_paths: File path(s) from which objects will be imported\r\n    :param names:      Name(s) an objects need to have one of\r\n    :param types:      Type(s) an objects need to be out of\r\n    :param supers:     Class(es) objects need to be a subclass of\r\n    :param attributes: Attribute(s) an object needs to (all) have\r\n    :param local:      if True: Objects need to be defined in the file they\r\n                       appear in to be collected\r\n    :return:           iterator that yields all matching python objects\r\n    :raises Exception: Any exception that is thrown in module code or an\r\n                       ImportError if paths are erroneous.\r\n    \"\"\"\r\n    if not file_paths or (not names and\r\n                          not types and\r\n                          not supers and\r\n                          not attributes):\r\n        return\r\n\r\n    for file_path in file_paths:\r\n        module = _import_module(file_path)\r\n        for obj_name, obj in inspect.getmembers(module):\r\n            if ((not names or obj_name in names) and\r\n                    (not types or isinstance(obj, tuple(types))) and\r\n                    (not supers or _is_subclass(obj, supers)) and\r\n                    (not attributes or _has_all(obj, attributes)) and\r\n                    (local[0] is False or _is_defined_in(obj, file_path))):\r\n                yield obj\r\n```\r\n\r\nso what would you expect to get passing only the file path? **every** object found in the module?\r\n\r\nif local is not set you would also get all the supers and everything else that is imported in this module so I am kind of wondering..."}}
{"actor":{"display_login":"fneu"}}