Skip to content

Commit

Permalink
Lint: Add exceptions for new Pylint rule
Browse files Browse the repository at this point in the history
  • Loading branch information
sanssecours committed Sep 25, 2024
1 parent aeada77 commit 1d22192
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
18 changes: 9 additions & 9 deletions mytoolit/can/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ def notifier(self) -> Notifier:

return self._notifier

# pylint: disable=too-many-arguments
# pylint: disable=too-many-arguments, too-many-positional-arguments

async def _request(
self,
Expand Down Expand Up @@ -695,7 +695,7 @@ async def _request_bluetooth(
message, description=description, response_data=expected_data
)

# pylint: enable=too-many-arguments
# pylint: enable=too-many-arguments, too-many-positional-arguments

async def _request_product_data(
self,
Expand Down Expand Up @@ -2653,7 +2653,7 @@ async def read_eeprom_float(
data = await self.read_eeprom(address, offset, length=4, node=node)
return unpack("<f", bytearray(data))[0]

# pylint: disable=too-many-arguments
# pylint: disable=too-many-arguments, too-many-positional-arguments

async def read_eeprom_int(
self,
Expand Down Expand Up @@ -2712,7 +2712,7 @@ async def read_eeprom_int(
signed=signed,
)

# pylint: enable=too-many-arguments
# pylint: enable=too-many-arguments, too-many-positional-arguments

async def read_eeprom_text(
self,
Expand Down Expand Up @@ -2768,7 +2768,7 @@ async def read_eeprom_text(
data = await self.read_eeprom(address, offset, length, node)
return convert_bytes_to_text(data, until_null=True)

# pylint: disable=too-many-arguments
# pylint: disable=too-many-arguments, too-many-positional-arguments

async def write_eeprom(
self,
Expand Down Expand Up @@ -2854,7 +2854,7 @@ async def write_eeprom(
data = data[4:]
offset += write_length

# pylint: enable=too-many-arguments
# pylint: enable=too-many-arguments, too-many-positional-arguments

async def write_eeprom_float(
self,
Expand Down Expand Up @@ -2903,7 +2903,7 @@ async def write_eeprom_float(
data = list(pack("f", value))
await self.write_eeprom(address, offset, data, node=node)

# pylint: disable=too-many-arguments
# pylint: disable=too-many-arguments, too-many-positional-arguments

async def write_eeprom_int(
self,
Expand Down Expand Up @@ -2961,9 +2961,9 @@ async def write_eeprom_int(
data = list(value.to_bytes(length, byteorder="little", signed=signed))
await self.write_eeprom(address, offset, data, node=node)

# pylint: enable=too-many-arguments
# pylint: enable=too-many-arguments, too-many-positional-arguments

# pylint: disable=too-many-arguments
# pylint: disable=too-many-arguments, too-many-positional-arguments

async def write_eeprom_text(
self,
Expand Down
4 changes: 2 additions & 2 deletions mytoolit/test/production/sth.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ async def test_eeprom():
acceleration_slope = acceleration_max / adc_max
acceleration_offset = -(acceleration_max / 2)

# pylint: disable=too-many-arguments
# pylint: disable=too-many-arguments, too-many-positional-arguments

async def write_read_check(
class_variable, write_routine, value, read_routine, axis, name
Expand All @@ -446,7 +446,7 @@ async def write_read_check(
),
)

# pylint: enable=too-many-arguments
# pylint: enable=too-many-arguments, too-many-positional-arguments

class_variables = (
"acceleration_slope_x",
Expand Down
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ ignore_missing_imports = true
[tool.pylint.main]
ignore-paths = [".*mytoolit\\\\old.*|.*mytoolit/old.*"]

[tool.pylint.design]
max-positional-arguments = 7

[tool.pytest.ini_options]
# - Use doctests
# - Fail after first errors
Expand Down

0 comments on commit 1d22192

Please sign in to comment.