pylas/headers/rawheader.py
def header_class_for_version(cls, version):
        """
        >>> HeaderFactory.header_class_for_version(2.0)
        Traceback (most recent call last):
         ...
        pylas.errors.FileVersionNotSupported: 2.0

        >>> HeaderFactory.header_class_for_version(1.2)
        <class 'pylas.headers.rawheader.RawHeader1_2'>

        >>> header_class = HeaderFactory.header_class_for_version(1.4)
        >>> header_class()
        <LasHeader(1.4)>

        """
        try:
            return cls._version_to_header[str(version)]
        except KeyError:
            raise errors.FileVersionNotSupported(version)
def header_class_for_version(cls, version):
        """
        >>> HeaderFactory.header_class_for_version(2.0)
        Traceback (most recent call last):
         ...
        pylas.errors.FileVersionNotSupported: 2.0

        >>> HeaderFactory.header_class_for_version(1.2)
        <class 'pylas.headers.rawheader.RawHeader1_2'>

        >>> header_class = HeaderFactory.header_class_for_version(1.4)
        >>> header_class()
        <LasHeader(1.4)>

        """
        try:
            return cls._version_to_header[str(version)]
        except KeyError:
            raise errors.FileVersionNotSupported(version)
>>> HeaderFactory.header_class_for_version(2.0)
        Traceback (most recent call last):
         ...
        pylas.errors.FileVersionNotSupported: 2.0

        >>> HeaderFactory.header_class_for_version(1.2)
        <class 'pylas.headers.rawheader.RawHeader1_2'>

        >>> header_class = HeaderFactory.header_class_for_version(1.4)
        >>> header_class()
        <LasHeader(1.4)>