SAP / odfuzz

Apache License 2.0
18 stars 12 forks source link

Better class init - Config dictionary instead of just sap_vendor_enabled parameter #107

Open phanak-sap opened 3 years ago

phanak-sap commented 3 years ago

From PR #106

Current:

class DirectBuilder:
    """A class for building and initializing all queryable entities with metadata passed in constructor."""
    def __init__(self, metadata, restrictions, method, sap_vendor_enabled = False):

IMHO better:

TODO : config parameter just plain dict and/or Config instance? make sense both, so isinstance()?

class DirectBuilder:
    """A class for building and initializing all queryable entities with metadata passed in constructor."""
    def __init__(self, metadata, restrictions, method, config):

Alternative (change order of parameters as well, from most important to less and hope DirectBuilder usages are using named parameteres instead of positional)

class DirectBuilder:
    """A class for building and initializing all queryable entities with metadata passed in constructor."""
    def __init__(self, metadata, method, restrictions, config):