__pkginfo__.py 965 B

1234567891011121314151617181920212223242526272829303132333435
  1. # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  2. # For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
  3. from typing import Tuple
  4. __version__ = "2.12.2"
  5. def get_numversion_from_version(v: str) -> Tuple:
  6. """Kept for compatibility reason
  7. See https://github.com/PyCQA/pylint/issues/4399
  8. https://github.com/PyCQA/pylint/issues/4420,
  9. """
  10. v = v.replace("pylint-", "")
  11. version = []
  12. for n in v.split(".")[0:3]:
  13. try:
  14. version.append(int(n))
  15. except ValueError:
  16. num = ""
  17. for c in n:
  18. if c.isdigit():
  19. num += c
  20. else:
  21. break
  22. try:
  23. version.append(int(num))
  24. except ValueError:
  25. version.append(0)
  26. while len(version) != 3:
  27. version.append(0)
  28. return tuple(version)
  29. numversion = get_numversion_from_version(__version__)