(self, enable_auto_reload, watch_dirs, poll_target_time, exclude_patterns, include_patterns)
| 810 | return collect_try_except_info(code_obj) |
| 811 | |
| 812 | def setup_auto_reload_watcher(self, enable_auto_reload, watch_dirs, poll_target_time, exclude_patterns, include_patterns): |
| 813 | try: |
| 814 | with self._lock_create_fs_notify: |
| 815 | # When setting up, dispose of the previous one (if any). |
| 816 | if self._fsnotify_thread is not None: |
| 817 | self._fsnotify_thread.do_kill_pydev_thread() |
| 818 | self._fsnotify_thread = None |
| 819 | |
| 820 | if not enable_auto_reload: |
| 821 | return |
| 822 | |
| 823 | exclude_patterns = tuple(exclude_patterns) |
| 824 | include_patterns = tuple(include_patterns) |
| 825 | |
| 826 | def accept_directory(absolute_filename, cache={}): |
| 827 | try: |
| 828 | return cache[absolute_filename] |
| 829 | except: |
| 830 | if absolute_filename and absolute_filename[-1] not in ("/", "\\"): |
| 831 | # I.e.: for directories we always end with '/' or '\\' so that |
| 832 | # we match exclusions such as "**/node_modules/**" |
| 833 | absolute_filename += os.path.sep |
| 834 | |
| 835 | # First include what we want |
| 836 | for include_pattern in include_patterns: |
| 837 | if glob_matches_path(absolute_filename, include_pattern): |
| 838 | cache[absolute_filename] = True |
| 839 | return True |
| 840 | |
| 841 | # Then exclude what we don't want |
| 842 | for exclude_pattern in exclude_patterns: |
| 843 | if glob_matches_path(absolute_filename, exclude_pattern): |
| 844 | cache[absolute_filename] = False |
| 845 | return False |
| 846 | |
| 847 | # By default track all directories not excluded. |
| 848 | cache[absolute_filename] = True |
| 849 | return True |
| 850 | |
| 851 | def accept_file(absolute_filename, cache={}): |
| 852 | try: |
| 853 | return cache[absolute_filename] |
| 854 | except: |
| 855 | # First include what we want |
| 856 | for include_pattern in include_patterns: |
| 857 | if glob_matches_path(absolute_filename, include_pattern): |
| 858 | cache[absolute_filename] = True |
| 859 | return True |
| 860 | |
| 861 | # Then exclude what we don't want |
| 862 | for exclude_pattern in exclude_patterns: |
| 863 | if glob_matches_path(absolute_filename, exclude_pattern): |
| 864 | cache[absolute_filename] = False |
| 865 | return False |
| 866 | |
| 867 | # By default don't track files not included. |
| 868 | cache[absolute_filename] = False |
| 869 | return False |
nothing calls this directly
no test coverage detected