Fix LGTM recommendation: Module is imported with 'import' and 'import from'
Module 'os' is imported with both 'import' and 'import from'
I feel we don't need this abbreviation here:
- Lines are not too long.
- os.path is known by all Python developpers, while the op abbreviation is
not (I believe the osp abbreviation is more common).
And actually we had both os.path.exists() and op.join() in the code.
That's confusing.
diff --git a/setup.py b/setup.py
index 9271fde..4c68124 100755
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,6 @@
# adapted from mne-python
import os
-from os import path as op
from setuptools import setup
@@ -49,11 +48,11 @@
'codespell_lib.data',
],
package_data={'codespell_lib': [
- op.join('data', 'dictionary*.txt'),
- op.join('data', 'linux-kernel.exclude'),
+ os.path.join('data', 'dictionary*.txt'),
+ os.path.join('data', 'linux-kernel.exclude'),
]},
exclude_package_data={'codespell_lib': [
- op.join('tests', '*'),
+ os.path.join('tests', '*'),
]},
entry_points={
'console_scripts': [