Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wheel unpack - fix lint issues and drop pylint #136

Merged
merged 5 commits into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ jobs:
- name: ruff
run: |
make ruff
- name: pylint
if: success() || failure()
run: |
make pylint
- name: mypy
if: success() || failure()
run: |
Expand Down
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ help:
"updatedev - update conda development environment\n" \
"\n" \
"--- testing ---\n" \
"pylint - run pylint checks\n" \
"mypy - run mypy type checks\n" \
"check-format - check formatting\n" \
"lint - run all lint checkers\n" \
Expand Down Expand Up @@ -96,13 +95,10 @@ dev-install:
# backward support - just use ruff-format-check instead
black-check: check-format

pylint:
$(CONDA_RUN) pylint src test

mypy:
$(CONDA_RUN) mypy

lint: ruff pylint mypy black-check
lint: ruff mypy black-check

pytest:
$(CONDA_RUN) pytest -s test
Expand Down
3 changes: 1 addition & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ dependencies:
- make >=4.3
# testing
- mypy >=1.8,<2.0
- pylint >=3.0,<4.0
- pytest >=7.4,<8.0
- pytest-cov >=4.1.0,<5.0
- ruff >=0.1.11
- ruff >=0.3.7
- types-pyyaml >=6.0
# documentation
- black >=23.12
Expand Down
46 changes: 0 additions & 46 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,52 +76,6 @@ module = [
]
ignore_missing_imports = true

[tool.pylint.main]
ignore-paths=['^src/whl2conda/external/.*$']

[tool.pylint.build_main]
jobs = 0 # enable parallel checks
py-version = "3.8" # min python version
source-roots = ["src"]

[tool.pylint.design]
max-args = 5
max-attributes = 20
max-bool-expr = 5
max-branches = 12
max-locals = 15
max-parents = 7
max-public-methods = 20
max-returns = 6
max-statements = 50
min-public-methods = 1

[tool.pylint.similarities]
min-similarity-lines = 6

[tool.pylint.variables]
allowed-redefined-builtins = ["help", "license"]

[tool.pylint."messages control"]
disable = [
"bad-inline-option",
"deprecated-pragma",
"file-ignored",
"fixme",
"invalid-name",
"line-too-long",
"locally-disabled",
"raw-checker-failed",
"suppressed-message",
"too-many-arguments",
"trailing-newlines",
"unspecified-encoding",
"use-dict-literal",
"use-symbolic-message-instead",
"useless-suppression",
"wrong-import-order"
]

[tool.ruff]
line-length = 88
exclude = [
Expand Down
5 changes: 3 additions & 2 deletions src/whl2conda/impl/wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@

__all__ = ["unpack_wheel"]


def unpack_wheel(
wheel: Union[Path, str],
dest_dir: Union[Path|str],
dest_dir: Union[Path, str],
*,
logger: Optional[logging.Logger] = None
logger: Optional[logging.Logger] = None,
) -> None:
"""
Unpack wheel into specified directory.
Expand Down
6 changes: 4 additions & 2 deletions test/impl/test_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"""
Unit tests for the whl2conda.impl.wheel module
"""

import platform
import stat
from pathlib import Path
Expand All @@ -23,12 +24,13 @@

from whl2conda.impl.wheel import unpack_wheel

from ..test_packages import setup_wheel
from ..test_packages import setup_wheel # noqa: F401


def test_unpack_wheel(
tmp_path: Path,
caplog: pytest.LogCaptureFixture,
setup_wheel: Path,
setup_wheel: Path, # noqa: F811
) -> None:
"""
Unit test for unpack_wheel
Expand Down
Loading