Skip to content

Commit

Permalink
Merge pull request #1063 from DimitriPapadopoulos/repo-review
Browse files Browse the repository at this point in the history
Apply assorted repo-review rules
  • Loading branch information
RonnyPfannschmidt authored Aug 6, 2024
2 parents 4d0d50b + 4a48455 commit 6eb52e6
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 8 deletions.
11 changes: 8 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ repos:
rev: v0.3.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
- id: ruff-format

- repo: https://github.com/tox-dev/pyproject-fmt
rev: "1.7.0"
rev: 1.7.0
hooks:
- id: pyproject-fmt
exclude: docs/examples/

- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.9.0'
rev: v1.9.0
hooks:
- id: mypy
args: [--strict]
Expand All @@ -31,3 +31,8 @@ repos:
- importlib_metadata
- typing-extensions>=4.5
- rich

- repo: https://github.com/scientific-python/cookie
rev: 2024.04.23
hooks:
- id: sp-repo-review
1 change: 1 addition & 0 deletions _own_version_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from typing import Callable

from setuptools import build_meta as build_meta

from setuptools_scm import Configuration
from setuptools_scm import _types as _t
from setuptools_scm import get_version
Expand Down
1 change: 1 addition & 0 deletions docs/examples/version_scheme_code/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import annotations

from setuptools import setup

from setuptools_scm import ScmVersion


Expand Down
9 changes: 7 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ version = { attr = "_own_version_helper.version"}
[tool.setuptools_scm]

[tool.ruff]
src = ["src"]
fix = true
lint.select = ["E", "F", "B", "U", "YTT", "C", "DTZ", "PYI", "PT", "I", "FURB", "RUF"]
lint.select = ["E", "F", "B", "UP", "YTT", "C", "DTZ", "PYI", "PT", "I", "FURB", "RUF"]
lint.ignore = ["B028"]
lint.preview = true

Expand All @@ -127,7 +128,11 @@ from-first = false
lines-between-types = 1
order-by-type = true

[tool.repo-review]
ignore = ["PP305", "GH103", "GH212", "MY100", "PC111", "PC160", "PC170", "PC180", "PC901"]

[tool.pytest.ini_options]
minversion = "7"
testpaths = ["testing"]
filterwarnings = [
"error",
Expand All @@ -137,7 +142,7 @@ filterwarnings = [
log_level = "debug"
log_cli_level = "info"
# disable unraisable until investigated
addopts = ["-p", "no:unraisableexception"]
addopts = ["-ra", "--strict-config", "--strict-markers", "-p", "no:unraisableexception"]
markers = [
"issue(id): reference to github issue",
"skip_commit: allows to skip committing in the helpers",
Expand Down
2 changes: 1 addition & 1 deletion testing/test_basic_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from pathlib import Path

import pytest

import setuptools_scm

from setuptools_scm import Configuration
Expand All @@ -15,7 +16,6 @@
from setuptools_scm.integration import data_from_mime
from setuptools_scm.version import ScmVersion
from setuptools_scm.version import meta

from testing.wd_wrapper import WorkDir

c = Configuration()
Expand Down
1 change: 1 addition & 0 deletions testing/test_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from unittest.mock import patch

import pytest

import setuptools_scm._file_finders

from setuptools_scm import Configuration
Expand Down
1 change: 0 additions & 1 deletion testing/test_hg_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from setuptools_scm._run_cmd import has_command
from setuptools_scm._run_cmd import run

from testing.wd_wrapper import WorkDir


Expand Down
1 change: 1 addition & 0 deletions testing/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from pathlib import Path

import pytest

import setuptools_scm._integration.setuptools

from setuptools_scm import Configuration
Expand Down
2 changes: 1 addition & 1 deletion testing/test_mercurial.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from pathlib import Path

import pytest

import setuptools_scm._file_finders

from setuptools_scm import Configuration
Expand All @@ -13,7 +14,6 @@
from setuptools_scm.hg import archival_to_version
from setuptools_scm.hg import parse
from setuptools_scm.version import format_version

from testing.wd_wrapper import WorkDir

pytestmark = pytest.mark.skipif(
Expand Down

0 comments on commit 6eb52e6

Please sign in to comment.