News for hackers. Stuff that matters.

henbruas

Re:Uv: Unified Python Packaging on Tuesday August 20, 2024 @03:12PM (#41303002)
Re:Python 3.11.0 final is now available on Tuesday October 25, 2022 @01:15PM (#33333412)
> Yes, there are type stubs for these libraries but they’re either forced to be more strict, preventing use of dynamism, or opt for being less strict but allowing you to use all the library features, at the cost of safety.

There are type stubs for Django that somewhat avoid these compromises: https://github.com/typeddjango/django-stubs

To be able to do this they have to use a Mypy plugin though. And even then it's still far from perfect.

Re:Python 3.11.0 final is now available on Tuesday October 25, 2022 @11:03AM (#33331492)
While it's of course not ideal, stub files can help with this issue. For example you can get stubs for Celery that make both `shared_task` and `delay` properly typed: https://github.com/sbdchd/celery-types
It is indeed a decorator. It's relying on https://peps.python.org/pep-0614/
The documentation seems VERY clear that the "type" field in package.json DOES affect the node runtime: https://nodejs.org/api/packages.html#type
Re:Why I Use Nim instead of Python for Data Processing on Saturday September 25, 2021 @03:54AM (#28651361)
gc_lines isn't a tuple here, it's a generator expression. It will be lazily evaluated.
Re:Django 3 on Monday December 02, 2019 @08:43AM (#21682205)
I'm currently experimenting with it, so I don't have a lot to say yet. But you'll want to use this: https://pypi.org/project/django-stubs/