Remove unused code. (#78499)

pull/78518/head
Matt Clay 2 years ago committed by GitHub
parent 2d2839b234
commit 3a666a131f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -54,12 +54,6 @@ from collections import namedtuple
import importlib.util
import importlib.machinery
# if we're on a Python that doesn't have FNFError, redefine it as IOError (since that's what we'll see)
try:
FileNotFoundError
except NameError:
FileNotFoundError = IOError
display = Display()
ModuleUtilsProcessEntry = namedtuple('ModuleUtilsProcessEntry', ['name_parts', 'is_ambiguous', 'has_redirected_child', 'is_optional'])

@ -136,7 +136,6 @@ def _make_temp_dir(path):
def jwrite(info):
global job_path
jobfile = job_path + ".tmp"
tjob = open(jobfile, "w")
try:

@ -26,7 +26,6 @@ string_to_vars = {
def _var2string(value):
''' reverse lookup of the dict above '''
global string_to_vars
for k, v in string_to_vars.items():
if v == value:
return k
@ -40,7 +39,6 @@ def _init_doc_dict():
def read_docstring_from_yaml_file(filename, verbose=True, ignore_errors=True):
''' Read docs from 'sidecar' yaml file doc for a plugin '''
global string_to_vars
data = _init_doc_dict()
file_data = {}
@ -117,7 +115,6 @@ def read_docstring_from_python_file(filename, verbose=True, ignore_errors=True):
"""
data = _init_doc_dict()
global string_to_vars
try:
with open(filename, 'rb') as b_module_data:

@ -599,7 +599,6 @@ class PluginLoader:
plugin_load_context.redirect_list.append(name)
plugin_load_context.resolved = False
global _PLUGIN_FILTERS
if name in _PLUGIN_FILTERS[self.package]:
plugin_load_context.exit_reason = '{0} matched a defined plugin filter'.format(name)
return plugin_load_context
@ -929,8 +928,6 @@ class PluginLoader:
# Move _dedupe to be a class attribute, CUSTOM_DEDUPE, with subclasses for filters and
# tests setting it to True
global _PLUGIN_FILTERS
dedupe = kwargs.pop('_dedupe', True)
path_only = kwargs.pop('path_only', False)
class_only = kwargs.pop('class_only', False)

Loading…
Cancel
Save