Commit Graph

7 Commits

Author SHA1 Message Date
Hugo
53a7e35004 Format with Black 2019-06-10 18:22:46 +03:00
Will Badart
07bff3e9b8
Implement @hugovk's comments
The `py36` flag now uses a tuple comparison to correctly handle future
major version. The unit test file also now uses `py36` as exported by
the _util module, rather than re-testing `sys.version_info`.
2019-01-28 19:45:53 -05:00
Will Badart
adae7ecc6a
_util.isPath returns True for pathlib.Path objects
Now, for functions which accept either a path or file object, the
predicate will pass on Paths and not attempt to call .read on them
before opening.

The pathlib module was added in 3.4 but os.path functions did not start
accepting path-like objects until 3.6, so that is the version after
which this implementation is defined.

Added a unit test to make sure isPath accepts Path objects. The unit
test is skipped if python version is not 3.6 or later.
2019-01-28 12:19:21 -05:00
Hugo
c75910dbc3 noqa some Py2/3 compat lines and others 2018-12-04 23:25:27 +02:00
Andrew Murray
32cebddd1e Multiple imports on one line 2018-07-02 19:21:44 +10:00
Andrew Murray
b4e6cdadac Added py3 variable to _util 2018-04-20 09:19:13 +10:00
wiredfool
0bb3f4fee9 source layout reorg 2017-12-28 14:49:47 +00:00