mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-17 15:43:28 +02:00
ruff: enable PTH lint
This commit is contained in:
@@ -19,7 +19,7 @@ from media_manager.torrent.schemas import Torrent
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def list_files_recursively(path: Path = Path(".")) -> list[Path]:
|
||||
def list_files_recursively(path: Path = Path()) -> list[Path]:
|
||||
files = list(path.glob("**/*"))
|
||||
log.debug(f"Found {len(files)} entries via glob")
|
||||
valid_files = []
|
||||
@@ -158,8 +158,7 @@ def get_torrent_hash(torrent: IndexerQueryResult) -> str:
|
||||
raise
|
||||
|
||||
# saving the torrent file
|
||||
with open(torrent_filepath, "wb") as file:
|
||||
file.write(torrent_content)
|
||||
torrent_filepath.write_bytes(torrent_content)
|
||||
|
||||
# parsing info hash
|
||||
log.debug(f"parsing torrent file: {torrent.download_url}")
|
||||
|
||||
@@ -5,7 +5,7 @@ line-ending = "lf"
|
||||
quote-style = "double"
|
||||
|
||||
[lint]
|
||||
# to be enabled: ANN, BLE, C90, CPY, D, DOC, DTZ, FBT, G, PL, PTH, RET, RSE, SLF, SIM, TC, TRY, UP
|
||||
# to be enabled: ANN, BLE, C90, CPY, D, DOC, DTZ, FBT, G, PL, RET, RSE, SLF, SIM, TC, TRY, UP
|
||||
extend-select = [
|
||||
"A", "ARG", "ASYNC",
|
||||
"B",
|
||||
@@ -16,7 +16,7 @@ extend-select = [
|
||||
"I", "ICN", "INP", "INT", "ISC",
|
||||
"LOG",
|
||||
"N",
|
||||
"PERF", "PGH", "PIE", "PT", "PYI",
|
||||
"PERF", "PGH", "PIE", "PT", "PTH", "PYI",
|
||||
"Q",
|
||||
"RUF",
|
||||
"S", "SLOT",
|
||||
|
||||
Reference in New Issue
Block a user