-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to ignore file patterns #68
Comments
This hurts me, too. In addition, emacs will create auto-saves and lockfiles in the current directory by default. @JohnBloom as a workaround, you could try override flycheck for python (I'm using elpy) to use flymake-create-temp-with-folder-structure instead of flymake-create-temp-inplace. I'm using the following, which is quite a mouthful, so a little help from pytest-watch would be much appreciated: (defun elpy-flymake-python-init ()
;; Make sure it's not a remote buffer as flymake would not work
(when (not (file-remote-p buffer-file-name))
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-with-folder-structure)))
(list python-check-command
(list temp-file)
;; Run flake8 from / to avoid import problems (#169)
"/"))))
;;---- from https://www.emacswiki.org/emacs/BackupDirectory
(setq backup-directory-alist
`((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
`((".*" ,temporary-file-directory t)))
(message "Deleting old backup files...")
(let ((week (* 60 60 24 7))
(current (float-time (current-time))))
(dolist (file (directory-files temporary-file-directory t))
(when (and (backup-file-name-p file)
(> (- current (float-time (fifth (file-attributes file))))
week))
(message "%s" file)
(delete-file file))))
;;----
(setq create-lockfiles nil)
;;---- |
Sadly, on my machine at least, it seems like the above Emacs config makes flake8 lose track of the .flake8 files in the project structure and thus which rules it should or shouldn't apply. |
Emacs lock files endlessly trigger test runs. Autosaves are less frequent but still thorny. It would be nice if |
for linux users as a replacement for pytest-watch you can use the |
Also having this problem |
bump |
Also had this problem, with |
Flycheck for python generates temp files for each change done in the file even if the file has not been saved. So my_file.py will generate flycheck_my_file.py. As far as I can tell there is no way to change the path or extension of these files.
This creates a problem with pytest-watch. Whenever I change anything it runs the tests even if I havent saved the file. I would really like it to only run on file save. What would be nice was if
--ignore
could also ignore files by pattern similar to how .gitignore works. So I could runptw --ignore flycheck*
and not trigger a test when the flycheck files are generated.Regardless, I am loving this tool. Thanks for developing it.
The text was updated successfully, but these errors were encountered: