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

Apply assorted repo-review rules #1063

Merged
merged 6 commits into from
Aug 6, 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
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
Loading