Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix LGTM recommendation: Module is imported with 'import' and 'import from' #2059

Merged
merged 1 commit into from
Sep 13, 2021

Conversation

DimitriPapadopoulos
Copy link
Collaborator

@DimitriPapadopoulos DimitriPapadopoulos commented Sep 10, 2021

Module 'os' is imported with both 'import' and 'import from'

I feel we don't need this op abbreviation here:

  • Lines are not too long.
  • os.path is known by all Python developers, 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.

Here is the LGTM alert:
https://lgtm.com/projects/g/codespell-project/codespell/

… 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.
Copy link
Collaborator

@peternewman peternewman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 😆 Seems legit.

@peternewman peternewman merged commit 83fedf6 into codespell-project:master Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants