Commits

Ian Cordasco committed 1cdd496

Add the Python version and system to --version

Re: #78 on BitBucket

Comments (0)

Files changed (2)

 import pep8
 
 from flake8 import __version__
-from flake8.util import OrderedSet
+from flake8.util import OrderedSet, get_python_version
 
 _flake8_noqa = re.compile(r'flake8[:=]\s*noqa', re.I).search
 
     """
     (extensions, parser_hooks, options_hooks) = _register_extensions()
     details = ', '.join(['%s: %s' % ext for ext in extensions])
-    parser = pep8.get_parser('flake8', '%s (%s)' % (__version__, details))
+    python_version = get_python_version()
+    parser = pep8.get_parser('flake8', '%s (%s) %s' % (
+        __version__, details, python_version
+    ))
     for opt in ('--repeat', '--testsuite', '--doctest'):
         try:
             parser.remove_option(opt)
 # -*- coding: utf-8 -*-
+import platform
 
 try:
     import ast
     def add(self, value):
         if value not in self:
             self.append(value)
+
+
+def get_python_version():
+    return '%s %s on %s' % (
+        platform.python_implementation(), platform.python_version(),
+        platform.system()
+    )