Nathaniel Starkman

Results 126 comments of Nathaniel Starkman

I opened https://github.com/python/typing/issues/1257 that would allow isinstance to check into fields if they are themselves Protocols. This would allow us to create a Protocol that can distinguish between a normal...

Just wondering, is there any clean way to do structural typing for more complex objects? E.g. ```python def isbarlike(obj) -> TypeGuard[BarLike] .... ``` looks useful, but really isn't because all...

I agree. My plan is to add checks until we've added all the ones we want, then switch to an exclusion list. Or the reverse, start with a long exclusion...

Hmm. flake8 in pre-commit doesn't seem to use ``--ignore``. Or at least I can't get it to work. I found https://github.com/pre-commit/pre-commit-hooks/issues/112 on the subject. Has anyone (maybe @WilliamJamieson) used the...

The problem of astropy having 2 separate configs :(

The `setup.cfg` checks for everything, the pre-commit one is much more selective. I think the pre-commit one should be relaxed.

Apparently the ``setup.cfg`` ones are never run (?). I've tried relaxing pre-commit and running ``pre-commit run -a`` and there are hundreds of errors

We could. However, `black` will fix a subset of these flake8 errors, the rest will still need fixing manually.

Definitely would 😆. @WilliamJamieson, I guess up to you, since you're actually doing all the work.

@saimn, would you agree that now that `black` will be applied, the situation is different? We've added more than half of flake8, esp in https://github.com/astropy/astropy/pull/13853, and `black` will enforce most...