Replace flake8 with ruff (#8184) · ashapochka/TheAlgorithmsPython@521fbca · GitHub
Skip to content

Commit 521fbca

Browse files
authored
Replace flake8 with ruff (TheAlgorithms#8184)
1 parent c96241b commit 521fbca

9 files changed

Lines changed: 20 additions & 19 deletions

File tree

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions

audio_filters/equal_loudness_filter.py.broken.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class EqualLoudnessFilter:
2020
samplerate, use with caution.
2121

2222
Code based on matlab implementation at https://bit.ly/3eqh2HU
23-
(url shortened for flake8)
23+
(url shortened for ruff)
2424

2525
Target curve: https://i.imgur.com/3g2VfaM.png
2626
Yulewalk response: https://i.imgur.com/J9LnJ4C.png

data_structures/binary_tree/red_black_tree.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
2-
python/black : true
3-
flake8 : passed
2+
psf/black : true
3+
ruff : passed
44
"""
55
from __future__ import annotations
66

digital_image_processing/change_contrast.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
This algorithm is used in
55
https://noivce.pythonanywhere.com/ Python web app.
66
7-
python/black: True
8-
flake8 : True
7+
psf/black: True
8+
ruff : True
99
"""
1010

1111
from PIL import Image

maths/is_square_free.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
References: wikipedia:square free number
3-
python/black : True
4-
flake8 : True
3+
psf/black : True
4+
ruff : True
55
"""
66
from __future__ import annotations
77

maths/mobius_function.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"""
22
References: https://en.wikipedia.org/wiki/M%C3%B6bius_function
33
References: wikipedia:square free number
4-
python/black : True
5-
flake8 : True
4+
psf/black : True
5+
ruff : True
66
"""
77

88
from maths.is_square_free import is_square_free

other/linear_congruential_generator.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ class LinearCongruentialGenerator:
99
"""
1010

1111
# The default value for **seed** is the result of a function call which is not
12-
# normally recommended and causes flake8-bugbear to raise a B008 error. However,
13-
# in this case, it is accptable because `LinearCongruentialGenerator.__init__()`
14-
# will only be called once per instance and it ensures that each instance will
15-
# generate a unique sequence of numbers.
12+
# normally recommended and causes ruff to raise a B008 error. However, in this case,
13+
# it is accptable because `LinearCongruentialGenerator.__init__()` will only be
14+
# called once per instance and it ensures that each instance will generate a unique
15+
# sequence of numbers.
1616

1717
def __init__(self, multiplier, increment, modulo, seed=int(time())): # noqa: B008
1818
"""

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ select = [ # https://beta.ruff.rs/docs/rules
5656
"W", # W: pycodestyle warnings
5757
"YTT", # YTT: year 2020
5858
]
59+
show-source = true
5960
target-version = "py311"
6061

6162
[tool.ruff.mccabe] # DO NOT INCREASE THIS VALUE

quantum/ripple_adder_classic.py

Lines changed: 3 additions & 3 deletions

0 commit comments

Comments
 (0)