Skip to content

Commit

Permalink
fix(auto-import): move public exports into __init__.py
Browse files Browse the repository at this point in the history
 - it seems that pylance can't manage to auto-import symbols with short paths unless they're defined in __init__.py.
 - it's supposed to be the case that it just magically picks the shortest import path, but it doesn't work in my testing.

BREAKING CHANGE: Previously you could import symbols directly from their files in the module, e.g. `from pathy.base import Pathy`. Now you must import them from the base package, e.g. `from pathy import Pathy`.
  • Loading branch information
justindujardin committed Apr 20, 2021
1 parent a60006f commit fd09021
Show file tree
Hide file tree
Showing 19 changed files with 1,635 additions and 1,613 deletions.
4 changes: 4 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[run]
omit =
# omit tests
*/_tests/*
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ Determine if this path points to the same location as other_path.
## stat <kbd>method</kbd>

```python (doc)
Pathy.stat(self: 'Pathy') -> pathy.base.BlobStat
Pathy.stat(self: 'Pathy') -> pathy.BlobStat
```

Returns information about this bucket path.
Expand Down Expand Up @@ -353,7 +353,7 @@ Stat for a bucket item
```python (doc)
use_fs(
root: Optional[str, pathlib.Path, bool] = None,
) -> Optional[pathy.base.BucketClientFS]
) -> Optional[pathy.BucketClientFS]
```

Use a path in the local file-system to store blobs and buckets.
Expand All @@ -364,7 +364,7 @@ applications.
# get_fs_client <kbd>function</kbd>

```python (doc)
get_fs_client() -> Optional[pathy.base.BucketClientFS]
get_fs_client() -> Optional[pathy.BucketClientFS]
```

Get the file-system client (or None)
Expand Down
Loading

0 comments on commit fd09021

Please sign in to comment.