99import glob , fnmatch
1010import inspect
1111import types
12- from webassets import six
1312try :
1413 import yaml
1514except ImportError :
1615 pass
1716
18- from webassets import six
1917from webassets import Environment
2018from webassets .bundle import Bundle
2119from webassets .exceptions import EnvironmentError
@@ -53,7 +51,7 @@ def _yield_bundle_contents(self, data):
5351 Each item yielded will be either a string representing a file path
5452 or a bundle."""
5553 contents = data .get ('contents' , [])
56- if isinstance (contents , six . string_types ):
54+ if isinstance (contents , str ):
5755 contents = contents ,
5856 for content in contents :
5957 if isinstance (content , dict ):
@@ -74,7 +72,7 @@ def _get_bundle(self, data):
7472 def _get_bundles (self , obj , known_bundles = None ):
7573 """Return a dict that keys bundle names to bundles."""
7674 bundles = {}
77- for key , data in six . iteritems ( obj ):
75+ for key , data in obj . items ( ):
7876 if data is None :
7977 data = {}
8078 bundles [key ] = self ._get_bundle (data )
@@ -100,7 +98,7 @@ def _open(self):
10098
10199 The filename can be False if it is unknown.
102100 """
103- if isinstance (self .file_or_filename , six . string_types ):
101+ if isinstance (self .file_or_filename , str ):
104102 return open (self .file_or_filename ), self .file_or_filename
105103
106104 file = self .file_or_filename
@@ -244,7 +242,7 @@ def load_environment(self):
244242
245243 # Load bundles
246244 bundles = self ._get_bundles (obj .get ('bundles' , {}))
247- for name , bundle in six . iteritems ( bundles ):
245+ for name , bundle in bundles . items ( ):
248246 env .register (name , bundle )
249247
250248 return env
0 commit comments