Change8
Error1 reports

Fix AttributeError

in Black

Solution

The `AttributeError: 'tuple' object has no attribute 'append'` in Black often arises when a function expects a mutable list but receives an immutable tuple instead, particularly when manipulating target versions. To fix this, ensure that you're converting the tuple of target versions into a list before attempting to use the `append` method; use `list(target_versions)` to create a mutable list copy.

Timeline

First reported:Jul 31, 2025
Last reported:Jul 31, 2025

Need More Help?

View the full changelog and migration guides for Black

View Black Changelog