8000 Either os.path or path - not both by DimitriPapadopoulos · Pull Request #267 · python-versioneer/python-versioneer · GitHub
[go: up one dir, main page]

Skip to content

Either os. 8000 path or path - not both #267

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

Merged
merged 2 commits into from
Sep 27, 2021

Conversation

DimitriPapadopoulos
Copy link
Contributor

Use either:

	import os
	os.path...

or:

	from os import path
	path...

Don't use both! I have changed evrything to the latter because it was used much more often, but using the former would have the benefit of working around an LGTM.com recommendation:
https://lgtm.com/projects/g/python-versioneer/python-versioneer/snapshot/0fac2b06f40206face530fc992d3978642daece5/files/setup.py?sort=name&dir=ASC&mode=heatmap#x1c1370788a826155:1

Use either:
	import os
	os.path...
or:
	from os import path
	path...

Don't use both! I have changed evrything to the latter because it was
used much more often, but using the former would have the benefit of
working around an LGTM.com recommendation.
@effigies
Copy link
Contributor

I think I would prefer os.path to from os import path, and to use pathlib.Path when it's cleaner. Okay to patch your PR, or would you prefer to do it?

@DimitriPapadopoulos
Copy link
Contributor Author

Please do. I could do the os.pathfrom os import path part, but I'm not certain what to do about the pathlib.Path part - it's too recent for someone who started with Python 1 😄

@DimitriPapadopoulos
Copy link
Contributor Author

Excellent, thank you.

@effigies effigies merged commit ddcfb54 into python-versioneer:master Sep 27, 2021
@DimitriPapadopoulos DimitriPapadopoulos deleted the os.path branch September 27, 2021 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0