added isinstance and issubclass (tuple to type union) support#736
added isinstance and issubclass (tuple to type union) support#736leshark wants to merge 8 commits intoasottile:mainfrom
Conversation
asottile
left a comment
There was a problem hiding this comment.
idk that this is really an improvement -- I expect it to be slower too
.gitignore
Outdated
| /.coverage | ||
| /.tox | ||
| /venv | ||
| .python-version |
There was a problem hiding this comment.
don't touch gitignore in projects you don't own
There was a problem hiding this comment.
do you propose storing venv not in the project folder then?
There was a problem hiding this comment.
if you use virtualenv it is automatically gitignored
There was a problem hiding this comment.
or you can set a global ignore if you insist on using venv
personally I use tox --devenv venv
There was a problem hiding this comment.
I will return it back, but can you explain why are you against of adding /venv to .gitignore?
requirements-dev.txt
Outdated
| covdefaults>=2.1.0 | ||
| coverage | ||
| pytest | ||
| tokenize-rt |
There was a problem hiding this comment.
this indicates you're not running the project correctly. the dependencies for runtime are installed through setup.cfg, perhaps you're on a 5 year old version of tox or virtualenv?
Do you want a benchmark? I doubt there is a big difference. Looks nicer though |
|
Small plugin for changing
to
as was enabled in pep-0604
Additionally added:
.gitignoretokenize-rtlibrary torequirements-dev.txt(for some reason it was not present there. Maybe we should pin version?)P.S:
isinstance and issubclasshave a weird signature:which means it is possible to pass a tuple of types inside tuple of types and it will work. I have never seen anyone using this, so I leave it as it is.