Automatic stylistic changes due to linting errors are not ideal
Description
Since a recent update (probably around 1.0.20x), using OpenCode to edit any Python file will result in stylistic changes likely due to linting error messages. For example, PEP8 recommends using double quotes for strings, so all single quote strings are converted to double quotes. An example:
CACHE_TYPES = [
- 'simple',
- 'filesystem',
- 'redis',
- 'redissentinel',
- 'uwsgi',
- 'memcached',
- 'gaememcached',
- 'saslmemcached',
- 'spreadsaslmemcached',
+ "simple",
+ "filesystem",
+ "redis",
+ "redissentinel",
+ "uwsgi",
+ "memcached",
+ "gaememcached",
+ "saslmemcached",
+ "spreadsaslmemcached",
]
Also some frivious formatting changes like this:
- """ A cached resource with short expiration """
+ """A cached resource with short expiration"""
or this:
-CACHE_BUSTING_METHODS = [
- 'POST',
- 'PUT',
- 'PATCH',
- 'DELETE'
-]
+CACHE_BUSTING_METHODS = ["POST", "PUT", "PATCH", "DELETE"]
Setting pyright to disabled in opencode.json has no effect on this behavior.
These changes are polluting the diff for existing projects. It is also difficult to prompt away this behavior. For example, grok code fast 1 doesn't seem to understand "make functional changes only. do not address formatting issues".
Plugins
No response
OpenCode version
1.1.1
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
Debian 13
Terminal
Gnome Terminal