Skip to content

Improve redability when acquiring parent directory path #4300

Open
@tiagohonorato

Description

@tiagohonorato

Maybe we could improve the readability on occasions where we obtain the parent path using:

BASEDIR = os.path.dirname(os.path.abspath(__file__))
BASEDIR = os.path.abspath(os.path.join(BASEDIR, os.path.pardir))

Based on the discussion in #4289 and looking on how the os.path module is used in the project, one possible alternative could be:

BASEDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

The above is also used in selftests/check_tmp_dirs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Long Term (Next Q) Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions