You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I run autoimport on a file and the file is not changed, the modification time of the file should not be changed either.
For example:
$ echo "print(123)" > foo.py
$ cat foo.py
print(123)
$ date -r foo.py
Thu Jan 20 17:37:42 CST 2022
$ autoimport foo.py
$ cat foo.py
print(123)
$ # ^ foo.py was not changed
$ date -r foo.py
Thu Jan 20 17:37:51 CST 2022
$ # ^ file modification time has changed!
autoimport did not modify foo.py, but the modification time was changed.
Possible Solution
Perhaps autoimport could check whether the file would be modified, and only touch the file if a nonzero diff would occur.
Additional context
I use makefiles and other similar tools which keep track of file modification time. If autoimport does not change the file's contents, modification of the file modification time triggers a false-positive make/build cycle.
The text was updated successfully, but these errors were encountered:
Feature Request
If I run autoimport on a file and the file is not changed, the modification time of the file should not be changed either.
For example:
autoimport
did not modifyfoo.py
, but the modification time was changed.Possible Solution
Perhaps autoimport could check whether the file would be modified, and only touch the file if a nonzero diff would occur.
Additional context
I use makefiles and other similar tools which keep track of file modification time. If autoimport does not change the file's contents, modification of the file modification time triggers a false-positive make/build cycle.
The text was updated successfully, but these errors were encountered: