-
-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added isinstance and issubclass (tuple to type union) support #736
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idk that this is really an improvement -- I expect it to be slower too
.gitignore
Outdated
@@ -2,3 +2,5 @@ | |||
*.pyc | |||
/.coverage | |||
/.tox | |||
/venv | |||
.python-version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't touch gitignore in projects you don't own
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you propose storing venv not in the project folder then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you use virtualenv it is automatically gitignored
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will return it back, but can you explain why are you against of adding /venv
to .gitignore
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
read the history
requirements-dev.txt
Outdated
@@ -1,3 +1,4 @@ | |||
covdefaults>=2.1.0 | |||
coverage | |||
pytest | |||
tokenize-rt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
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:
.gitignore
tokenize-rt
library torequirements-dev.txt
(for some reason it was not present there. Maybe we should pin version?)P.S:
isinstance and issubclass
have 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.