From 682e0334971c28da49b4a254cfc98ccd25756144 Mon Sep 17 00:00:00 2001 From: Christian Brueffer Date: Mon, 20 Oct 2014 17:14:53 +0200 Subject: [PATCH] Misc PEP8 fixes. --- doc/source/tutorial/examples/normdiscr_plot1.py | 2 +- doc/source/tutorial/examples/normdiscr_plot2.py | 4 ++-- pavement.py | 9 +++++---- setup.py | 4 ++-- tools/cythonize.py | 4 ++-- tools/win32/build_scripts/pavement.py | 8 ++++---- tools/win32/detect_cpu_extensions_wine.py | 2 +- 7 files changed, 17 insertions(+), 16 deletions(-) diff --git a/doc/source/tutorial/examples/normdiscr_plot1.py b/doc/source/tutorial/examples/normdiscr_plot1.py index 229d50272d19..4aa68ce5cbd3 100644 --- a/doc/source/tutorial/examples/normdiscr_plot1.py +++ b/doc/source/tutorial/examples/normdiscr_plot1.py @@ -39,7 +39,7 @@ plt.ylabel('Frequency') plt.title('Frequency and Probability of normdiscrete') -plt.xticks(ind+width, ind ) +plt.xticks(ind+width, ind) plt.legend((rects1[0], rects2[0]), ('true', 'sample')) plt.show() diff --git a/doc/source/tutorial/examples/normdiscr_plot2.py b/doc/source/tutorial/examples/normdiscr_plot2.py index 06c7310c7f53..425368cd26b5 100644 --- a/doc/source/tutorial/examples/normdiscr_plot2.py +++ b/doc/source/tutorial/examples/normdiscr_plot2.py @@ -42,7 +42,7 @@ plt.ylabel('cdf') plt.title('Cumulative Frequency and CDF of normdiscrete') -plt.xticks(ind+width, ind ) -plt.legend( (rects1[0], rects2[0]), ('true', 'sample') ) +plt.xticks(ind+width, ind) +plt.legend((rects1[0], rects2[0]), ('true', 'sample')) plt.show() diff --git a/pavement.py b/pavement.py index 7d9b8a03cb34..9f5a8c4e9620 100644 --- a/pavement.py +++ b/pavement.py @@ -145,9 +145,9 @@ bdist_wininst_simple=Bunch(python_version=PYVER),) # Where we can find BLAS/LAPACK/ATLAS on Windows/Wine -SITECFG = {"sse3" : {'BLAS': 'None', 'LAPACK': 'None', 'ATLAS': r'C:\local\lib\yop\sse3'}, - "sse2" : {'BLAS': 'None', 'LAPACK': 'None', 'ATLAS': r'C:\local\lib\yop\sse2'}, - "nosse" : {'ATLAS': 'None', 'BLAS': r'C:\local\lib\yop\nosse', +SITECFG = {"sse3": {'BLAS': 'None', 'LAPACK': 'None', 'ATLAS': r'C:\local\lib\yop\sse3'}, + "sse2": {'BLAS': 'None', 'LAPACK': 'None', 'ATLAS': r'C:\local\lib\yop\sse2'}, + "nosse": {'ATLAS': 'None', 'BLAS': r'C:\local\lib\yop\nosse', 'LAPACK': r'C:\local\lib\yop\nosse'}} # Wine config for win32 builds @@ -393,6 +393,7 @@ def bdist_wininst_sse3(options): def bdist_superpack(options): """Build all arch specific wininst installers.""" pyver = options.python_version + def copy_bdist(arch): # Copy the wininst in dist into the release directory source = os.path.join('dist', wininst_name(pyver)) @@ -655,7 +656,7 @@ def write_release_task(filename='NOTES.txt'): def write_log_task(filename='Changelog'): st = subprocess.Popen( - ['git', 'log', '%s..%s' % (LOG_START, LOG_END)], + ['git', 'log', '%s..%s' % (LOG_START, LOG_END)], stdout=subprocess.PIPE) out = st.communicate()[0] diff --git a/setup.py b/setup.py index 35a2a606d7e6..80439a357f42 100755 --- a/setup.py +++ b/setup.py @@ -130,8 +130,8 @@ def write_version_py(filename='scipy/version.py'): a = open(filename, 'w') try: a.write(cnt % {'version': VERSION, - 'full_version' : FULLVERSION, - 'git_revision' : GIT_REVISION, + 'full_version': FULLVERSION, + 'git_revision': GIT_REVISION, 'isrelease': str(ISRELEASED)}) finally: a.close() diff --git a/tools/cythonize.py b/tools/cythonize.py index ce6dc9698791..47911e1fcab0 100755 --- a/tools/cythonize.py +++ b/tools/cythonize.py @@ -101,8 +101,8 @@ def process_tempita_pyx(fromfile, tofile): rules = { # fromext : function - '.pyx' : process_pyx, - '.pyx.in' : process_tempita_pyx + '.pyx': process_pyx, + '.pyx.in': process_tempita_pyx } # # Hash db diff --git a/tools/win32/build_scripts/pavement.py b/tools/win32/build_scripts/pavement.py index 0ce17a342a8f..bad8ff9e6a80 100644 --- a/tools/win32/build_scripts/pavement.py +++ b/tools/win32/build_scripts/pavement.py @@ -14,9 +14,9 @@ PYVER = '2.5' ARCH = 'nosse' -PYEXECS = {"2.5" : "C:\python25\python.exe", - "2.4" : "C:\python24\python24.exe", - "2.3" : "C:\python23\python23.exe"} +PYEXECS = {"2.5": "C:\python25\python.exe", + "2.4": "C:\python24\python24.exe", + "2.3": "C:\python23\python23.exe"} _SSE3_CFG = r"""[atlas] library_dirs = C:\local\lib\yop\sse3""" @@ -27,7 +27,7 @@ [DEFAULT] library_dirs = C:\local\lib\yop\nosse""" -SITECFG = {"sse2" : _SSE2_CFG, "sse3" : _SSE3_CFG, "nosse" : _NOSSE_CFG} +SITECFG = {"sse2": _SSE2_CFG, "sse3": _SSE3_CFG, "nosse": _NOSSE_CFG} options( clean=Bunch( diff --git a/tools/win32/detect_cpu_extensions_wine.py b/tools/win32/detect_cpu_extensions_wine.py index f1632bd19cee..143936431ab4 100644 --- a/tools/win32/detect_cpu_extensions_wine.py +++ b/tools/win32/detect_cpu_extensions_wine.py @@ -26,7 +26,7 @@ NUMPY_PY26 = os.environ['HOME'] + '/.wine/drive_c/Python26/Lib/site-packages/numpy/' NUMPY_PY27 = os.environ['HOME'] + '/.wine/drive_c/Python27/Lib/site-packages/numpy/' NUMPY_PY31 = os.environ['HOME'] + '/.wine/drive_c/Python31/Lib/site-packages/numpy/' -SSE3_LIBS = os.environ['HOME'] + '/.wine/drive_c/local/lib/yop/sse3' +SSE3_LIBS = os.environ['HOME'] + '/.wine/drive_c/local/lib/yop/sse3' SSE2_LIBS = os.environ['HOME'] + '/.wine/drive_c/local/lib/yop/sse2' NOSSE_LIBS = os.environ['HOME'] + '/.wine/drive_c/local/lib/yop/nosse'