Undefined variable 'BlackList'
69 if WhiteList: #DEPRECATING
70 allowed_metrics.update(WhiteList) #DEPRECATING
71 if BlackList: #DEPRECATING
72 blocked_metrics.update(BlackList) #DEPRECATING 73
74 # Instantiate an instrumentation service that will record metrics about
75 # this service.
Undefined variable 'BlackList'
68 # I hope that this does what I think.
69 if WhiteList: #DEPRECATING
70 allowed_metrics.update(WhiteList) #DEPRECATING
71 if BlackList: #DEPRECATING 72 blocked_metrics.update(BlackList) #DEPRECATING
73
74 # Instantiate an instrumentation service that will record metrics about
Undefined variable 'WhiteList'
67 blocked_metrics.read_from(settings.blocked_metrics)
68 # I hope that this does what I think.
69 if WhiteList: #DEPRECATING
70 allowed_metrics.update(WhiteList) #DEPRECATING 71 if BlackList: #DEPRECATING
72 blocked_metrics.update(BlackList) #DEPRECATING
73
Undefined variable 'WhiteList'
66 allowed_metrics.read_from(settings.allowed_metrics)
67 blocked_metrics.read_from(settings.blocked_metrics)
68 # I hope that this does what I think.
69 if WhiteList: #DEPRECATING 70 allowed_metrics.update(WhiteList) #DEPRECATING
71 if BlackList: #DEPRECATING
72 blocked_metrics.update(BlackList) #DEPRECATING
Undefined variable 'BlackList'
59 settings.USE_METRIC_FILTERS = True
60 log.msg("NOTE: 'USE_WHITELIST' is being deprecated in favor of 'USE_METRIC_FILTERS'.")
61 WhiteList.read_from(settings.whitelist) #DEPRECATING
62 BlackList.read_from(settings.blacklist) #DEPRECATING 63
64 if settings.USE_METRIC_FILTERS:
65 from carbon.regexlist import allowed_metrics, blocked_metrics
Undefined variable 'WhiteList'
58 if settings.USE_WHITELIST: # DEPRECATING per https://github.com/graphite-project/carbon/issues/567
59 settings.USE_METRIC_FILTERS = True
60 log.msg("NOTE: 'USE_WHITELIST' is being deprecated in favor of 'USE_METRIC_FILTERS'.")
61 WhiteList.read_from(settings.whitelist) #DEPRECATING 62 BlackList.read_from(settings.blacklist) #DEPRECATING
63
64 if settings.USE_METRIC_FILTERS:
Undefined variable 'log'
57
58 if settings.USE_WHITELIST: # DEPRECATING per https://github.com/graphite-project/carbon/issues/567
59 settings.USE_METRIC_FILTERS = True
60 log.msg("NOTE: 'USE_WHITELIST' is being deprecated in favor of 'USE_METRIC_FILTERS'.") 61 WhiteList.read_from(settings.whitelist) #DEPRECATING
62 BlackList.read_from(settings.blacklist) #DEPRECATING
63
Description
The variable name is not defined where it is used. This will lead to an error during the runtime. Make sure there is no typo. If the name was supposed to be imported, verify that you've actually imported the name.
Bad practice
import os.path
if os.path.exits('setup.cfg'): # misspelled `exists`
print('Found config file')
Preferred:
import os.path
if os.path.exists('setup.cfg'):
print('Found config file')