summaryrefslogtreecommitdiff
path: root/numpy/distutils
diff options
context:
space:
mode:
authorMSeifert04 <michaelseifert04@yahoo.de>2019-07-01 20:51:40 +0200
committerMSeifert04 <michaelseifert04@yahoo.de>2019-07-02 07:48:42 +0200
commit78d269d847dcea87302580bf56a5c41b7b69f122 (patch)
treee92f1300719474a47c3ccd405370fd769fa51c3a /numpy/distutils
parenta14a8cefdeb80552f0feecd65c8c5b6b869aa487 (diff)
downloadnumpy-78d269d847dcea87302580bf56a5c41b7b69f122.tar.gz
MAINT: Remove unnecessary backslashes when not needed.
See also: #13880
Diffstat (limited to 'numpy/distutils')
-rw-r--r--numpy/distutils/command/build_src.py4
-rw-r--r--numpy/distutils/command/config.py8
-rw-r--r--numpy/distutils/cpuinfo.py28
-rw-r--r--numpy/distutils/exec_command.py2
-rw-r--r--numpy/distutils/npy_pkg_config.py2
5 files changed, 22 insertions, 22 deletions
diff --git a/numpy/distutils/command/build_src.py b/numpy/distutils/command/build_src.py
index 6d5d305d2..41bb01da5 100644
--- a/numpy/distutils/command/build_src.py
+++ b/numpy/distutils/command/build_src.py
@@ -362,7 +362,7 @@ class build_src(build_ext.build_ext):
# incl_dirs = extension.include_dirs
#if self.build_src not in incl_dirs:
# incl_dirs.append(self.build_src)
- build_dir = os.path.join(*([self.build_src]\
+ build_dir = os.path.join(*([self.build_src]
+name.split('.')[:-1]))
self.mkpath(build_dir)
for func in func_sources:
@@ -540,7 +540,7 @@ class build_src(build_ext.build_ext):
if is_sequence(extension):
name = extension[0]
else: name = extension.name
- target_dir = os.path.join(*([self.build_src]\
+ target_dir = os.path.join(*([self.build_src]
+name.split('.')[:-1]))
target_file = os.path.join(target_dir, ext_name + 'module.c')
new_sources.append(target_file)
diff --git a/numpy/distutils/command/config.py b/numpy/distutils/command/config.py
index e9ca7bea8..b9f2fa76e 100644
--- a/numpy/distutils/command/config.py
+++ b/numpy/distutils/command/config.py
@@ -442,10 +442,10 @@ class config(old_config):
of the program and its output.
"""
# 2008-11-16, RemoveMe
- warnings.warn("\n+++++++++++++++++++++++++++++++++++++++++++++++++\n" \
- "Usage of get_output is deprecated: please do not \n" \
- "use it anymore, and avoid configuration checks \n" \
- "involving running executable on the target machine.\n" \
+ warnings.warn("\n+++++++++++++++++++++++++++++++++++++++++++++++++\n"
+ "Usage of get_output is deprecated: please do not \n"
+ "use it anymore, and avoid configuration checks \n"
+ "involving running executable on the target machine.\n"
"+++++++++++++++++++++++++++++++++++++++++++++++++\n",
DeprecationWarning, stacklevel=2)
self._check_compiler()
diff --git a/numpy/distutils/cpuinfo.py b/numpy/distutils/cpuinfo.py
index 580299347..bc9728335 100644
--- a/numpy/distutils/cpuinfo.py
+++ b/numpy/distutils/cpuinfo.py
@@ -242,16 +242,16 @@ class LinuxCPUInfo(CPUInfoBase):
return self.is_PentiumIV() and self.has_sse3()
def _is_Nocona(self):
- return self.is_Intel() \
- and (self.info[0]['cpu family'] == '6' \
- or self.info[0]['cpu family'] == '15' ) \
- and (self.has_sse3() and not self.has_ssse3())\
- and re.match(r'.*?\blm\b', self.info[0]['flags']) is not None
+ return (self.is_Intel()
+ and (self.info[0]['cpu family'] == '6'
+ or self.info[0]['cpu family'] == '15')
+ and (self.has_sse3() and not self.has_ssse3())
+ and re.match(r'.*?\blm\b', self.info[0]['flags']) is not None)
def _is_Core2(self):
- return self.is_64bit() and self.is_Intel() and \
- re.match(r'.*?Core\(TM\)2\b', \
- self.info[0]['model name']) is not None
+ return (self.is_64bit() and self.is_Intel() and
+ re.match(r'.*?Core\(TM\)2\b',
+ self.info[0]['model name']) is not None)
def _is_Itanium(self):
return re.match(r'.*?Itanium\b',
@@ -632,13 +632,13 @@ class Win32CPUInfo(CPUInfoBase):
def _has_sse(self):
if self.is_Intel():
- return (self.info[0]['Family']==6 and \
- self.info[0]['Model'] in [7, 8, 9, 10, 11]) \
- or self.info[0]['Family']==15
+ return ((self.info[0]['Family']==6 and
+ self.info[0]['Model'] in [7, 8, 9, 10, 11])
+ or self.info[0]['Family']==15)
elif self.is_AMD():
- return (self.info[0]['Family']==6 and \
- self.info[0]['Model'] in [6, 7, 8, 10]) \
- or self.info[0]['Family']==15
+ return ((self.info[0]['Family']==6 and
+ self.info[0]['Model'] in [6, 7, 8, 10])
+ or self.info[0]['Family']==15)
else:
return False
diff --git a/numpy/distutils/exec_command.py b/numpy/distutils/exec_command.py
index 2e7b9e463..712f22666 100644
--- a/numpy/distutils/exec_command.py
+++ b/numpy/distutils/exec_command.py
@@ -217,7 +217,7 @@ def exec_command(command, execute_in='', use_shell=None, use_tee=None,
# 2019-01-30, 1.17
warnings.warn('exec_command is deprecated since NumPy v1.17, use '
'subprocess.Popen instead', DeprecationWarning, stacklevel=1)
- log.debug('exec_command(%r,%s)' % (command,\
+ log.debug('exec_command(%r,%s)' % (command,
','.join(['%s=%r'%kv for kv in env.items()])))
if use_tee is None:
diff --git a/numpy/distutils/npy_pkg_config.py b/numpy/distutils/npy_pkg_config.py
index bfe8b9f77..48584b4c4 100644
--- a/numpy/distutils/npy_pkg_config.py
+++ b/numpy/distutils/npy_pkg_config.py
@@ -426,7 +426,7 @@ if __name__ == '__main__':
if options.define_variable:
m = re.search(r'([\S]+)=([\S]+)', options.define_variable)
if not m:
- raise ValueError("--define-variable option should be of " \
+ raise ValueError("--define-variable option should be of "
"the form --define-variable=foo=bar")
else:
name = m.group(1)