)]}'
{"bandit.yaml":[{"author":{"_account_id":14692,"name":"Lucas Fisher","email":"lucas.fisher@gmail.com","username":"lucas.fisher"},"change_message_id":"228876dcdc30e456bda1977114aa79d5e9be0dac","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"# extensions of files which should be analyzed"},{"line_number":22,"context_line":"include:"},{"line_number":23,"context_line":"    - \u0027.py\u0027"},{"line_number":24,"context_line":"    - \u0027.pyw\u0027"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# a list of paths which should be excluded (eg project/tests)"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"ba7be1f8_cf4ab5ab","line":23,"updated":"2015-02-23 21:58:08.000000000","message":"Could you use something like \u0027*.py\u0027 here? That is a standard file glob pattern as opposed to recognizing this as an extension. This is more generic capability and matches what users will expect. Other programs with a include accept file globs.  You can use the fnmatch module to check what matches.","commit_id":"74059f885da6afd72865dddb0228904fd8943435"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"05cf849b8b499cca0b6e4f9a48a95dcf466dd828","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"# extensions of files which should be analyzed"},{"line_number":22,"context_line":"include:"},{"line_number":23,"context_line":"    - \u0027.py\u0027"},{"line_number":24,"context_line":"    - \u0027.pyw\u0027"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# a list of paths which should be excluded (eg project/tests)"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"ba7be1f8_13430f15","line":23,"in_reply_to":"ba7be1f8_cf4ab5ab","updated":"2015-02-23 22:21:26.000000000","message":"Good idea Lucas -- implemented","commit_id":"74059f885da6afd72865dddb0228904fd8943435"},{"author":{"_account_id":14692,"name":"Lucas Fisher","email":"lucas.fisher@gmail.com","username":"lucas.fisher"},"change_message_id":"f35184e30f738ce0777ec5f850fce32669ee0d6b","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    - \u0027*.pyw\u0027"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# a list of paths which should be excluded (eg project/tests)"},{"line_number":27,"context_line":"# common choices are: /tests/, /.tox/, and /.venv/"},{"line_number":28,"context_line":"exclude_dir:"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"profiles:"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"ba7be1f8_e9e12ed1","line":27,"updated":"2015-02-23 23:20:35.000000000","message":"So going with mimicing grep here. We shouldn\u0027t need to put directory separators around the pattern to ensure it only matches a directory.","commit_id":"b5056f449bd6a78092b4086acd546069c1f50993"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"5036292a66e5ae42ac09e3556622007a908b4f3b","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    - \u0027*.pyw\u0027"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# a list of paths which should be excluded (eg project/tests)"},{"line_number":27,"context_line":"# common choices are: /tests/, /.tox/, and /.venv/"},{"line_number":28,"context_line":"exclude_dir:"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"profiles:"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"ba7be1f8_a973b613","line":27,"in_reply_to":"ba7be1f8_e9e12ed1","updated":"2015-02-23 23:48:25.000000000","message":"We don\u0027t need to - actually anything in the path that matches will exclude.  Putting slashes around the directory name ensures that, for example, files with .venv aren\u0027t also matched when you\u0027re trying to exclude a directory.  It\u0027s up to the user though...","commit_id":"b5056f449bd6a78092b4086acd546069c1f50993"},{"author":{"_account_id":14692,"name":"Lucas Fisher","email":"lucas.fisher@gmail.com","username":"lucas.fisher"},"change_message_id":"f35184e30f738ce0777ec5f850fce32669ee0d6b","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# a list of paths which should be excluded (eg project/tests)"},{"line_number":27,"context_line":"# common choices are: /tests/, /.tox/, and /.venv/"},{"line_number":28,"context_line":"exclude_dir:"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"profiles:"},{"line_number":31,"context_line":"    ShellInjection:"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"ba7be1f8_89f272d0","line":28,"updated":"2015-02-23 23:20:35.000000000","message":"This should probably be exclude_dirs since it takes a list.","commit_id":"b5056f449bd6a78092b4086acd546069c1f50993"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"5036292a66e5ae42ac09e3556622007a908b4f3b","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# a list of paths which should be excluded (eg project/tests)"},{"line_number":27,"context_line":"# common choices are: /tests/, /.tox/, and /.venv/"},{"line_number":28,"context_line":"exclude_dir:"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"profiles:"},{"line_number":31,"context_line":"    ShellInjection:"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"ba7be1f8_4955da4e","line":28,"in_reply_to":"ba7be1f8_89f272d0","updated":"2015-02-23 23:48:25.000000000","message":"Done","commit_id":"b5056f449bd6a78092b4086acd546069c1f50993"},{"author":{"_account_id":15173,"name":"Rob Fletcher","email":"rfletch.vol@gmail.com","username":"fletcher"},"change_message_id":"07880b0b3dfa50fa15a1b0bfc7690037325b3fc9","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    - \u0027*.pyw\u0027"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# a list of strings, which if found in the path will cause files to be excluded"},{"line_number":27,"context_line":"# for example /tests/ - to remove all all files in tests directory"},{"line_number":28,"context_line":"exclude_dirs:"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"profiles:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"ba7be1f8_98f2b6d0","line":27,"updated":"2015-02-24 02:03:49.000000000","message":"So if I put specific files in this list, will those be ignored as well? For example, instead of saying /tests/ to ignore everything in tests, can I do ignore_this_test.py for a specific file name?\n\nCan we provide a little more wording about format? For example, absolute vs. relative path.","commit_id":"e0872238447ea3cd3a884d8b937643a0b1596a4b"}],"bandit/core/manager.py":[{"author":{"_account_id":14692,"name":"Lucas Fisher","email":"lucas.fisher@gmail.com","username":"lucas.fisher"},"change_message_id":"228876dcdc30e456bda1977114aa79d5e9be0dac","unresolved":false,"context_lines":[{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    # if this is one of the file extensions we look at, and it isn\u0027t"},{"line_number":280,"context_line":"    # in an excluded path"},{"line_number":281,"context_line":"    if file_ext in parsed_extensions or not do_enforce_extensions:"},{"line_number":282,"context_line":"        if not any(x in path for x in excluded_paths):"},{"line_number":283,"context_line":"            return_value \u003d True"},{"line_number":284,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_8696e24a","line":281,"updated":"2015-02-23 21:58:08.000000000","message":"So here you could use the fnmatch module to check the file instead.","commit_id":"74059f885da6afd72865dddb0228904fd8943435"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"05cf849b8b499cca0b6e4f9a48a95dcf466dd828","unresolved":false,"context_lines":[{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    # if this is one of the file extensions we look at, and it isn\u0027t"},{"line_number":280,"context_line":"    # in an excluded path"},{"line_number":281,"context_line":"    if file_ext in parsed_extensions or not do_enforce_extensions:"},{"line_number":282,"context_line":"        if not any(x in path for x in excluded_paths):"},{"line_number":283,"context_line":"            return_value \u003d True"},{"line_number":284,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_73c0cb7c","line":281,"in_reply_to":"ba7be1f8_8696e24a","updated":"2015-02-23 22:21:26.000000000","message":"Done","commit_id":"74059f885da6afd72865dddb0228904fd8943435"},{"author":{"_account_id":14692,"name":"Lucas Fisher","email":"lucas.fisher@gmail.com","username":"lucas.fisher"},"change_message_id":"f35184e30f738ce0777ec5f850fce32669ee0d6b","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        files_list \u003d set()"},{"line_number":130,"context_line":"        excluded_files \u003d set()"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        excluded_paths \u003d self.b_conf.get_option(\u0027exclude_dir\u0027) or []"},{"line_number":133,"context_line":"        included_globs \u003d self.b_conf.get_option(\u0027include\u0027) or \u0027*.py\u0027"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        # build list of files we will analyze"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_96ae0d84","line":132,"updated":"2015-02-23 23:20:35.000000000","message":"So the name change from excluded_dir to excluded_paths caught me up because they mean different things.  If you have time, doing\n\n excluded_paths -\u003e excluded_dirs\n\nwould make the code clearer.\n\nPath can mean a directory or file, while dirs means just directories.\n\nLeave this up to you since it is something of a big change, but would make the code more readable.","commit_id":"b5056f449bd6a78092b4086acd546069c1f50993"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"cba367f4bf8357a4c8ae3e59e1a1c95934249183","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        included_globs \u003d self.b_conf.get_option(\u0027include\u0027) or \u0027*.py\u0027"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        # build list of files we will analyze"},{"line_number":136,"context_line":"        for _, fname in enumerate(targets):"},{"line_number":137,"context_line":"            # if this is a directory and recursive is set, find all files"},{"line_number":138,"context_line":"            if os.path.isdir(fname):"},{"line_number":139,"context_line":"                if recursive:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_299ee656","line":136,"updated":"2015-02-23 23:46:48.000000000","message":"Why are you using enumerate if you\u0027re not going to use the index?","commit_id":"b5056f449bd6a78092b4086acd546069c1f50993"},{"author":{"_account_id":14692,"name":"Lucas Fisher","email":"lucas.fisher@gmail.com","username":"lucas.fisher"},"change_message_id":"f35184e30f738ce0777ec5f850fce32669ee0d6b","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"            else:"},{"line_number":152,"context_line":"                if _is_file_included(fname, included_globs, excluded_paths,"},{"line_number":153,"context_line":"                                     do_enforce_extensions\u003dFalse):"},{"line_number":154,"context_line":"                    files_list.add(fname)"},{"line_number":155,"context_line":"                else:"},{"line_number":156,"context_line":"                    excluded_files.add(fname)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_c9838a54","line":153,"updated":"2015-02-23 23:20:35.000000000","message":"The reasoning for the logic here is not clear to me. If we explicitly specify a file on the command line then we enforce the exclude paths but not the include paths?  Should do both or none. Prefer both because I think that mimics grep.","commit_id":"b5056f449bd6a78092b4086acd546069c1f50993"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"5036292a66e5ae42ac09e3556622007a908b4f3b","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"            else:"},{"line_number":152,"context_line":"                if _is_file_included(fname, included_globs, excluded_paths,"},{"line_number":153,"context_line":"                                     do_enforce_extensions\u003dFalse):"},{"line_number":154,"context_line":"                    files_list.add(fname)"},{"line_number":155,"context_line":"                else:"},{"line_number":156,"context_line":"                    excluded_files.add(fname)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_cc2718b5","line":153,"in_reply_to":"ba7be1f8_c9838a54","updated":"2015-02-23 23:48:25.000000000","message":"In one of the earlier changes, I thought you favored scanning a file if it was explicitly included on the command line.  I guess if a user specifically lists a file it should be scanned no matter what.","commit_id":"b5056f449bd6a78092b4086acd546069c1f50993"},{"author":{"_account_id":14692,"name":"Lucas Fisher","email":"lucas.fisher@gmail.com","username":"lucas.fisher"},"change_message_id":"f35184e30f738ce0777ec5f850fce32669ee0d6b","unresolved":false,"context_lines":[{"line_number":260,"context_line":""},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"def _is_file_included(path, included_globs, excluded_paths,"},{"line_number":263,"context_line":"                      do_enforce_extensions\u003dTrue):"},{"line_number":264,"context_line":"    \u0027\u0027\u0027Determine if a file should be included based on filename"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    This utility function determines if a file should be included based"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_d63885a2","line":263,"updated":"2015-02-23 23:20:35.000000000","message":"This do_enforce_extension name really doesn\u0027t make any sense now. :) Can we change it to something that matches that we matching filenames or just remove it?","commit_id":"b5056f449bd6a78092b4086acd546069c1f50993"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"5036292a66e5ae42ac09e3556622007a908b4f3b","unresolved":false,"context_lines":[{"line_number":260,"context_line":""},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"def _is_file_included(path, included_globs, excluded_paths,"},{"line_number":263,"context_line":"                      do_enforce_extensions\u003dTrue):"},{"line_number":264,"context_line":"    \u0027\u0027\u0027Determine if a file should be included based on filename"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    This utility function determines if a file should be included based"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_2c81944a","line":263,"in_reply_to":"ba7be1f8_d63885a2","updated":"2015-02-23 23:48:25.000000000","message":"Done","commit_id":"b5056f449bd6a78092b4086acd546069c1f50993"},{"author":{"_account_id":14692,"name":"Lucas Fisher","email":"lucas.fisher@gmail.com","username":"lucas.fisher"},"change_message_id":"f35184e30f738ce0777ec5f850fce32669ee0d6b","unresolved":false,"context_lines":[{"line_number":278,"context_line":"    # if this is matches a glob of files we look at, and it isn\u0027t in an"},{"line_number":279,"context_line":"    # excluded path"},{"line_number":280,"context_line":"    if _matches_glob_list(path, included_globs) or not do_enforce_extensions:"},{"line_number":281,"context_line":"        if not any(x in path for x in excluded_paths):"},{"line_number":282,"context_line":"            return_value \u003d True"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    return return_value"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_a93016e9","line":281,"updated":"2015-02-23 23:20:35.000000000","message":"Good that exclude overrides anything included.\n\n\nThe exclude_dirs patterns should be a glob match against directory components. So you need to us fnmatch and iterate over the dir components.  You might be able to get away with appending the dir separator to both ends of the pattern, but it is kind of hacky.\n\nFor example,\n\n  exclude_dirs \u003d [\u0027.gi*\u0027]\n\nshould exclude\n\n  x/.git/\n  x/y/.gitttttt/z/zz\n\nbut not:\n\n  x/aaa.gitxxxx/","commit_id":"b5056f449bd6a78092b4086acd546069c1f50993"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"5036292a66e5ae42ac09e3556622007a908b4f3b","unresolved":false,"context_lines":[{"line_number":278,"context_line":"    # if this is matches a glob of files we look at, and it isn\u0027t in an"},{"line_number":279,"context_line":"    # excluded path"},{"line_number":280,"context_line":"    if _matches_glob_list(path, included_globs) or not do_enforce_extensions:"},{"line_number":281,"context_line":"        if not any(x in path for x in excluded_paths):"},{"line_number":282,"context_line":"            return_value \u003d True"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    return return_value"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_0c7e906b","line":281,"in_reply_to":"ba7be1f8_a93016e9","updated":"2015-02-23 23:48:25.000000000","message":"I don\u0027t know... I think the primary use case for Bandit would just be excluding directories like .venv, tests, etc.  For this just listing directories should work fine.\n\nOther thoughts?","commit_id":"b5056f449bd6a78092b4086acd546069c1f50993"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"ef1c2e4afd0a26b2b729300e468458c130fa3029","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        included_globs \u003d self.b_conf.get_option(\u0027include\u0027) or \u0027*.py\u0027"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        # build list of files we will analyze"},{"line_number":136,"context_line":"        for _, fname in enumerate(targets):"},{"line_number":137,"context_line":"            # if this is a directory and recursive is set, find all files"},{"line_number":138,"context_line":"            if os.path.isdir(fname):"},{"line_number":139,"context_line":"                if recursive:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_ccb718d7","line":136,"updated":"2015-02-23 23:49:01.000000000","message":"Why are you using enumerate here?","commit_id":"a1d16ad0a829016c1249b6f1e662ed3bc1ab005b"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"2a2d78f95a05d1a8d3bcee6c091bde871e0f5c90","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        included_globs \u003d self.b_conf.get_option(\u0027include\u0027) or \u0027*.py\u0027"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        # build list of files we will analyze"},{"line_number":136,"context_line":"        for _, fname in enumerate(targets):"},{"line_number":137,"context_line":"            # if this is a directory and recursive is set, find all files"},{"line_number":138,"context_line":"            if os.path.isdir(fname):"},{"line_number":139,"context_line":"                if recursive:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_ace1049c","line":136,"in_reply_to":"ba7be1f8_ccb718d7","updated":"2015-02-23 23:56:41.000000000","message":"Ummmm... great point :)","commit_id":"a1d16ad0a829016c1249b6f1e662ed3bc1ab005b"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"ef1c2e4afd0a26b2b729300e468458c130fa3029","unresolved":false,"context_lines":[{"line_number":169,"context_line":"            sys.stdout.write(\"%s [\" % len(self.files_list))"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        cur_count \u003d 0"},{"line_number":172,"context_line":"        for fname in self.files_list:"},{"line_number":173,"context_line":"            self.logger.debug(\"working on file : %s\" % fname)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"            if len(self.files_list) \u003e self.progress:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_0cb210e6","line":172,"updated":"2015-02-23 23:49:01.000000000","message":"Why aren\u0027t you using enumerate here?","commit_id":"a1d16ad0a829016c1249b6f1e662ed3bc1ab005b"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"2a2d78f95a05d1a8d3bcee6c091bde871e0f5c90","unresolved":false,"context_lines":[{"line_number":169,"context_line":"            sys.stdout.write(\"%s [\" % len(self.files_list))"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        cur_count \u003d 0"},{"line_number":172,"context_line":"        for fname in self.files_list:"},{"line_number":173,"context_line":"            self.logger.debug(\"working on file : %s\" % fname)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"            if len(self.files_list) \u003e self.progress:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_2ced148c","line":172,"in_reply_to":"ba7be1f8_0cb210e6","updated":"2015-02-23 23:56:41.000000000","message":"Also great point!","commit_id":"a1d16ad0a829016c1249b6f1e662ed3bc1ab005b"},{"author":{"_account_id":15173,"name":"Rob Fletcher","email":"rfletch.vol@gmail.com","username":"fletcher"},"change_message_id":"07880b0b3dfa50fa15a1b0bfc7690037325b3fc9","unresolved":false,"context_lines":[{"line_number":241,"context_line":""},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"def _get_files_from_dir(files_dir, included_globs\u003d\u0027*.py\u0027,"},{"line_number":244,"context_line":"                        excluded_path_strings\u003dNone):"},{"line_number":245,"context_line":"    if not excluded_path_strings:"},{"line_number":246,"context_line":"        excluded_path_strings \u003d []"},{"line_number":247,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_b8ee9ab2","line":244,"updated":"2015-02-24 02:03:49.000000000","message":"This is a bit of a nits, so I mainly want to get everyone\u0027s opinion, but I think it\u0027d be good if every function has a docstring so that if we every decided to generate documentation automatically everything is already in place.\n\nThat being said, I can\u0027t imagine users of bandit need documentation on class functions not meant to be used. So idk, guess I\u0027m just thinking out loud.","commit_id":"e0872238447ea3cd3a884d8b937643a0b1596a4b"},{"author":{"_account_id":15173,"name":"Rob Fletcher","email":"rfletch.vol@gmail.com","username":"fletcher"},"change_message_id":"07880b0b3dfa50fa15a1b0bfc7690037325b3fc9","unresolved":false,"context_lines":[{"line_number":289,"context_line":"    for glob in glob_list:"},{"line_number":290,"context_line":"        if fnmatch.fnmatch(filename, glob):"},{"line_number":291,"context_line":"            return_value \u003d True"},{"line_number":292,"context_line":"            break"},{"line_number":293,"context_line":"    return return_value"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_3811caac","line":292,"updated":"2015-02-24 02:03:49.000000000","message":"Can\u0027t you just do \u0027return return_value\u0027 at that point? If so, you can probably ditch \u0027return_value\u0027 completely and just return True or False depending on where in the function.","commit_id":"e0872238447ea3cd3a884d8b937643a0b1596a4b"}],"bandit/core/result_store.py":[{"author":{"_account_id":14692,"name":"Lucas Fisher","email":"lucas.fisher@gmail.com","username":"lucas.fisher"},"change_message_id":"228876dcdc30e456bda1977114aa79d5e9be0dac","unresolved":false,"context_lines":[{"line_number":407,"context_line":"        :param output_format: File type to output (json|txt)"},{"line_number":408,"context_line":"        :return: -"},{"line_number":409,"context_line":"        \u0027\u0027\u0027"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"        scores_dict \u003d dict(zip(files_list, scores))"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"        if output_filename is None and output_format \u003d\u003d \u0027txt\u0027:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_665f2e73","line":410,"updated":"2015-02-23 21:58:08.000000000","message":"Suggestion: You could check if excluded_files is None here and then ensure you are passing the empty list. Then you could avoid checking if exclude files is None in each of the report_* functions.","commit_id":"74059f885da6afd72865dddb0228904fd8943435"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"05cf849b8b499cca0b6e4f9a48a95dcf466dd828","unresolved":false,"context_lines":[{"line_number":407,"context_line":"        :param output_format: File type to output (json|txt)"},{"line_number":408,"context_line":"        :return: -"},{"line_number":409,"context_line":"        \u0027\u0027\u0027"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"        scores_dict \u003d dict(zip(files_list, scores))"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"        if output_filename is None and output_format \u003d\u003d \u0027txt\u0027:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_c1f3649c","line":410,"in_reply_to":"ba7be1f8_665f2e73","updated":"2015-02-23 22:21:26.000000000","message":"Sure, this makes sense.  What I\u0027d actually like to have done is just made the default parameter for excluded_files \u003d [], but Python really hates this behavior.  If I end up taking that check out of each report_* function, and somebody adds code at some point that forgets to pass excluded_files, we\u0027ll get an error.  \n\nI guess the other option is just to make excluded_files a required argument.","commit_id":"74059f885da6afd72865dddb0228904fd8943435"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"cba367f4bf8357a4c8ae3e59e1a1c95934249183","unresolved":false,"context_lines":[{"line_number":410,"context_line":"        if output_filename is None and output_format \u003d\u003d \u0027txt\u0027:"},{"line_number":411,"context_line":"            print self.report_tty(files_list, scores,"},{"line_number":412,"context_line":"                                  excluded_files\u003dexcluded_files, lines\u003dlines,"},{"line_number":413,"context_line":"                                  level\u003dlevel)  # noqa"},{"line_number":414,"context_line":"            return"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        if output_filename is None and output_format \u003d\u003d \u0027json\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_cc89d827","line":413,"updated":"2015-02-23 23:46:48.000000000","message":"Why the # noqa?","commit_id":"b5056f449bd6a78092b4086acd546069c1f50993"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"467befd9e292075dd8098428e523cde9b1db0001","unresolved":false,"context_lines":[{"line_number":410,"context_line":"        if output_filename is None and output_format \u003d\u003d \u0027txt\u0027:"},{"line_number":411,"context_line":"            print self.report_tty(files_list, scores,"},{"line_number":412,"context_line":"                                  excluded_files\u003dexcluded_files, lines\u003dlines,"},{"line_number":413,"context_line":"                                  level\u003dlevel)  # noqa"},{"line_number":414,"context_line":"            return"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        if output_filename is None and output_format \u003d\u003d \u0027json\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_ece13cd1","line":413,"in_reply_to":"ba7be1f8_cc89d827","updated":"2015-02-23 23:56:54.000000000","message":"Not sure... this came from Rob\u0027s check-in so I left it.","commit_id":"b5056f449bd6a78092b4086acd546069c1f50993"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"9ca09ccce76ce13b4b23fdec22688f18c795918b","unresolved":false,"context_lines":[{"line_number":410,"context_line":"        if output_filename is None and output_format \u003d\u003d \u0027txt\u0027:"},{"line_number":411,"context_line":"            print self.report_tty(files_list, scores,"},{"line_number":412,"context_line":"                                  excluded_files\u003dexcluded_files, lines\u003dlines,"},{"line_number":413,"context_line":"                                  level\u003dlevel)  # noqa"},{"line_number":414,"context_line":"            return"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        if output_filename is None and output_format \u003d\u003d \u0027json\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_dd00a003","line":413,"in_reply_to":"ba7be1f8_ece13cd1","updated":"2015-02-24 01:05:05.000000000","message":"Stupid question: Why aren\u0027t we using python 3 compatible print?","commit_id":"b5056f449bd6a78092b4086acd546069c1f50993"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"ef1c2e4afd0a26b2b729300e468458c130fa3029","unresolved":false,"context_lines":[{"line_number":410,"context_line":"        if output_filename is None and output_format \u003d\u003d \u0027txt\u0027:"},{"line_number":411,"context_line":"            print self.report_tty(files_list, scores,"},{"line_number":412,"context_line":"                                  excluded_files\u003dexcluded_files, lines\u003dlines,"},{"line_number":413,"context_line":"                                  level\u003dlevel)  # noqa"},{"line_number":414,"context_line":"            return"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        if output_filename is None and output_format \u003d\u003d \u0027json\u0027:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_8cc5203e","line":413,"updated":"2015-02-23 23:49:01.000000000","message":"What check is being skipped here?","commit_id":"a1d16ad0a829016c1249b6f1e662ed3bc1ab005b"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"2a2d78f95a05d1a8d3bcee6c091bde871e0f5c90","unresolved":false,"context_lines":[{"line_number":410,"context_line":"        if output_filename is None and output_format \u003d\u003d \u0027txt\u0027:"},{"line_number":411,"context_line":"            print self.report_tty(files_list, scores,"},{"line_number":412,"context_line":"                                  excluded_files\u003dexcluded_files, lines\u003dlines,"},{"line_number":413,"context_line":"                                  level\u003dlevel)  # noqa"},{"line_number":414,"context_line":"            return"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        if output_filename is None and output_format \u003d\u003d \u0027json\u0027:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_8c9440e3","line":413,"in_reply_to":"ba7be1f8_8cc5203e","updated":"2015-02-23 23:56:41.000000000","message":"Python 3 incompatible print - not from my change.  I\u0027d assume we\u0027re doing this to be consistent with other code.","commit_id":"a1d16ad0a829016c1249b6f1e662ed3bc1ab005b"}]}
