From 57074870979662fa9d0029f9dd72b29657d7af38 Mon Sep 17 00:00:00 2001 From: Kevin Meagher <11620178+kjmeagher@users.noreply.github.com> Date: Tue, 20 Aug 2024 12:19:51 -0500 Subject: [PATCH] move line length back to 108 remove pylint --- .pre-commit-config.yaml | 7 ------- ehist/bayesian_blocks.py | 1 - ehist/hist1d.py | 4 ++-- examples/plot_ehist.py | 2 +- pyproject.toml | 15 +++++---------- 5 files changed, 8 insertions(+), 21 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 48b75ca..80af8ed 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,13 +16,6 @@ repos: - id: ruff args: [--fix, --show-fixes] - id: ruff-format - - repo: https://github.com/pycqa/pylint - rev: v3.2.6 - hooks: - - id: pylint - files: ehist - args: [--ignore=E401] - additional_dependencies: [numpy, matplotlib] - repo: https://github.com/fsfe/reuse-tool rev: v4.0.3 hooks: diff --git a/ehist/bayesian_blocks.py b/ehist/bayesian_blocks.py index 08994e7..824a0a6 100644 --- a/ehist/bayesian_blocks.py +++ b/ehist/bayesian_blocks.py @@ -2,7 +2,6 @@ # # SPDX-License-Identifier: BSD-2-Clause -# pylint: skip-file # Licensed under a 3-clause BSD style license - see LICENSE.rst """Bayesian Blocks for Time Series Analysis diff --git a/ehist/hist1d.py b/ehist/hist1d.py index bab76bb..de75caa 100644 --- a/ehist/hist1d.py +++ b/ehist/hist1d.py @@ -8,8 +8,8 @@ import numpy as np import pylab as plt -from scipy import integrate, optimize # pylint: disable=import-error -from scipy.stats import poisson # pylint: disable=import-error +from scipy import integrate, optimize +from scipy.stats import poisson from .axis import IntAxis, LogIntAxis, auto_axis from .util import HorizontalPlot, VerticalPlot, handle_weights diff --git a/examples/plot_ehist.py b/examples/plot_ehist.py index 20614fd..b74a4ae 100755 --- a/examples/plot_ehist.py +++ b/examples/plot_ehist.py @@ -8,7 +8,7 @@ import numpy as np import pylab as plt -from scipy import stats # pylint: disable=import-error +from scipy import stats from ehist import Hist1D as h1 diff --git a/pyproject.toml b/pyproject.toml index 3c02b37..e29b010 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,13 +39,11 @@ test = ["pytest", "pytest-cov"] testpaths = ["tests"] addopts = ["--cov"] -[tool.pylint.messages_control] -disable = "C0103,C0104,C0114,C0115,C0116,W0603,R0902,R0903,R0912,R0913,R0914,W0201,W0622" - -[tool.pylint.format] -max-line-length = "128" - [tool.ruff] +line-length = 108 +target-version = "py38" + +[tool.ruff.lint] select = ["ALL"] ignore = [ "D", # pydocstyle @@ -57,12 +55,9 @@ ignore = [ "PLR0912", # Too many branches "ERA001", # Found commented-out code ] -line-length = 128 -target-version = "py38" fixable = ["I"] - -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "ehist/bayesian_blocks.py" = [ "N","A","RET","EM","TRY","PLR","ISC","B","FBT" ]