I'm using Ruff v0.0.286 in the following.
For the following Python code:
#!/usr/bin/env python
5 = 3
No output is generated from ruff when analyzed:
user@host $ ruff literal_assign.py
When run from Python:
user@host $ python literal_assign.py
File "/home/user/literal_assign.py", line 2
5 = 3
^
SyntaxError: cannot assign to literal here. Maybe you meant '==' instead of '='?
When analyzed with flake8:
user@host $ flake8 literal_assign.py
literal_assign.py:2:2: E999 SyntaxError: cannot assign to literal here. Maybe you meant '==' instead of '='?