Skip to content

Commit

Permalink
Re-enable ruff in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
malmeloo committed Feb 8, 2024
1 parent 246b407 commit e18e179
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
1 change: 0 additions & 1 deletion examples/device_scanner.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# ruff: noqa: T201, D103
import asyncio
import logging

Expand Down
1 change: 0 additions & 1 deletion examples/fetch_reports.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# ruff: noqa: T201, D103, S101
import json
import logging
from pathlib import Path
Expand Down
1 change: 0 additions & 1 deletion examples/fetch_reports_async.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# ruff: noqa: T201, D103, S101
import asyncio
import json
import logging
Expand Down
3 changes: 1 addition & 2 deletions examples/real_airtag.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# ruff: noqa: T201, D103, S101
"""
Example showing how to retrieve the primary key of your own AirTag, or any other FindMy-accessory.
Expand Down Expand Up @@ -39,7 +38,7 @@ def main() -> None:
lookup_time = paired_at.replace(
minute=paired_at.minute // 15 * 15,
second=0,
microsecond=0
microsecond=0,
) + timedelta(minutes=15)

while lookup_time < now:
Expand Down
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ sphinx-autoapi = "^3.0.0"

[tool.ruff]
exclude = [
"examples/",
"docs/",
]

Expand All @@ -45,6 +44,14 @@ ignore = [

line-length = 100

[tool.ruff.lint.per-file-ignores]
"examples/*" = [
"T201", # use of "print"
"S101", # use of "assert"
"D", # documentation
"INP001", # namespacing
]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

0 comments on commit e18e179

Please sign in to comment.