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

MNT: Use pathlib throughout the codebase #2116

Merged
merged 1 commit into from
Feb 28, 2023

Conversation

greglucas
Copy link
Contributor

Change os.path usages to pathlib.Path()

@greglucas greglucas added this to the 0.22 milestone Dec 14, 2022
@@ -24,6 +24,7 @@
sys.exit(error)


from pathlib import Path

Choose a reason for hiding this comment

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

E402 module level import not at top of file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we want to drop the Python 2 crutch and allow the imports to be at the top?

Copy link
Member

Choose a reason for hiding this comment

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

I think it's be nice to remove, but maybe we should wait until we have wheels? Then it's generally a given if you're building from source, you need to be certain everything's good.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that seems reasonable. I'm not sure when we'll get wheels here... Still a few PRs needed even if/when we remove GEOS.

setup.py Outdated Show resolved Hide resolved
@greglucas greglucas force-pushed the use-pathlib branch 2 times, most recently from c1b9ae4 to 4e39b7f Compare December 14, 2022 22:27
@greglucas greglucas marked this pull request as draft December 14, 2022 22:38
@greglucas greglucas force-pushed the use-pathlib branch 2 times, most recently from 40e3cdc to db4e536 Compare December 15, 2022 02:31
@greglucas greglucas marked this pull request as ready for review December 15, 2022 02:41
docs/source/conf.py Outdated Show resolved Hide resolved
lib/cartopy/__init__.py Outdated Show resolved Hide resolved
lib/cartopy/io/__init__.py Outdated Show resolved Hide resolved
lib/cartopy/io/img_nest.py Outdated Show resolved Hide resolved
lib/cartopy/io/shapereader.py Outdated Show resolved Hide resolved
lib/cartopy/tests/io/test_downloaders.py Outdated Show resolved Hide resolved
lib/cartopy/tests/test_coding_standards.py Outdated Show resolved Hide resolved
lib/cartopy/tests/test_img_nest.py Outdated Show resolved Hide resolved
lib/cartopy/tests/test_img_nest.py Outdated Show resolved Hide resolved
lib/cartopy/io/shapereader.py Outdated Show resolved Hide resolved
setup.py Show resolved Hide resolved
setup.py Show resolved Hide resolved
lib/cartopy/io/img_nest.py Outdated Show resolved Hide resolved
lib/cartopy/io/shapereader.py Outdated Show resolved Hide resolved
lib/cartopy/tests/io/test_downloaders.py Outdated Show resolved Hide resolved
setup.py Show resolved Hide resolved
Copy link
Member

@QuLogic QuLogic left a comment

Choose a reason for hiding this comment

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

Other than CircleCI in #2140.

Change os.path usages to pathlib.Path()
setup.py Show resolved Hide resolved
@QuLogic QuLogic merged commit a870cd6 into SciTools:main Feb 28, 2023
@greglucas greglucas deleted the use-pathlib branch February 28, 2023 21:06
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.

3 participants