Skip to content

Commit 5131e31

Browse files
Fix some ARG002 per file ignores (TheAlgorithms#11382)
* Fix some ARG002 per file ignores * Fix * updating DIRECTORY.md * Fix review issue * Fix review issue --------- Co-authored-by: MaximSmolskiy <[email protected]>
1 parent c026b19 commit 5131e31

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

Diff for: DIRECTORY.md

+1
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,7 @@
773773
* [Inverse Of Matrix](matrix/inverse_of_matrix.py)
774774
* [Largest Square Area In Matrix](matrix/largest_square_area_in_matrix.py)
775775
* [Matrix Class](matrix/matrix_class.py)
776+
* [Matrix Equalization](matrix/matrix_equalization.py)
776777
* [Matrix Multiplication Recursion](matrix/matrix_multiplication_recursion.py)
777778
* [Matrix Operation](matrix/matrix_operation.py)
778779
* [Max Area Of Island](matrix/max_area_of_island.py)

Diff for: audio_filters/show_response.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
from abc import abstractmethod
34
from math import pi
45
from typing import Protocol
56

@@ -8,14 +9,14 @@
89

910

1011
class FilterType(Protocol):
12+
@abstractmethod
1113
def process(self, sample: float) -> float:
1214
"""
1315
Calculate y[n]
1416
1517
>>> issubclass(FilterType, Protocol)
1618
True
1719
"""
18-
return 0.0
1920

2021

2122
def get_bounds(

Diff for: data_structures/hashing/hash_table.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/env python3
2+
from abc import abstractmethod
3+
24
from .number_theory.prime_numbers import next_prime
35

46

@@ -173,6 +175,7 @@ def _set_value(self, key, data):
173175
self.values[key] = data
174176
self._keys[key] = data
175177

178+
@abstractmethod
176179
def _collision_resolution(self, key, data=None):
177180
"""
178181
This method is a type of open addressing which is used for handling collision.

Diff for: data_structures/hashing/quadratic_probing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class QuadraticProbing(HashTable):
1111
def __init__(self, *args, **kwargs):
1212
super().__init__(*args, **kwargs)
1313

14-
def _collision_resolution(self, key, data=None):
14+
def _collision_resolution(self, key, data=None): # noqa: ARG002
1515
"""
1616
Quadratic probing is an open addressing scheme used for resolving
1717
collisions in hash table.

Diff for: pyproject.toml

-3
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,8 @@ max-complexity = 17 # default: 10
7676

7777
[tool.ruff.lint.per-file-ignores]
7878
"arithmetic_analysis/newton_raphson.py" = ["PGH001"]
79-
"audio_filters/show_response.py" = ["ARG002"]
8079
"data_structures/binary_tree/binary_search_tree_recursive.py" = ["BLE001"]
8180
"data_structures/binary_tree/treap.py" = ["SIM114"]
82-
"data_structures/hashing/hash_table.py" = ["ARG002"]
83-
"data_structures/hashing/quadratic_probing.py" = ["ARG002"]
8481
"data_structures/hashing/tests/test_hash_map.py" = ["BLE001"]
8582
"data_structures/heap/max_heap.py" = ["SIM114"]
8683
"graphs/minimum_spanning_tree_prims.py" = ["SIM114"]

0 commit comments

Comments
 (0)