Commit c5e5662
Add typing comments (#154)
* Add typing comments to `fs.base` and `fs.tools`
* Fix syntax for Python < 3.6
* Make sure `if False` typing branches are not covered
* Add typing comments to `fs.appfs`, `fs.compress` and `fs.opener.registry`
* Add typing comments to `fs.path`, `fs.wrap` and `fs.wrapfs`
* Add typing comments to `fs.filesize`
* Add typing comments to `fs.permissions`
* Add typing comments to `fs.copy`
* Fix renamed variable not renamed in `fs.path.relativefrom`
* Add typing comments to `fs.mode`
* Add `typing` to library dependencies
* Start adding typing annotations to `fs.memoryfs`
* Add `mypy_cache` to git ignore list
* Add a typecheck target to Makefile
* Add type alias `RawInfo` to `fs.info` module
* Enforce `_AppFS.app_dir` type as `Text`
* Make `FS.setinfo` expect a `_RawInfo`
* Add missing type annotations to `fs.memoryfs`
* Make `_ConvertOSErrors` a context manager subclass
* Add typing comments to `fs.ftpfs`
* Use `typing.TYPE_CHECKING` to hide imports at runtime
* Add typing comments to `fs.mirror`
* Add typing comments to `fs.mountfs` and fix Mode subclass
* Remove `typing.ContextManager` subclassing for PyPy compatibility
* Add typing comments to `fs.move`
* Add typing annotations to `fs.multifs`
* Amend `MultiFS` API to improve type checking
* Make Python 3.5 depend on `typing~=3.6`
* Add missing type comments to `fs.path` and `fs.permissions`
* Add typing annotations to `fs.zipfs` and `fs.tarfs`
* Fix wrong `make_repr` signature in `fs._repr`
* Add typing annotations to `fs.tree` and `fs.tempfs`
* Make `FS.getmeta` return a mapping instead of a dict
* Fix wrong `unwrap_error` signature in `fs.error_tools`
* Add type comments to `fs.wrapfs`
* Ignore coverage of `typing` imports
* Make `WrapFS` and `SubFS` generic classes
* Make `MountFS.makedir` return only `SubFS[FS]`
* Fix `makedir`, `makedirs` and `opendir` signatures where applicable
* Add missing typing comments to `fs.osfs`
* Fix undeclared bound class in `fs.base`
* Fix invalid `__eq__` method of `Info` objects
* Fix method shadowing in `fs.appfs`
* Fix `FTPFS.create` not returning anything
* Fix occurences of `optional` within the documentation
* Fix `WrapReadOnly.makedirs` using mode instead of Permissions
* Add type comments to `fs.errors`
* Make `LRUCache` a generic mapping class
* Fix missing signatures and type-related bugs
* Fix bugs introduced by typing code changes
* Fix missing typing annotations in `fs.opener`
* Fix functions missing type annotations
* Add `mypy` configuration to `setup.cfg`
* Have `fs.copy` use `typing.TYPE_CHECKING` import guard
* Allow `on_copy` callbacks to return objects in `fs.copy`
* Import `typing` classes locally in `fs.ftpfs`
* Add annotations to `fs.iotools`
* Improve type signature of `makedir` and `opendir`
* Make `getsize` return always int
* Make `Info.size` property return int
* Fix @althonos role in README
Signed-off-by: Martin Larralde <[email protected]>
* Patch `typing.TYPE_CHECKING` missing in Python 3.5.1
* Fix `mypy` complaints about `_OpendirFactory`1 parent 90a00e8 commit c5e5662
File tree
49 files changed
+2120
-732
lines changed- fs
- opener
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
49 files changed
+2120
-732
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
94 | | - | |
95 | | - | |
| 93 | + | |
96 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
6 | 12 | | |
| 13 | + | |
7 | 14 | | |
8 | 15 | | |
9 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
16 | 22 | | |
17 | 23 | | |
18 | 24 | | |
| |||
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
28 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
29 | 38 | | |
30 | 39 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
36 | 47 | | |
37 | | - | |
| 48 | + | |
38 | 49 | | |
39 | 50 | | |
40 | 51 | | |
41 | 52 | | |
42 | 53 | | |
43 | 54 | | |
| 55 | + | |
44 | 56 | | |
45 | 57 | | |
46 | 58 | | |
47 | 59 | | |
48 | 60 | | |
49 | 61 | | |
50 | | - | |
| 62 | + | |
51 | 63 | | |
52 | 64 | | |
53 | 65 | | |
| 66 | + | |
54 | 67 | | |
55 | 68 | | |
56 | 69 | | |
57 | 70 | | |
58 | 71 | | |
| 72 | + | |
59 | 73 | | |
60 | 74 | | |
61 | 75 | | |
| |||
0 commit comments