Mercurial > hgrepos > Python > libs > ConfigMix
comparison configmix/variables.py @ 207:b3b5ed34d180
Handle most flake8 errors and warnings.
NOTE: E265 "block comment should start with '# ' ist not yet handled.
We would need to adjust our Python style.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sun, 05 May 2019 18:29:47 +0200 |
| parents | 2e66178a09d8 |
| children | bbe8513ea649 |
comparison
equal
deleted
inserted
replaced
| 206:5064e3a2e54a | 207:b3b5ed34d180 |
|---|---|
| 10 from __future__ import division, absolute_import, print_function | 10 from __future__ import division, absolute_import, print_function |
| 11 | 11 |
| 12 import os | 12 import os |
| 13 from functools import wraps | 13 from functools import wraps |
| 14 | 14 |
| 15 from .compat import PY2, text_to_native_os_str, native_os_str_to_text, u | 15 from .compat import PY2, native_os_str_to_text, u |
| 16 | 16 |
| 17 | 17 |
| 18 __all__ = [] | 18 __all__ = [] |
| 19 | 19 |
| 20 | 20 |
| 43 """Lookup Python specific information""" | 43 """Lookup Python specific information""" |
| 44 import platform | 44 import platform |
| 45 if name == "version": | 45 if name == "version": |
| 46 return u(platform.python_version()) | 46 return u(platform.python_version()) |
| 47 elif name == "implementation": | 47 elif name == "implementation": |
| 48 return u(platform.python_implementation()) | 48 return u(platform.python_implementation()) |
| 49 elif name == "version_maj_min": | 49 elif name == "version_maj_min": |
| 50 t = platform.python_version_tuple() | 50 t = platform.python_version_tuple() |
| 51 return u('.'.join(t[:2])) | 51 return u('.'.join(t[:2])) |
| 52 elif name == "version_maj": | 52 elif name == "version_maj": |
| 53 t = platform.python_version_tuple() | 53 t = platform.python_version_tuple() |
