Skip to content

Instantly share code, notes, and snippets.

View pyrolynx's full-sized avatar

Kirill Churkin pyrolynx

  • Lightspeed HQ
  • Berlin
View GitHub Profile
@pyrolynx
pyrolynx / all_ver_lint.py
Created February 25, 2026 10:13
The script that checks the module export interface
"""Linting script that ensures modules define ``__all__`` with names imported by other modules.
The script works in two passes:
1. Parses all modules to collect top-level definitions (classes, functions, variables)
and ``from X import Y`` statements, recording line numbers for each.
2. Cross-references imports to find which defined names are imported elsewhere,
keeping track of every import site (file + line).
3. For each module whose names are imported by others, verifies that ``__all__``
exists and includes those names.
import pprint
_L = (
(1, 0, 0, 0),
(1, 2, 0, 0),
(1, 2, 3, 0),
(1, 2, 3, 4),
)
# SQLite
import contextlib
import dataclasses
import sqlite3
from typing import List
from attr import attrs
DB_NAME = '/Users/k.churkin/PycharmProjects/aiogateway/db.sqlite3'
db = sqlite3.connect(DB_NAME)
class User:
id: int
username: str
password: str = None
is_admin: bool
# users
# id | username | password | is_admin
# 1 | admin | qwerty | true
# 2 | user | 12345 | false
import asyncio
import sys
import time
from typing import Optional, AsyncGenerator, Tuple
import aiostream
class Timer:
start: float = None
finish: float = None
import hashlib
import logging
import queue
import select
import socket
BUFFER_SIZE = 1024
POLL_TIMEOUT = 1000
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)

Как правильно сдавать Python.Task

Несколько простых правил которые сэкономят время на Review

Важно! При несоблюдении этих пунктов проверяющий имеет полное право отправить на доработку

Код в репозитории должен быть актуальным.

Всегда держите состояние кода в репозитории актуальным, перед review проверьте что все ветки слиты, ваш локальный master актуален удаленному на GitHub.

Репозиторий должен иметь четку структуру!

from exploiter import Exploiter, Host, HostStatus
import sys
import requests
import re
DIRX = re.compile(r'<a href=".*?">(.+?)</a>')
IMGX = re.compile(r'<a href=".*?">(.+?)</a>')
FLAGX = re.compile(b'\w{31}=')
URL_PATTERN = "http://{0}:8080/static/"
IMG_DIR_PATTERN = "http://{0}:8080/static/{1}/"
import socket
import ssl
# SET VARIABLES
packet, reply = "AUTH LOGIN", ""
HOST, PORT = 'smtp.mail.ru', 465
# CREATE SOCKET
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(10)
using System;
using System.IO.Ports;
using SharpAdbClient;
using System.Linq;
namespace Joystick
{
class Segway
{
}