File: model_test_utils.py

package info (click to toggle)
python-spdx-tools 0.8.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 5,084 kB
  • sloc: python: 18,675; xml: 12,553; sh: 46; makefile: 6
file content (16 lines) | stat: -rw-r--r-- 374 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# SPDX-FileCopyrightText: 2023 spdx contributors
#
# SPDX-License-Identifier: Apache-2.0
from typing import Any, List, Type


def get_property_names(clazz: Type[Any]) -> List[str]:
    return [
        attribute
        for attribute in dir(clazz)
        if not attribute.startswith("_") and not callable(getattr(clazz, attribute))
    ]


class InvalidTypeClass:
    pass