# Flag Argument This [[Anti-Pattern|anti-pattern]] happens when [[API - Application Programming Interface|API]] developers tries to add too much responsibilities into one endpoint. ```python # Don't def issue_info(id_: int, only_risk: bool) -> AllInfo | Risk: ... # Do def issue_risk(id_: int) -> Risk: ... def issue_info(id_: int) -> AllInfo: ... ``` In this example, if sometimes all information about an issue is required, it shouldn't be the responsibility of the [[Function]] to know what kind of information should be returned based on a flag. --- Bibliography: - [Title - website.com](need bibliography)