NiceMicro

Redid my #neovim config to keep up with the times (I used many deprecated
plug-ins, and didn't use #lua).

I haven't the faintest idea what I'm doing, I just followed a tutorial, got #lazyVim, and a few plug-ins, and I am utterly stomped by how to set up the #python lsp, especially as I want to include #mypy type checking.

The duality of #documentation is that I either get a tutorial that explains nothing and expects you to copy paste, or a manual that goes waaaay over my head.

fabs();

Anyone else think that the Union type annotation in Python is a code smell that something is too loosely defined?
#python #mypy

May 30, 2025, 07:01 · · · 0 · 0
Kevin Brown-Silva

Other #PyConUS sprints this week:

* #RAPIDSai
* django-simple-deploy and py-bugger
* #PyFyre, #MyPy, and #MyPyC
* MemRay
* #Ruff or Ty from Astral
* #WheelNext
* ci-test / linting-arguments-python

Additionally there will be an "Introduction to Sprints" open space in Room 310 at 6:00 PM.

#PyConUS2025

Matthew Martin

#ty #mypy - but mypy already compiles itself to c via #mypyc so being faster isn't what I'd be expecting, it will be different and probably find different typing errors since for all the type checkers, it comes down to a matter of opinion. Do you think that will be a runtime error? That's in the future, who knows man.

Python Rennes

Nous avons tous nos bonnes pratiques lorsqu'il s'agit de créer un nouveau #projet #Python, avec l'utilisation de patterns et d'outils éprouvés : lint avec #ruff et #mypy, hooks avec #precommit, tests avec #pytest, intégration continue #githubactions : github.com/neubig/starter-repo

Libre à chaque personne de faire évoluer le porojet selon ses propres goûts et contraintes.

GitHub - neubig/starter-repo: An example starter repo for Python projects

An example starter repo for Python projects. Contribute…

GitHub
Mar 25, 2025, 17:20 · · · 0 · 0
sumanthvepa

#ChatGPT introduced me to a couple of cool things in #Python today. When you know that a function returns a specific type you can use assert to let #mypy know that. Or you can use the cast() or TypeGuard.

chatgpt.com/share/67d9f37a-543

ChatGPT - Mypy int None handling

Shared via ChatGPT

ChatGPT
Habr

Аннотации типов в Python: коротко о главном

Привет, Хабр! Сегодня рассмотрим, как Python, оставаясь динамически типизированным, может приближаться к строгой типизации. Всё дело в аннотациях типов , которые позволяют явно указывать, какие данные ожидаются в переменных, аргументах функций и возвращаемых значениях. Аннотации сами по себе не заставляют Python проверять типы во время выполнения, но их можно использовать вместе с инструментами статического анализа. В первую очередь мы будем работать с mypy — популярным инструментом, который выявляет ошибки до запуска программы.

habr.com/ru/companies/otus/art

#python #аннотации_типов #строгая_типизация #mypy

Аннотации типов в Python: коротко о главном

Привет, Хабр! Сегодня рассмотрим, как Python, оставаясь…

Хабр
Olivia A-C

New account, so new #introduction. Let's do it again!

I have a
#MastersDegree in #ComputerScience and #ComputerEngineering. I went to #NMU for undergrad and #MSU for my graduate degree. I currently work at #UChicago for the #TMWCenter, which focuses on helping young children acquire language (and therefore other learning skills) faster.

In my spare time, I develop
#OpenSourceSoftware such as
- a
#SphinxDoc extension that embed #Fediverse comments on your page
- a library to talk to
#ManifoldMarkets from native #Python
- a
#PredictionMarket manager using the above
- a
#transpiler from a subset of Python to #OpenStreetMaps's #OverpassQL
- bug fixes to many other projects, including
#mypy, #base58, #attrs, #CPython, & more

I spend a fair bit of my time these days on
#MathResearch, specifically into the #ThueMorse Sequence and its extensions.

I'm also a hobbyist editor on OpenStreetMap.

#Demisexual, #transfem, and happily engaged to my #enby sweetheart.

We have two cats:
#OpheTheLoaf and #MayalaranTheCat (yes, from #StormlightArchive) See here for more on them!

I speak English fluently, Spanish haltingly, and am trying to learn Chinese

#queer #Chicago

Olivia A-C (@LivInTheLookingGlass)

These are our cats, #OpheTheLoaf and #MayalaranTheCat.…

TransFem Space
Mark T. Tomczak

The static type annotation system in Python (and associated typecheckers) really turns it into a business-ready language. I'm making some big refactors, and I don't know how I would pull them off without type verification.

So many situations where I change a function signature and discover it's being called ⬅️ ⬅️ ⬅️ ⬅️ ⬅️ ⬅️ ⬅️ ⬅️ alllllll the way over there and would just runtime-error without mypy letting me know the signatures no longer match.

Seriously, static type annotation alone has moved Python from "cute toy language" to "production-worthy" in my professional toolbox.

#Python #mypy

Arie van Deursen

Survey on use of types in Python among around 1000 developers. 88% of respondents “Always” or “Often” use Types in their Python code.

Study conducted by Meta, JetBrains, and Microsoft, results on a Google dashboard.

engineering.fb.com/2024/12/09/

#python #mypy #pycharm #pyright

Typed Python in 2024: Well adopted, yet usability challenges persist

Ten years after the introduction of PEP 484, we surveyed…

Engineering at Meta
dilawar

@cdavies I really really want to hate #python sometimes but can't. The darn thing is so useful. Nothing beats it for anything <1k loc! And no matter what you want to do, it is second or third best choice available.

But as a language for developing systems, it sucks! C-API is terrible (shoutout to #pybind11 and #maturin). Dynamic typing becomes a bane (#mypy helps). For last two days, I am tweaking a #fastapi, I miss rust type safety when refactoring.

Dec 13, 2024, 14:40 · · · 0 · 0
Sharlatan

Good news #NumPy is built 1.23.2->1.24.4 with the latest #pytest and #MyPy, any other versions up to 1.26.4 could not be built without a higher level of wizardry.

#Pandas has been built on the latest version!

Fixing failing dependency to build #SciPy hoping to refresh it to the latest version when chaning packages are resolved.

70+ commits are in the queue for the python team in #Guix.

Oh Brave New World...

Nov 18, 2024, 00:05 · · · 0 · 0
Chris is.

How on earth are users of django-stubs getting the “id" field to work properly? Does nobody ever refer to it in code? Am I holding it wrong? I have so many instances of ‘error: "NominatingMemberProfile" has no attribute "id"' in my mypy output, and I can't help but wonder what the hell I'm doing wrong. #django #mypy #python

Habr

Дайджест канала opensource_findings за август 2024

Привет! Под катом множество сложных технических тем внутри питона: от генерации стратегий hypothesis до устройства тайпчекера MyPy. В качестве тестового формата решил сделать подборку сложных технических тем, про которые писал в августе у себя в тг канале: t.me/opensource_findings со ссылками на полные посты. Посмотрим, насколько такой формат работает, напишите свои мысли в комментарии! Буду благодарен обратной связи, поехали!

habr.com/ru/articles/841388/

#python #mypy #тестирование #c

Находки в опенсорсе

Привет! Меня зовут Никита Соболев. Я занимаюсь опенсорс…

t.me
Silmathoron ⁂

Are there people here using the #Ruff #LSP on #KDE with #Kate ?

I've followed the setup instructions [0] but it does not seem to work properly... in particular it doesn't seem to detect functions, etc, so I don't get the "go to definition" functionality, while everything works fine if I use #mypy (it's just super slow and CPU intensive).

[0]: docs.astral.sh/ruff/editors/se

Any help is welcome (even if it's only a boost) because I'd really like to get that lightning fast LSP!

#python #IDE #linux

Setup - Ruff

docs.astral.sh
Eashwar

I'm contemplating hosting a introductory learning session at work to help people get better with mypy type annotations.
Placeholder Title: Type Theory for the Type Wary
#Python #MyPy

Jeffrey Goldberg

@mariatta, I think I would have enjoyed PyConUS. My attitude toward #python has been evolving rapidly. My first encounter was in the 90s looking at the mailman code, but never touched it or looked at it until a couple of years ago.

My reintroduction was via #SageMath. I liked using Python for teaching about other things, including #cryptography. I could write things that would be readable to many people and I didn’t have to use a bigint library. So I have largely shifted to #jupyter from #RMarkdown for my own notes on things and for exposition.

But (putting it mildly) I am not a fan of dynamic typing, and I was coding against the grain. But a very wise friend, @averagesecurityguy said, “Let Python be Python”.

The work of the Python typing community has helped me enormously. If I broaden my notion of “compile time” to include #mypy checks, then I have decent compile time type checking, while letting Python be Python.

jtmoulia 🐁

A guide on integrating #emacs + #python + #hatch using [mostly] builtin tooling and project local .dir-locals.el variables.

Specifically, this setup uses #Eglot + #pyright for live syntax checking, #pytest for code running, #MyPy for type-checking, and #IPython as the shell

Feedback would be welcome -- trying to get it robust + idiomatic.

jtmoulia.srht.site/guides/emac

Emacs + Python + Hatch

Python has yet another packaging tool, Hatch. Here’s…

jtmoulia.srht.site