INNER CODE UNIT · Python

in

snakemake/snakefmt · snakefmt/config.py:37

    function in v24.2.0 to only find the root if the pyproject.toml file contained the
    [tool.black] section. This is not the desired behaviour for snakefmt
    """
    if stdin_filename is not None:
        srcs = tuple(stdin_filename if s == "-" else s for s in srcs)
    if not srcs:
        srcs = [str(Path.cwd().resolve())]

    path_srcs = [Path(Path.cwd(), src).resolve() for src in srcs]

    # A list of lists of parents for each 'src'. 'src' is included as a
    # "parent" of itself if it is a directory
    src_parents = [
        list(path.parents) + ([path] if path.is_dir() else []) for path in path_srcs
    ]

    common_base = max(
        set.intersection(*(set(parents) for parents in src_parents)),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…