Skip to content

Commit

Permalink
fix(test): fix linting test for good
Browse files Browse the repository at this point in the history
  • Loading branch information
dhdaines committed Aug 16, 2024
1 parent 08df1f6 commit b9d0e65
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 333 deletions.
18 changes: 17 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ classifiers = [
]

[project.optional-dependencies]
tests = [ "pytest>=6,<7", "pylint" ]
tests = [ "pytest", "pylint" ]
docs = [
"mike",
"mkdocstrings[python]",
Expand All @@ -52,3 +52,19 @@ package-dir = {"rustfst" = "rustfst-python/rustfst"}
target = "rustfst.dylib.dylib"
path = "rustfst-ffi/Cargo.toml"
binding = "NoBinding"

[tool.pytest.ini_options]
markers = ["rustfst"]

[tool.pylint.main]
ignore = ["scripts"]
persistent = true
py-version = "3.8"

[tool.pylint."messages control"]
enable = ["indexing-exception", "old-raise-syntax"]
disable = ["design","similarities","no-self-use","attribute-defined-outside-init","locally-disabled","star-args","pointless-except","bad-option-value","global-statement","fixme","suppressed-message","useless-suppression","locally-enabled","no-member","no-name-in-module","import-error","unsubscriptable-object","unbalanced-tuple-unpacking","undefined-variable","not-context-manager","missing-docstring","cyclic-import","redefined-builtin","ungrouped-imports","wrong-import-order","bad-continuation","import-outside-toplevel","line-too-long"]

[tool.pylint.reports]
output-format = "text"
reports = "no"
6 changes: 2 additions & 4 deletions rustfst-python/linting/linting_test.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import os
from pathlib import Path

import pytest
from pylint.lint import Run

ROOT_PATH = Path(__file__).parents[1]
ROOT_PATH = Path(__file__).parent.parent
RCFILEPATH = ROOT_PATH / "linting" / "pylintrc"


def run_linting_test(package):
args = ["--rcfile", str(RCFILEPATH)]
args += all_python_files(package)
args = all_python_files(package)

run = Run(args, exit=False)
assert run.linter.msg_status == 0
Expand Down
326 changes: 0 additions & 326 deletions rustfst-python/linting/pylintrc

This file was deleted.

2 changes: 0 additions & 2 deletions rustfst-python/linting/pytest.ini

This file was deleted.

0 comments on commit b9d0e65

Please sign in to comment.