Skip to content

Changelog

This class represent a changelog directory. The directory name is the version of the changelog.

Source code in pum/changelog.py
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class Changelog:
    """
    This class represent a changelog directory.
    The directory name is the version of the changelog.
    """

    def __init__(self, dir):
        """
        Args:
            dir (str): The directory where the changelog is located.
        """
        self.dir = dir
        self.version = parse_version(basename(dir))

    def __repr__(self):
        return f"<dir: {self.dir} (v: {self.version})>"

__init__

__init__(dir)

Parameters:

Name Type Description Default
dir str

The directory where the changelog is located.

required
Source code in pum/changelog.py
15
16
17
18
19
20
21
def __init__(self, dir):
    """
    Args:
        dir (str): The directory where the changelog is located.
    """
    self.dir = dir
    self.version = parse_version(basename(dir))