Best Python code snippet using slash
meta.py
Source:meta.py  
1import abc2from functools import wraps3from dbt.deprecations import warn, renamed_method4def _always_none(*args, **kwargs):5    return None6def _always_list(*args, **kwargs):7    return None8def available(func):9    """A decorator to indicate that a method on the adapter will be10    exposed to the database wrapper, and will be available at parse and run11    time.12    """13    func._is_available_ = True14    return func15def available_deprecated(supported_name, parse_replacement=None):16    """A decorator that marks a function as available, but also prints a17    deprecation warning. Use like18    @available_deprecated('my_new_method')...ctx.py
Source:ctx.py  
...32    def __setattr__(self, attr, value):33        raise AttributeError(34            "Cannot set attribute {!r} on null context".format(attr))35    @property36    def _always_none(self):37        pass38    session = test = test_id = g = internal_globals = \39        test_filename = test_classname = test_methodname = result = fixture = _always_none40    reporter = NullReporter()41class _ContextStack(object):42    def __init__(self):43        super(_ContextStack, self).__init__()44        self._stack = [NullContext()]45    def __getattr__(self, attr):46        assert self._stack47        return getattr(self._stack[-1], attr)48    def __dir__(self):49        assert self._stack50        return dir(self._stack[-1])...Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!
