diff options
| author | Matthew Brost <matthew.brost@intel.com> | 2026-03-12 07:17:56 -0700 |
|---|---|---|
| committer | Matthew Brost <matthew.brost@intel.com> | 2026-03-12 07:23:23 -0700 |
| commit | 42d3b66d4cdbacfc9d120d2301b8de89cc29a914 (patch) | |
| tree | 999800b4737152481da268f2450088ab2f557115 /tools/lib/python/kdoc/python_version.py | |
| parent | 635e3eba1ebcd5b92856e975e1d3859b487dc88b (diff) | |
| parent | 58351f46de26bcc4403f9972f7aed430d15cbd03 (diff) | |
Merge drm/drm-next into drm-xe-next
Backmerging to bring in 7.00-rc3. Important ahead GPU SVM merging THP
support.
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
| -rw-r--r-- | tools/lib/python/kdoc/python_version.py | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/tools/lib/python/kdoc/python_version.py b/tools/lib/python/kdoc/python_version.py index e83088013db2..4ddb7ead5f56 100644 --- a/tools/lib/python/kdoc/python_version.py +++ b/tools/lib/python/kdoc/python_version.py @@ -33,21 +33,31 @@ class PythonVersion: """ def __init__(self, version): - """Ïnitialize self.version tuple from a version string""" + """ + Ïnitialize self.version tuple from a version string. + """ self.version = self.parse_version(version) @staticmethod def parse_version(version): - """Convert a major.minor.patch version into a tuple""" + """ + Convert a major.minor.patch version into a tuple. + """ return tuple(int(x) for x in version.split(".")) @staticmethod def ver_str(version): - """Returns a version tuple as major.minor.patch""" + """ + Returns a version tuple as major.minor.patch. + """ return ".".join([str(x) for x in version]) @staticmethod def cmd_print(cmd, max_len=80): + """ + Outputs a command line, repecting maximum width. + """ + cmd_line = [] for w in cmd: @@ -66,7 +76,9 @@ class PythonVersion: return "\n ".join(cmd_line) def __str__(self): - """Returns a version tuple as major.minor.patch from self.version""" + """ + Return a version tuple as major.minor.patch from self.version. + """ return self.ver_str(self.version) @staticmethod |
