FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

`autosavesInPlace` should be a class method · plotdevice/plotdevice@1efdb5e · GitHub

Repository navigation

Commit 1efdb5e

Browse files
committed
autosavesInPlace should be a class method
1 parent 3cc83bf commit 1efdb5e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎plotdevice/gui/document.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def setFileURL_(self, url):
5959

6060
def writeToURL_ofType_error_(self, url, tp, err):
6161
path = url.fileSystemRepresentation()
62-
# always use the same encoding we were read in with
62+
# always use the same encoding we were read in with (even if they deleted the '# encoding:' line)
6363
with open(path, 'w', encoding=self.source_enc) as f:
6464
f.write(self.script._get_source())
6565
return True, err
@@ -80,6 +80,7 @@ def updateChangeCount_(self, chg):
8080

8181
## Autosave & restoration on re-launch
8282

83+
@classmethod
8384
def autosavesInPlace(self):
8485
return get_default('autosave')
8586

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL