﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32941	Consider removing unused reverse parameter of utils.formats.get_format_modules	Keryn Knight	Keryn Knight	"Currently the implementation is:
{{{
def get_format_modules(lang=None, reverse=False):
    """"""Return a list of the format modules found.""""""
    if lang is None:
        lang = get_language()
    if lang not in _format_modules_cache:
        _format_modules_cache[lang] = list(iter_format_modules(lang, settings.FORMAT_MODULE_PATH))
    modules = _format_modules_cache[lang]
    if reverse:
        return list(reversed(modules))
    return modules
}}}
but I'd suggest that removing `reverse` as a parameter should ultimately have no affect, as it's only used by `tests.i18n.tests.FormattingTests.test_get_format_modules_stability`
thus the method ''could'' become:
{{{
def get_format_modules(lang=None):
    """"""Return a list of the format modules found.""""""
    if lang is None:
        lang = get_language()
    if lang not in _format_modules_cache:
        _format_modules_cache[lang] = list(iter_format_modules(lang, settings.FORMAT_MODULE_PATH))
    modules = _format_modules_cache[lang]
    return modules
}}}

leaving any downstream caller to do the `reversed(modules)` call themselves, should they need to. Arguably they might not need/want a list anyway...

Patch will come to demonstrate that with the adjustment of the single test everything should be OK to consider removing it. The test would pass whether or not I reverse the output, but I'm opting to keep intent of the test method the same..."	Cleanup/optimization	closed	Utilities	dev	Normal	fixed			Accepted	1	0	0	0	0	0
