Richard Höchenberger
Richard Höchenberger
> from what it looks like, the benefit would be mostly for the developers, is that right? Depends on what you consider a developer ;) Any user of MNE-BIDS that...
@sappelhoff consider the following example code: ```python from typing import Optional, List def f(a: str = 'foo', b: int = 0, c: Optional[List[str]] = None) -> str: return 'Hello!' f(a=1,...
> working in Python for > 10 years I've never used it ;) It's relatively new, pops, you're too old and wouldn't understand! **It's not a phase!** ;) No but...
Things are really still in the process of evolving. For example, NumPy just recently [added](https://github.com/numpy/numpy/pull/16515) "type stubs" to their main repository, which help static Python type checkers to know about...
I've been working on this a bit and I think my main pitch for why we must have this is basically what is shown in the below screencast: this is...
These days, basically all "main" scientific Python packages are extensively annotated (NumPy, SciPy, Pandas) And if we annotate MNE-BIDS and MNE-Python, there will be a real benefit for both users...
> In principle yes, but someone has to make sure that our annotations are always in sync with the code base. I can only imagine this happening when annotations live...
> I'm not _that_ stubborn 😄 – the project was mainly implemented by a master's student, and he wanted to have annotations. Simple as that. Oh wow, this was a...
@cbrnr But this either highlights a bug in your code above, or in the type annotation! What this tells you is: "Hey, filename can in some circumstances be a Path,...
Btw there is a way to work around this: you could use a "type guard" like: ```python assert isinstance(filename, str) filename = filename + '.csv' ``` shouldn't spawn the error,...