From 6953f3c82e09a7c07fbdfae52b9dc13403169c8a Mon Sep 17 00:00:00 2001 From: Istvan Albert Date: Tue, 2 Apr 2024 11:55:13 -0400 Subject: [PATCH] fixing linting errors --- pyproject.toml | 7 +++++++ src/genescape/tree.py | 2 +- src/genescape/utils.py | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e1f2be0..93c7df3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -117,6 +117,10 @@ skip-string-normalization = true [tool.ruff] target-version = "py39" line-length = 120 +exclude = [ + # This a vendored third-party library. + "src/genescape/bottle.py", +] select = [ "A", "ARG", @@ -153,6 +157,9 @@ ignore = [ "S105", "S106", "S107", # Ignore complexity "C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915", + + # Pet peevees + "Q000", "C402", "F401", "E401", "T201", ] unfixable = [ # Don't touch unused imports diff --git a/src/genescape/tree.py b/src/genescape/tree.py index 39ab54e..b52b5da 100644 --- a/src/genescape/tree.py +++ b/src/genescape/tree.py @@ -22,7 +22,7 @@ def build_onto_graph(index): terms = data[utils.IDX_OBO] # Add all nodes to Graph - for name, node in terms.items(): + for key, node in terms.items(): oid = node["id"] name = node["name"] text = textwrap.fill(name, width=20) diff --git a/src/genescape/utils.py b/src/genescape/utils.py index d9137f4..34ed979 100644 --- a/src/genescape/utils.py +++ b/src/genescape/utils.py @@ -1,4 +1,4 @@ -import logging, functools, time, functools +import logging, time, functools import os, gzip, json, csv import sys, pathlib from logging import DEBUG, ERROR, INFO, WARNING