Skip to content

Instantly share code, notes, and snippets.

@sobolevn
sobolevn / setup.cfg
Created May 31, 2023 14:26
flake8 configuration example
[flake8]
# Base flake8 configuration:
# https://flake8.pycqa.org/en/latest/user/configuration.html
format = wemake
show-source = true
statistics = false
doctests = true
# darglint configuration:
# https://github.com/terrencepreilly/darglint
import ast
import argparse
import os
import sys
import tokenize
from dataclasses import dataclass
from typing import Final, TypeAlias
_AnyFunction: TypeAlias = ast.FunctionDef | ast.AsyncFunctionDef
@sobolevn
sobolevn / rules.md
Created September 14, 2023 11:12
Правила MoscowPython Discord

Правила сообщества MoscowPython Discord

Адрес чата: https://discord.gg/tNxbPpDchQ

О чём можно

  • мероприятия и проекты сообщества
  • Python и сопутствующая экосистема
  • новости, которые хотя бы косвенно связаны с Python
  • мир разработки вокруг
>>> def other(x, y):
... res = None
... try:
... res = x / y
... except ZeroDivisionError:
... res = 0
... finally:
... print(res)
...
>>> import dis
# /// script
# requires-python = ">=3.14"
# dependencies = [
# "pyperf",
# "httpx",
# ]
# ///
#
# To run `Threading with NoGIL`, first build Python with:
# `./configure --with-pydebug --disable-gil && make`
import gc
import os
import re
import subprocess
import time
from tabulate import tabulate
_HOST = 'http://127.0.0.1:8000'