Skip to content

Commit

Permalink
Fix LGTM recommendation: Module is imported with 'import' and 'import…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
DimitriPapadopoulos committed Sep 10, 2021
1 parent f3901ed commit 97520c0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# adapted from mne-python

import os
from os import path as op

from setuptools import setup

Expand Down Expand Up @@ -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': [
Expand Down

0 comments on commit 97520c0

Please sign in to comment.