Skip to content

Commit

Permalink
Changing import os.path to import os
Browse files Browse the repository at this point in the history
Importing both `os` and `os.path` is redundant since importing `os` will import `os.path` and importing `os.path` will also import the `os` module. So it's more clean and explicit to simply import `os` because that reflects better on what the import is actually doing.

Reference: https://www.mail-archive.com/[email protected]/msg188236.html
  • Loading branch information
Skuldur committed Aug 1, 2020
1 parent 7921099 commit ee2e6e9
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion data/aligned_dataset.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import os.path
import os
from data.base_dataset import BaseDataset, get_params, get_transform
from data.image_folder import make_dataset
from PIL import Image
Expand Down
2 changes: 1 addition & 1 deletion data/colorization_dataset.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import os.path
import os
from data.base_dataset import BaseDataset, get_transform
from data.image_folder import make_dataset
from skimage import color # require skimage
Expand Down
1 change: 0 additions & 1 deletion data/image_folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

from PIL import Image
import os
import os.path

IMG_EXTENSIONS = [
'.jpg', '.JPG', '.jpeg', '.JPEG',
Expand Down
2 changes: 1 addition & 1 deletion data/unaligned_dataset.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import os.path
import os
from data.base_dataset import BaseDataset, get_transform
from data.image_folder import make_dataset
from PIL import Image
Expand Down

0 comments on commit ee2e6e9

Please sign in to comment.