---
source: crates/ruff_linter/src/rules/flake8_bugbear/mod.rs
---
B035 Dictionary comprehension uses static key: `"key"`
  --> B035.py:17:2
   |
16 | # Errors
17 | {"key": value.upper() for value in data}
   |  ^^^^^
18 | {True: value.upper() for value in data}
19 | {0: value.upper() for value in data}
   |

B035 Dictionary comprehension uses static key: `True`
  --> B035.py:18:2
   |
16 | # Errors
17 | {"key": value.upper() for value in data}
18 | {True: value.upper() for value in data}
   |  ^^^^
19 | {0: value.upper() for value in data}
20 | {(1, "a"): value.upper() for value in data}  # Constant tuple
   |

B035 Dictionary comprehension uses static key: `0`
  --> B035.py:19:2
   |
17 | {"key": value.upper() for value in data}
18 | {True: value.upper() for value in data}
19 | {0: value.upper() for value in data}
   |  ^
20 | {(1, "a"): value.upper() for value in data}  # Constant tuple
21 | {constant: value.upper() for value in data}
   |

B035 Dictionary comprehension uses static key: `(1, "a")`
  --> B035.py:20:2
   |
18 | {True: value.upper() for value in data}
19 | {0: value.upper() for value in data}
20 | {(1, "a"): value.upper() for value in data}  # Constant tuple
   |  ^^^^^^^^
21 | {constant: value.upper() for value in data}
22 | {constant + constant: value.upper() for value in data}
   |

B035 Dictionary comprehension uses static key: `constant`
  --> B035.py:21:2
   |
19 | {0: value.upper() for value in data}
20 | {(1, "a"): value.upper() for value in data}  # Constant tuple
21 | {constant: value.upper() for value in data}
   |  ^^^^^^^^
22 | {constant + constant: value.upper() for value in data}
23 | {constant.attribute: value.upper() for value in data}
   |

B035 Dictionary comprehension uses static key: `constant + constant`
  --> B035.py:22:2
   |
20 | {(1, "a"): value.upper() for value in data}  # Constant tuple
21 | {constant: value.upper() for value in data}
22 | {constant + constant: value.upper() for value in data}
   |  ^^^^^^^^^^^^^^^^^^^
23 | {constant.attribute: value.upper() for value in data}
24 | {constant[0]: value.upper() for value in data}
   |

B035 Dictionary comprehension uses static key: `constant.attribute`
  --> B035.py:23:2
   |
21 | {constant: value.upper() for value in data}
22 | {constant + constant: value.upper() for value in data}
23 | {constant.attribute: value.upper() for value in data}
   |  ^^^^^^^^^^^^^^^^^^
24 | {constant[0]: value.upper() for value in data}
25 | {tokens: token for token in tokens}
   |

B035 Dictionary comprehension uses static key: `constant[0]`
  --> B035.py:24:2
   |
22 | {constant + constant: value.upper() for value in data}
23 | {constant.attribute: value.upper() for value in data}
24 | {constant[0]: value.upper() for value in data}
   |  ^^^^^^^^^^^
25 | {tokens: token for token in tokens}
   |

B035 Dictionary comprehension uses static key: `tokens`
  --> B035.py:25:2
   |
23 | {constant.attribute: value.upper() for value in data}
24 | {constant[0]: value.upper() for value in data}
25 | {tokens: token for token in tokens}
   |  ^^^^^^
   |
