Вторая по частоте future-функция, которую я использовал, это абсолютный импорт
from __future__ import absolute_import
Что она делает?
Изменения, которые вносит эта инъекция описаны в PEP328
Покажу простой пример.
Допустим, есть такой пакет:
/my_package
/__init__.py
/main.py
/string.py
Смотрим код в my_package/main.py
# main.py
import string
Простой пример готов) Вопрос в том, какой модуль импортируется в данном случае? Есть два варианта:
1. модуль в моём пакете my_package.string
2. стандартный модуль string
И вот тут вступает в дело приоритет импортов. В Python2 порядок следующий: помимо иных источников, раньше ищется модуль внутри текущего пакета, а потом в стандартных библиотеках. Таким образом мы импортнём my_package.string.
Но в Python3 это поведение изменилось. Если мы указываем просто имя пакета, то ищется именно такой модуль, игнорируя имена в текущем пакете. Если мы хотим импортнуть именно подмодуль из нашего пакета то, мы должны теперь явно это указывать.
from my_package import string
или относительный импорт, но с указанием пути относительно текущего модуля main
from . import string
Еще одной неоднозначностью меньше 😎
Подробней про импорты здесь:
https://docs.python.org/3/tutorial/modules.html
#2to3#pep#basic
#lua
99 is an alpha Neovim plugin for skilled coders that streamlines AI requests using OpenCode. Install via Lazy with the given Lua config, set keymaps like `<leader>9f` to fill functions, `<leader>9v` for visual AI edits (visual mode only), and `@` for cmp skill autocompletion from custom SKILL.md rules or AGENT.md files. View logs with `:lua require("99").view_logs()`. It boosts your workflow by keeping AI help inside Neovim for fast, restricted code generation without leaving your editor.
https://github.com/ThePrimeagen/99
#lua
OTClient Redemption is a flexible and complete alternative client for the game Tibia, designed to work with OTServ servers. It uses LUA scripting and CSS-like syntax for easy customization of the game interface, allowing you to create new mods and extend features. Written in modern C++20, it supports advanced graphics, sound, multi-language, and mobile platforms through OpenGL. It offers many features like shaders, animated textures, transparency, and an in-game LUA terminal. This client improves performance with multi-threading and garbage collection, and adapts smoothly to server latency for better gameplay. You benefit by having a customizable, high-performance client that enhances your Tibia experience and supports modding and mobile use.
https://github.com/mehah/otclient
#lua
Path of Building 2 is a free offline tool for planning your Path of Exile 2 character builds. It helps you calculate your damage, defenses, life, mana, and other stats accurately by including buffs, auras, and enemy resistances. You can plan your passive skill tree, add and toggle skills, and manage items by importing them directly or crafting custom gear. It supports minions, party play, and sharing builds with others. This tool saves you time and effort by showing exactly how changes affect your character, helping you create strong, optimized builds before playing. It updates automatically and works offline for convenience.
https://github.com/PathOfBuildingCommunity/PathOfBuilding-PoE2
#lua#github#neovim
Octo.nvim lets you edit and review GitHub issues, pull requests, and discussions right in Neovim. Just open with commands like `//github.com/user/repo/issues/1` or `w` to sync changes instantly. Add reactions, labels, assignees, or reviewers easily. This saves time by keeping all GitHub work in your editor—no browser switching—boosting productivity for developers managing repos.
https://github.com/pwntester/octo.nvim