TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #421 · 23 мар.

Мы используем Makefile думая, что нет альтернатив, что это стандарт и всё такое. Но make это не запускалка команд, а система сборки. Мы фактически используем его не по назначению. И на самом деле альтернатива есть! Некоторое время назад я открыл для себя прекрасный инструмент - just. Он решает все проблемы make. just - это не система сборки как make, это именно исполнитель команд! Больше никаких Phony Targets и табуляций, привет нормальный синтаксис и передача аргументов!!! 😎 ⭐️Что умеет just: ✅ Автодокументирование команд Не нужно делать отдельную команду с докой, просто добавь комментарий # команда сборки build: ... $ just --list Available recipes: build # команда сборки Команда с именем default запускается по умолчанию если не указано другое, так что я обычно делаю так: default: just --list Теперь просто выполняем just и получаем доку из текущего файла. ✅ Удобная работа с переменными окружения # загрузить из .env set dotenv-load # глобальная переменная export PYTHONPATH := "./src" # переменная для команды test $TESTUNG="true": pytest ✅ Передача аргументов build target: @echo 'Build {{target}}...' команда запуска $ just build dev # Build dev... ✅ Выбор интерпретатора прямо в команде Пример с инлайн-скриптом на python: system: #!/usr/bin/env python3 import platform print(platform.system()) Эта же функция позволит выполнить скрипт как одну команду вместо перезапуска шела для каждой строки foo: #!/usr/bin/env sh for file in ls .; do echo $file done ✅ Выполнение команды в определенной директории. Можно указать как релятивный путь так и абсолютный [working-directory: 'backend'] build: docker compose build Также можно задать рабочую директорию глобально Там еще много интересного: - поддержка функций - автокомплиты и интеграции - экспрешены - алиасы команд - группировка команд - альтернативы команды под разные ОС - импорт других just-файлов - цветной вывод - ... и другие штуковины! Так что вперёд - ➡️ читать доку! Репозиторий: ➡️https://github.com/casey/just Статья: ➡️https://www.chicks.net/reference/file_formats/just/ ЗЫ. Кажется, на Makefile я уже не вернусь) #tools

Hashtags

Резултати

Пронајдени 1 слични објави

Пребарај: #vandalism

当前筛选 #vandalism清除筛选

🎙 Briefing by Russia's Foreign Ministry Spokeswoman Maria Zakharova (Moscow, November 7, 2025) 🔹Outcomes of Russia’s UNSC Presidency 🔹Kiev regime crimes 🔹Ukraine crisis 🔹Estonia’s introduction of a “fee for energy independence from Russia” 🔹Third advisory opinion of the UN International Court of Justice regarding Palestine 🔹Election of the new UNESCO Director-General during the 43rd session of the UNESCO General Conference 🔹The signing of a peace declaration by Cambodia and Thailand 🔹 2025 BRICS+ Counter-Terrorism Conference 📰Read 📺Watch #UN#UNGA On October 31, the Russian Federation completed its Presidency of the UN Security Council. During this period, the Council held a total of 22 meetings and 11 consultations. A broad range of conflict situations across nearly all regions of the world, as well as other pressing challenges to international peace and security, were considered. Russia’s Presidency reaffirmed our country’s strong authority as a founding member of the UN and a permanent member of its Security Council. The Russian Side made every effort to ensure the Council’s effective and result-oriented work. We will continue to work to ensure that the Council remains an effective tool for coordinating efforts to find collective responses to threats to international peace and security. #KievRegimeCrimes The Kiev neo-Nazi regime continues to attack civilian targets, terrorising the civilians in Russia. Over the past week, more than 70 Russian citizens suffered in artillery and drone strikes — 8 were killed and 63 injured, including 4 children. The brutal practice of deliberately targeting civilians by the Ukrainian neo-Nazis has been reported in all populated areas along the front line. #Estonia#Baltic#Vandalism Moscow is outraged by reports of yet another act of state vandalism in Estonia, this time against the memory of Soviet soldiers buried in the town of Loksa. In a profoundly disrespectful act, the remains of sailors from the destroyer Karl Marx and other Soviet soldiers who died fighting the Nazis between 1941 and 1945 have been exhumed using an excavator. Russia strongly condemns the immoral and criminal campaign being waged in Estonia to desecrate the remains of fallen anti-Nazi fighters. We reiterate that the destruction, damage, or desecration of war graves, even beyond Russia’s borders, is a criminal offence under the Criminal Code of the Russian Federation. #UNESCO On November 6 this year, the UNESCO General Conference, currently being held in Samarkand, elected the Organisation’s new Director-General – the renowned scholar and Egyptologist, former Egyptian Minister of Tourism and Antiquities, Khaled Ahmed El-Enany – for the term from 2025 to 2029. We welcome this decision. We are encouraged by the new Director-General’s pragmatic and constructive approach. #Cambodia#Thailand#ASEAN We welcome the signing of a joint declaration to settle the border conflict by Cambodia and Thailand at the ASEAN Summit in Kuala Lumpur on October 26. We remain confident that the arrangements arrived at with the assistance of Malaysia’s ASEAN Chairship will help overcome existing differences peacefully, establish a close bilateral dialogue, and ensure that the normalised situation will last long and remain durable. We believe many territorial disputes around the world are a legacy of Western colonial policy. Considering the worsening situation in the Asia-Pacific region, it is important to act in the spirit of unity and solidarity which is a hallmark of ASEAN.