pre-commit-ci[bot]
256f3f1966
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-01-31 19:38:55 +00:00
Hugo van Kemenade
f2228e0a7c
Replace bytes | str | Path with StrOrBytesPath
...
Co-authored-by: Ondrej Baranovič <nulano@nulano.eu>
2024-01-31 12:37:53 -07:00
Hugo van Kemenade
945253672a
Handle os.PathLike in is_path
2024-01-26 19:17:44 +02:00
Hugo van Kemenade
231d54b9df
Replace io.BytesIO in type hints
2024-01-22 23:21:56 +02:00
pre-commit-ci[bot]
0d90bc8187
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2023-12-27 13:57:22 +00:00
Nulano
3a4298d16c
avoid hard dependency on typing_extensions
2023-12-27 14:55:30 +01:00
Nulano
6bcf807fe2
add type hints for _util
2023-12-27 14:55:30 +01:00
Hugo van Kemenade
43b2f61e79
Add 'from __future__ import annotations' using Ruff/isort
2023-12-21 13:13:31 +02:00
Hugo van Kemenade
7fa92c67b1
[Private] class names should be CamelCase
2022-04-10 23:55:16 +03:00
Hugo van Kemenade
d241e38120
[Private] function names should be snake_case
2022-04-10 23:55:16 +03:00
Hugo van Kemenade
1fe4070af6
Drop support for EOL Python 3.5
2020-08-11 22:29:44 +03:00
Hugo
3e24c5fea4
Replace isStringType(t) with isinstance(t, str)
...
Co-Authored-By: Jon Dufresne <jon.dufresne@gmail.com>
2019-10-08 17:26:52 +03:00
Hugo
538d9e2e5d
Upgrade Python syntax with pyupgrade --py3-plus
2019-10-07 14:30:59 +03:00
Hugo
af770a6c55
Drop support for EOL Python 2.7
2019-10-07 14:30:59 +03:00
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