Skip to content

Either os.path or path - not both#267

Merged
effigies merged 2 commits intopython-versioneer:masterfrom
DimitriPapadopoulos:os.path
Sep 27, 2021
Merged

Either os.path or path - not both#267
effigies merged 2 commits intopython-versioneer:masterfrom
DimitriPapadopoulos:os.path

Conversation

@DimitriPapadopoulos
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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