diff options
| author | Peter Pentchev <roam@ringlet.net> | 2024-09-10 23:49:05 +0300 |
|---|---|---|
| committer | Peter Pentchev <roam@ringlet.net> | 2024-09-11 21:32:24 +0300 |
| commit | 7b0cce752eca91696664c2bb0de3c5e0395f3fda (patch) | |
| tree | 9f9c62c53aecdc669cec6ff05d19a478b0895bf7 /challenge-286/ppentchev/python/ruff-base.toml | |
| parent | cbf28e6e924b7cd24d1614a5ad28d801f0e85dea (diff) | |
| download | perlweeklychallenge-club-7b0cce752eca91696664c2bb0de3c5e0395f3fda.tar.gz perlweeklychallenge-club-7b0cce752eca91696664c2bb0de3c5e0395f3fda.tar.bz2 perlweeklychallenge-club-7b0cce752eca91696664c2bb0de3c5e0395f3fda.zip | |
Add Peter Pentchev's Python solutions to 286
Also fix a couple of things in the other files:
- make the TAP test functions accept an arrayref for the command to run
instead of a single string, since we want to run the Python solution using
`python3 -B -u /path/to/the/program`
- fix the use of Test::More::skip() in the Self Spammer test function
- fix a shadowed variable in the Order Game test function
- correct the indentation in the documentation's "Implementation details" section
- make the README file a copy of docs/index.md instead of a wrong copy of
a completely different project's README file
- point blog.txt to the Ringlet copy of this challenge's documentation
Diffstat (limited to 'challenge-286/ppentchev/python/ruff-base.toml')
| -rw-r--r-- | challenge-286/ppentchev/python/ruff-base.toml | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/challenge-286/ppentchev/python/ruff-base.toml b/challenge-286/ppentchev/python/ruff-base.toml new file mode 100644 index 0000000000..03cd7fa385 --- /dev/null +++ b/challenge-286/ppentchev/python/ruff-base.toml @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: Peter Pentchev <roam@ringlet.net> +# SPDX-License-Identifier: BSD-2-Clause + +target-version = "py311" +line-length = 100 + +[lint] +select = [] +ignore = [ + # No blank lines before the class docstring, TYVM + "D203", + + # The multi-line docstring summary starts on the same line + "D213", + + # We do not document everything in the docstring + "DOC201", + "DOC402", + "DOC501", + + # The /x regex modifier is common enough in many languages + "FURB167", +] + +[lint.flake8-copyright] +notice-rgx = "(?x) SPDX-FileCopyrightText: \\s \\S" + +[lint.isort] +force-single-line = true +known-first-party = ["pwc_286"] +lines-after-imports = 2 +single-line-exclusions = ["collections.abc", "typing"] + +[lint.per-file-ignores] +# This is a command-line tool; console output is part of its job. +"src/pwc_286/__main__.py" = ["T201"] + +# This is a test suite +"tests/unit/**.py" = ["S101", "T201"] |
