From 36848211400055984cb81f7716360a695168e091 Mon Sep 17 00:00:00 2001 From: Simon Sawicki Date: Sun, 21 Apr 2024 15:08:58 +0200 Subject: [PATCH] Stylistic review --- CONTRIBUTING.md | 10 +++++----- Makefile | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b5559e7fd..adbf28a2c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -145,17 +145,17 @@ If you plan on contributing to `yt-dlp`, you are required to run $ hatch run setup ``` -so that required checks run automatically before a commit (using pre-commit). This will ensure that certain tests are running before a commit, like formatting. A failing test will mean that the commit will be blocked; fix the failing case and try to commit the fixed version again. +to install a `pre-commit` hook so that required checks (linting, formatting) will run automatically before each commit. If any of the checks fail, then the commit will be blocked; you'll need to fix the failing case and then you can commit the fixed version. -After this you can use `hatch shell` to enable a virtual environment that has development dependencies as well as `yt-dlp` installed. Scripts can be used to run simple tasks, like linting or testing, without having to run `hatch shell` first: +After this you can use `hatch shell` to enable a virtual environment that has `yt-dlp` and its development dependencies installed. + +In addition, the following script commands can be used to run simple tasks such as linting or testing (without having to run `hatch shell` first): * `hatch run format`: Format the code according to yt-dlp code standards * `hatch run lint`: Find common issues and automatically fix some of them -* `hatch run fix`: Both format and lint the code +* `hatch run fix`: Automatically fix linter violations and apply required code formatting changes * `hatch run check`: Check if the code is formatted and linted * `hatch run test`: Run extractor or core tests -To automatically fix linter violations as well as format the code, use `hatch run fix`. - You can run scripts for all available and supported python versions sequentially by setting the `TEST_ALL` variable: ```shell $ TEST_ALL=1 hatch run test core diff --git a/Makefile b/Makefile index fb4c637b0..3a8cbf106 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ clean-dist: yt_dlp/extractor/lazy_extractors.py *.spec CONTRIBUTING.md.tmp yt-dlp yt-dlp.exe yt_dlp.egg-info/ AUTHORS clean-cache: find . \( \ - -type d -name '.*_cache' -o -type d -name __pycache__ -o -name "*.pyc" -o -name "*.class" \ + -type d -name ".*_cache" -o -type d -name __pycache__ -o -name "*.pyc" -o -name "*.class" \ \) -prune -exec rm -rf {} \; completion-bash: completions/bash/yt-dlp