Debian Codegraph @

pbcommand/__init__.py

raw symbols ◀ ▶ SCIP
2 Debian patches touch this file
•1 from importlib.metadata import Distribution, PackageNotFoundError
2 import sys
3
4 try:
•5 __VERSION__ = Distribution.from_name('pbcommand').version
6 except PackageNotFoundError:
•7 __VERSION__ = '2.4.0'
8
9 VERSION = (int(x) for x in __VERSION__.split('.'))
10
11
12 def get_version():
13 """Return the version as a string. "1.0.0"
14
15 This uses a major.minor.tiny to be compatible with semver spec.
16
17 .. note:: This should be improved to be compliant with PEP 386.
18 """
19 return ".".join([str(i) for i in VERSION])
20
21
22 def to_ascii(s):
23 return s
24
25
26 def to_utf8(s):
27 return s