Andre Brisco

Results 55 comments of Andre Brisco

> You're getting that error because your `__init__()` method has no type annotations at all. This is not the case with `cbor2`. Is that not the case here? https://github.com/agronholm/cbor2/blob/5.6.1/cbor2/_decoder.py#L73

> I count 4 parameters with type annotations. But not the return type. Note that the specific mypy error was ``` demo.py:3: error: Function is missing a return type annotation...

> Try adding an annotated parameter to your `demo.py` and then running mypy against it. wow, that's ridiculous behavior from mypy ```python # demo.py class Foo: def __init__( self, name:...

```python import cbor2 with open("example.cbor", "rb") as f: content = cbor2.load(f) ``` ``` (.venv) ~/Code: mypy --strict demo.py demo.py:4: error: Argument 1 to "load" has incompatible type "BufferedReader"; expected "BytesIO"...

> `cbor2.load()` is an entry point to the code, so it's not called from within the package itself, only the test suite. And since the test suite is untyped, mypy...

Also, thank you for helping me understand more about mypy 🙏

The naming of the feature was inspired by https://docs.rs/openssl/latest/openssl/#vendored

Any updates here? I'm interested in in making the change but want to know if there's a recommended path forward. My thoughts would be to add some `keep` function that...

That will prevent the temp directory from being cleaned up? Is there a test for that?

Neat! https://docs.rs/tempfile/latest/tempfile/struct.TempDir.html#method.into_path seems intentional 😄 thanks for the info!