From b620c77b35e4336ca3d85c249a680493eb594c76 Mon Sep 17 00:00:00 2001 From: Simon Sawicki Date: Fri, 10 May 2024 19:12:00 +0200 Subject: [PATCH] Restore setup.cfg (no guarantees) --- Makefile | 4 ++-- setup.cfg | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 setup.cfg diff --git a/Makefile b/Makefile index 3a8cbf106..b8f010086 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ tar: yt-dlp.tar.gz # intended use: when building a source distribution, # make pypi-files && python3 -m build -sn . pypi-files: AUTHORS Changelog.md LICENSE README.md README.txt supportedsites \ - completions yt-dlp.1 pyproject.toml devscripts/* test/* + completions yt-dlp.1 pyproject.toml setup.cfg devscripts/* test/* .PHONY: all clean clean-all clean-test clean-dist clean-cache \ completions completion-bash completion-fish completion-zsh \ @@ -158,7 +158,7 @@ yt-dlp.tar.gz: all README.md supportedsites.md Changelog.md LICENSE \ CONTRIBUTING.md Collaborators.md CONTRIBUTORS AUTHORS \ Makefile yt-dlp.1 README.txt completions .gitignore \ - yt-dlp yt_dlp pyproject.toml devscripts test + setup.cfg yt-dlp yt_dlp pyproject.toml devscripts test AUTHORS: Changelog.md @if [ -d '.git' ] && command -v git > /dev/null ; then \ diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 000000000..340cc3b4d --- /dev/null +++ b/setup.cfg @@ -0,0 +1,39 @@ +[flake8] +exclude = build,venv,.tox,.git,.pytest_cache +ignore = E402,E501,E731,E741,W503 +max_line_length = 120 +per_file_ignores = + devscripts/lazy_load_template.py: F401 + + +[autoflake] +ignore-init-module-imports = true +ignore-pass-after-docstring = true +remove-all-unused-imports = true +remove-duplicate-keys = true +remove-unused-variables = true + + +[tox:tox] +skipsdist = true +envlist = py{38,39,310,311,312},pypy{38,39,310} +skip_missing_interpreters = true + +[testenv] # tox +deps = + pytest +commands = pytest {posargs:"-m not download"} +passenv = HOME # For test_compat_expanduser +setenv = + # PYTHONWARNINGS = error # Catches PIP's warnings too + + +[isort] +py_version = 38 +multi_line_output = VERTICAL_HANGING_INDENT +line_length = 80 +reverse_relative = true +ensure_newline_before_comments = true +include_trailing_comma = true +known_first_party = + test