Skip to content

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

Description

@phanak-sap

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):

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions