Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace black with ruff #365

Merged
merged 120 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
6df20ce
ci: introduce ruff
sujuka99 Sep 26, 2023
b94737f
ci: exclude snapshots
sujuka99 Sep 26, 2023
0833e1b
ci(ruff): ignore F401 in tests/*/__init__.py
sujuka99 Sep 26, 2023
a4c92a7
ci(ruff): fix order
sujuka99 Sep 26, 2023
c8bd70c
ci(ruff): comment out rules in nursery, remove comment
sujuka99 Sep 26, 2023
c7bb733
ci(ruff): Autofix "D"
sujuka99 Sep 26, 2023
6379c78
ci(ruff): improve comments
sujuka99 Sep 26, 2023
c70873c
ci(ruff-pydocstyle): improve rule selection
sujuka99 Sep 26, 2023
738e21b
ci(ruff): autofix "D"
sujuka99 Sep 26, 2023
11a54a5
chore: fix docstrings flagged by "D"
sujuka99 Sep 26, 2023
53ba27d
ci(ruff-pyupgrade): autofix
sujuka99 Sep 26, 2023
d090ff0
chore: manually fix code flagged by "UP"
sujuka99 Sep 26, 2023
feb6df3
chore: update snapshots
sujuka99 Sep 26, 2023
cc06875
ci(ruff): add rule ignores for "B"
sujuka99 Sep 26, 2023
687f37d
ci(ruff): configure "B"
sujuka99 Sep 26, 2023
1b6e29c
chore: manually fix code flagged by "B"
sujuka99 Sep 26, 2023
1621db1
chore: fix code flagged by "INP"
sujuka99 Sep 26, 2023
d0eefab
chore(ruff): fix code flagged by "BLE"
sujuka99 Sep 26, 2023
301284e
ci(ruff-commas): autofix
sujuka99 Sep 26, 2023
c7b3251
chore(ruff-comprehensions): ignore "C408"
sujuka99 Sep 26, 2023
0c2c7c1
ci(ruff-errmsg): autofix "EM"
sujuka99 Sep 26, 2023
0160c08
ci(ruff-pie): autofix
sujuka99 Sep 26, 2023
dd29e3a
ci(ruff-pie): exclude "PIE804"
sujuka99 Sep 26, 2023
49e9e4a
ci(ruff-pytest): autofix "PT"
sujuka99 Sep 26, 2023
b93c3d8
chore(ruff-pytest): manually fix code flagged by "PT"
sujuka99 Sep 26, 2023
9a8678a
ci(ruff-raise): autofix "RSE"
sujuka99 Sep 26, 2023
f90dd22
ci(ruff-return): autofix "RET"
sujuka99 Sep 26, 2023
68b824b
ci(ruff-simplify): autofix "SIM"
sujuka99 Sep 26, 2023
57fd749
ci(ruff-type-checking): disable "TCH" temporarily
sujuka99 Sep 26, 2023
57d9b50
ci(ruff): remove "ARG"
sujuka99 Sep 26, 2023
4e2dd33
ci(ruff-pathlib): autofix "PTH"
sujuka99 Sep 26, 2023
2d8129e
chore(ruff-pathlib): manually fix code flagged by "PTH"
sujuka99 Sep 26, 2023
07bf0f4
chore(ruff-pygrep): manually fix code flagged by "PGH"
sujuka99 Sep 26, 2023
8664342
ci(ruff-pylint): autofix "PL"
sujuka99 Sep 26, 2023
0d65ea8
ci(ruff): ignore "PLW2901"
sujuka99 Sep 26, 2023
54d4b4e
chore(ruff-pylint): manually fix code flagged by "PL"
sujuka99 Sep 26, 2023
8be0263
ci(ruff-tryceratops): autofix "TRY"
sujuka99 Sep 26, 2023
e73f9ab
chore(ruff-tryceratops): manually fix code flagged by "TRY"
sujuka99 Sep 26, 2023
794c60d
chore(pre-commit): pass pre-commit checks
sujuka99 Sep 26, 2023
d3d430d
Merge remote-tracking branch 'origin/main' into ci/introduce-ruff
sujuka99 Sep 26, 2023
14c3c99
chore: lint
sujuka99 Sep 26, 2023
c272a06
ci(ruff): enable "TCH" partly
sujuka99 Sep 26, 2023
750555f
ci(ruff): enable "TCH002"
sujuka99 Sep 26, 2023
502574b
ci(ruff): configure
sujuka99 Sep 26, 2023
31cd2be
chore: remove leftover file
sujuka99 Sep 26, 2023
9d4a761
ci: update workflow
sujuka99 Sep 26, 2023
25b0c08
chore: pass tests
sujuka99 Sep 26, 2023
0b9f26c
ci(ruff-type-checking): Add "TCH001" with proper config
sujuka99 Sep 27, 2023
bdee94d
style: one-liner
sujuka99 Sep 27, 2023
847d4e9
ci(ruff): Ignore COM812
sujuka99 Sep 27, 2023
5a6c3d1
Revert "ci(ruff-commas): autofix"
sujuka99 Sep 27, 2023
1e03e1a
test: whether matcher works
sujuka99 Sep 27, 2023
2fab625
test: problem checker
sujuka99 Sep 27, 2023
e3b7122
fix: ci
sujuka99 Sep 27, 2023
884445f
ci(ruff): format output as "text" in the CI only
sujuka99 Sep 27, 2023
0eb104d
fix(ruff): pre-commit wrong arg
sujuka99 Sep 27, 2023
47b3377
fix: ruff args in pre-commit
sujuka99 Sep 27, 2023
60a500b
fix(ci): ruff pre-commit hook
sujuka99 Sep 27, 2023
571c43f
ci: attempt to fix
sujuka99 Sep 27, 2023
3283ec0
fix: problem matcher regex
sujuka99 Sep 27, 2023
6622b59
fix: regex problem matchr
sujuka99 Sep 27, 2023
797aec7
ci: only lint once with ruff
sujuka99 Sep 27, 2023
fcfbcaf
chore: lint ci
sujuka99 Sep 27, 2023
049a3db
fix(ci): deduplicate pre-commit run
sujuka99 Sep 27, 2023
5229ff1
ci: always run ruff
sujuka99 Sep 27, 2023
ed8b99d
fix(ci): windows
sujuka99 Sep 27, 2023
4a82df1
chore: lint and format
sujuka99 Sep 27, 2023
966dd85
docs: add ruff badge
sujuka99 Sep 27, 2023
2712048
ci(ruff): configure isort
sujuka99 Sep 28, 2023
22409bf
chore(ruff): remove comment
sujuka99 Sep 28, 2023
b255ea3
tests: rewrite snapshots
sujuka99 Oct 2, 2023
2b6ac1b
ci: better access to python version
sujuka99 Oct 2, 2023
d1aeac5
ci: remove ruff-ci pre-commit hook
sujuka99 Oct 2, 2023
c56ef96
ci: remove repeating repo definitions pre-commit
sujuka99 Oct 2, 2023
a2c5a7f
chore: typing
sujuka99 Oct 2, 2023
e673acc
ci: replace black with ruff
sujuka99 Oct 2, 2023
83d9b46
ci: remove black
sujuka99 Oct 2, 2023
1d7a04b
ci: update ruff
sujuka99 Oct 2, 2023
51ce484
Merge remote-tracking branch 'origin/ci/introduce-ruff' into ci/repla…
sujuka99 Oct 3, 2023
8190be7
ci: format with ruff
sujuka99 Oct 3, 2023
b07517b
Merge remote-tracking branch 'origin/main' into ci/replace-black-with…
sujuka99 Oct 21, 2023
713b6a6
chore: upgrade ruff
sujuka99 Oct 21, 2023
e138200
Merge remote-tracking branch 'origin/main' into ci/replace-black-with…
sujuka99 Oct 25, 2023
e9d351f
chore: update and configure ruff
sujuka99 Oct 25, 2023
93cf92e
ci(ruff): adjust
sujuka99 Oct 25, 2023
43cf454
ci: rename ruff lint hook
sujuka99 Oct 25, 2023
b9076e4
fix: ci
sujuka99 Oct 25, 2023
5974578
docs(dev): python code style
sujuka99 Oct 25, 2023
da136a2
style: mroe accurate order of ruff config
sujuka99 Oct 25, 2023
37e52ed
fix: docs
sujuka99 Oct 25, 2023
f6ff99e
docs: Add repository name
sujuka99 Oct 25, 2023
7e7d5e8
docs: structure, add custom admonition
sujuka99 Oct 25, 2023
9b81cfc
docs: create CONTRIBUTING.md
sujuka99 Oct 25, 2023
12616c0
ci: add script that copies contributing into docs
sujuka99 Oct 25, 2023
033ccad
ci: copy file
sujuka99 Oct 25, 2023
a938bdf
ci(dprint): ignore admonition
sujuka99 Oct 25, 2023
7e3d678
ci: format
sujuka99 Oct 25, 2023
e117d14
fix: generated doc formatting
sujuka99 Oct 25, 2023
d2c2813
docs: reword a sentence
sujuka99 Oct 25, 2023
f84641d
fix: ci
sujuka99 Oct 25, 2023
7f876c4
docs: document autogeneration
sujuka99 Oct 25, 2023
1300b4a
fix: path in generated file header
sujuka99 Oct 25, 2023
ce8afab
fix: EOF
sujuka99 Oct 26, 2023
aa8fbe5
chore: update ruff
sujuka99 Oct 31, 2023
27e5eba
style: feedback
sujuka99 Oct 31, 2023
cdc4ce6
ci(pre-commit): Run ruff only on modified files
sujuka99 Oct 31, 2023
ab52824
feat: make copying func generic, hook to copy changelog
sujuka99 Nov 2, 2023
de1346b
chore: lint and format
sujuka99 Nov 2, 2023
e04819a
refactor: add header by default
sujuka99 Nov 2, 2023
520b888
style: remove 1 newline
sujuka99 Nov 2, 2023
982a433
chore: remove space
sujuka99 Nov 2, 2023
ea75e6f
fix: avoid clash between hook and dprint
sujuka99 Nov 2, 2023
3b31813
fix: don't use binary mode
sujuka99 Nov 2, 2023
48ff29b
fix: newline problem
sujuka99 Nov 2, 2023
31fdf62
fix: copying files
sujuka99 Nov 2, 2023
ea8a49c
refactor: use symbolic links instead of scripts
sujuka99 Nov 2, 2023
dfc5824
chore: delete unused files
sujuka99 Nov 2, 2023
6e1c6ac
ci: change target path for changelog
sujuka99 Nov 2, 2023
c00d519
fix: changelog file path
sujuka99 Nov 3, 2023
bc96e7d
docs: remove leftover text, improve title
sujuka99 Nov 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/docs/user/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<!-- This file is autogenerated by hooks/gen_docs/gen_docs_changelog.py. -->

# Changelog
## [2.0.11](https://github.com/bakdata/kpops/releases/tag/2.0.11) - Release Date: [2023-10-24]

Expand Down
2 changes: 1 addition & 1 deletion hooks/gen_docs/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def copy_file(
shutil.copyfileobj(file_source, file_dest)
return
if header is None:
header_encoded = f"<!-- This file is autogenerated by {Path(inspect.stack()[1].filename ).relative_to(ROOT)}. -->\n\n".encode()
header_encoded = f"<!-- This file is autogenerated by {Path(inspect.stack()[1].filename ).relative_to(ROOT)}. -->\n".encode()
sujuka99 marked this conversation as resolved.
Show resolved Hide resolved
else:
header_encoded = header.encode()
with TemporaryFile() as file_header:
Expand Down
Loading