Fix some ARG002 per file ignores (#11382)

* Fix some ARG002 per file ignores

* Fix

* updating DIRECTORY.md

* Fix review issue

* Fix review issue

---------

Co-authored-by: MaximSmolskiy <MaximSmolskiy@users.noreply.github.com>
This commit is contained in:
Maxim Smolskiy 2024-05-01 22:27:59 +03:00 committed by GitHub
parent c026b1952f
commit 5131e3145d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 7 additions and 5 deletions

View File

@ -773,6 +773,7 @@
* [Inverse Of Matrix](matrix/inverse_of_matrix.py) * [Inverse Of Matrix](matrix/inverse_of_matrix.py)
* [Largest Square Area In Matrix](matrix/largest_square_area_in_matrix.py) * [Largest Square Area In Matrix](matrix/largest_square_area_in_matrix.py)
* [Matrix Class](matrix/matrix_class.py) * [Matrix Class](matrix/matrix_class.py)
* [Matrix Equalization](matrix/matrix_equalization.py)
* [Matrix Multiplication Recursion](matrix/matrix_multiplication_recursion.py) * [Matrix Multiplication Recursion](matrix/matrix_multiplication_recursion.py)
* [Matrix Operation](matrix/matrix_operation.py) * [Matrix Operation](matrix/matrix_operation.py)
* [Max Area Of Island](matrix/max_area_of_island.py) * [Max Area Of Island](matrix/max_area_of_island.py)

View File

@ -1,5 +1,6 @@
from __future__ import annotations from __future__ import annotations
from abc import abstractmethod
from math import pi from math import pi
from typing import Protocol from typing import Protocol
@ -8,6 +9,7 @@ import numpy as np
class FilterType(Protocol): class FilterType(Protocol):
@abstractmethod
def process(self, sample: float) -> float: def process(self, sample: float) -> float:
""" """
Calculate y[n] Calculate y[n]
@ -15,7 +17,6 @@ class FilterType(Protocol):
>>> issubclass(FilterType, Protocol) >>> issubclass(FilterType, Protocol)
True True
""" """
return 0.0
def get_bounds( def get_bounds(

View File

@ -1,4 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
from abc import abstractmethod
from .number_theory.prime_numbers import next_prime from .number_theory.prime_numbers import next_prime
@ -173,6 +175,7 @@ class HashTable:
self.values[key] = data self.values[key] = data
self._keys[key] = data self._keys[key] = data
@abstractmethod
def _collision_resolution(self, key, data=None): def _collision_resolution(self, key, data=None):
""" """
This method is a type of open addressing which is used for handling collision. This method is a type of open addressing which is used for handling collision.

View File

@ -11,7 +11,7 @@ class QuadraticProbing(HashTable):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
def _collision_resolution(self, key, data=None): def _collision_resolution(self, key, data=None): # noqa: ARG002
""" """
Quadratic probing is an open addressing scheme used for resolving Quadratic probing is an open addressing scheme used for resolving
collisions in hash table. collisions in hash table.

View File

@ -76,11 +76,8 @@ max-complexity = 17 # default: 10
[tool.ruff.lint.per-file-ignores] [tool.ruff.lint.per-file-ignores]
"arithmetic_analysis/newton_raphson.py" = ["PGH001"] "arithmetic_analysis/newton_raphson.py" = ["PGH001"]
"audio_filters/show_response.py" = ["ARG002"]
"data_structures/binary_tree/binary_search_tree_recursive.py" = ["BLE001"] "data_structures/binary_tree/binary_search_tree_recursive.py" = ["BLE001"]
"data_structures/binary_tree/treap.py" = ["SIM114"] "data_structures/binary_tree/treap.py" = ["SIM114"]
"data_structures/hashing/hash_table.py" = ["ARG002"]
"data_structures/hashing/quadratic_probing.py" = ["ARG002"]
"data_structures/hashing/tests/test_hash_map.py" = ["BLE001"] "data_structures/hashing/tests/test_hash_map.py" = ["BLE001"]
"data_structures/heap/max_heap.py" = ["SIM114"] "data_structures/heap/max_heap.py" = ["SIM114"]
"graphs/minimum_spanning_tree_prims.py" = ["SIM114"] "graphs/minimum_spanning_tree_prims.py" = ["SIM114"]