How to use the clldutils.misc.nfilter function in clldutils

To help you get started, we’ve selected a few clldutils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lmaurits / BEASTling / tests / util.py View on Github external
def tests_path(*comps):
    return Path(__file__).parent.joinpath(*nfilter(comps))
github clld / clld / src / clld / web / datatables / base.py View on Github external
def format(self, item):
        vs = self.get_obj(item)
        return ', '.join(
            nfilter([getattr(vs, 'source', None), linked_references(self.dt.req, vs)]))
github clld / clld / src / clld / web / adapters / geojson.py View on Github external
def feature_properties(self, ctx, req, valueset):
        return {
            'values': list(valueset.values),
            'label': ', '.join(nfilter(v.name for v in valueset.values))
            or self.get_language(ctx, req, valueset).name}