core-unit-bioinformatics/cubi-tools

type: pathlib.Path

Closed this issue · 3 comments

The type here should be specific because it cannot be anything else. Doing that often saves you from manual type casting later in the code

https://github.com/core-unit-bioinformatics/devtools/blob/4302a211efca8e387a338d80581a9dd139b2dcee/update_template.py#L34

updated

Although your fix is in line with Pep8, I strongly suggest making it a habit to keep the source namespace (here: the pathlib module) explicit. In particular for scripts that use many packages, doing so makes it much easier to trace back where certain objects came from (even more important for custom modules that may also use rather generic names such as path).

So that ...

from pathlib import Path
[...]
    type=Path

...should be like

import pathlib
# alternatively,
# import pathlib as pl
[...]
    type=pathlib.Path
    # type=pl.Path

updated