Sort the members of the list |chunks| (which must be a list of dictionaries conforming to ycmd.responses.FixItChunk) by their filepath. Returns a new list in arbitrary order.
( chunks )
| 928 | |
| 929 | |
| 930 | def _SortChunksByFile( chunks ): |
| 931 | """Sort the members of the list |chunks| (which must be a list of dictionaries |
| 932 | conforming to ycmd.responses.FixItChunk) by their filepath. Returns a new |
| 933 | list in arbitrary order.""" |
| 934 | |
| 935 | chunks_by_file = defaultdict( list ) |
| 936 | |
| 937 | for chunk in chunks: |
| 938 | filepath = chunk[ 'range' ][ 'start' ][ 'filepath' ] |
| 939 | chunks_by_file[ filepath ].append( chunk ) |
| 940 | |
| 941 | return chunks_by_file |
| 942 | |
| 943 | |
| 944 | def _GetNumNonVisibleFiles( file_list ): |