Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
* Do `pre-commit autoupdate`
* `Makefile`:
  * Set `PYTHONPATH` to `pwd` (instead of `.`)
  * `install`: depend on `requirements/dev.txt` "recipe"
  * Whitespace normalization
* `tool.ruff.lint.pydocstyle.convention`: Hint we are actually doing `sphinx`
* Fix (== ignore) errors coming from the update
* Minor linguistic change

Signed-off-by: Stavros Ntentos <[email protected]>
  • Loading branch information
stdedos committed Oct 4, 2024
1 parent e3deae9 commit 1bf53a3
Show file tree
Hide file tree
Showing 5 changed files with 322 additions and 290 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,22 @@ repos:
- --offset
- '2'
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.1
rev: v0.6.8
hooks:
- id: ruff
args:
- --fix
exclude: tests/input/
- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
rev: 1.18.0
hooks:
- id: blacken-docs
additional_dependencies:
- black==23.9.1
- black==24.8.0
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
Expand All @@ -74,7 +74,7 @@ repos:
language: pygrep
types: [python]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.1
rev: v1.11.2
hooks:
- id: mypy
exclude: tests/input/
Expand Down
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Use python executables inside venv
export PATH := .venv/bin:$(PATH)
export PYTHONPATH=.
export PYTHONPATH= `pwd`

# creates the venv
.venv/bin/python3.11:
python3.11 -m venv .venv

# makes sures the venv contains a given version of pip and pip-tools
.venv: .venv/bin/python3.11
pip install --quiet --upgrade 'pip==23.3.1' 'pip-tools==7.3'
pip install --quiet --upgrade 'pip==24.2' 'pip-tools==7.4.1'

# generates a lock file with pinned version of all dependencies to be used by the CI and local devs
requirements/dev.txt: .venv requirements/dev.in
Expand All @@ -30,10 +30,9 @@ upgrade: .venv
pyproject.toml \
requirements/dev.in


# creates the venv if not present then install the dependencies, the package and pre-commit
.PHONY: install
install: .venv
install: .venv requirements/dev.txt
pip-sync requirements/dev.txt
# install pylint_pytest (deps are already handled by the line before)
pip install --no-deps -e .
Expand Down
4 changes: 2 additions & 2 deletions pylint_pytest/checkers/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@


class CustomVariablesChecker(VariablesChecker):
"""Overrides the default VariablesChecker of pylint to discard unwanted warning messages"""
"""Overrides the default VariablesChecker of pylint to discard unwanted warning messages."""

# pylint: disable=protected-access
# this class needs to access the fixture checker registries

def add_message(
def add_message( # pylint: disable=too-many-positional-arguments # Original Signature
self,
msgid: str,
line: int | None = None,
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ ignore = [
]

[tool.ruff.lint.pydocstyle]
# https://github.com/astral-sh/ruff/pull/13286
# XXX: sphinx??
convention = "google"

[tool.ruff.lint.extend-per-file-ignores]
Expand Down
Loading

0 comments on commit 1bf53a3

Please sign in to comment.