Skip to content

Rename Paths to Files #23

@Masynchin

Description

@Masynchin

Paths are either directory or file, but our Paths contains only files. For example, ExtensionPaths can operate only at files, but this is not marked anyhow. Instead, it should be File and Files interfaces, and no Paths.

ndnt/ndnt/paths.py

Lines 32 to 43 in 091c121

class ExtensionPaths(Paths):
"""Extension paths.
Paths with certain extension.
"""
def __init__(self, origin: Paths, extension: Extension):
self.origin = origin
self.extension = extension
def __iter__(self) -> Iterable[Path]:
return filter(lambda path: self.extension == path.suffix, self.origin)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions