Skip to content

Commit 6f5c517

Browse files
authored
Linters refresh (#28)
1 parent 92bc832 commit 6f5c517

37 files changed

+227
-166
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches: [main]
66
pull_request:
7-
branches: ['*']
7+
branches: ["*"]
88

99
defaults:
1010
run:
@@ -20,7 +20,6 @@ jobs:
2020
- name: Setup Conda Environment
2121
uses: conda-incubator/setup-miniconda@v3
2222
with:
23-
miniforge-variant: Mambaforge
2423
miniforge-version: latest
2524
use-mamba: true
2625
environment-file: ci/requirements-docs.yml

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches: [main]
66
pull_request:
7-
branches: ['*']
7+
branches: ["*"]
88

99
jobs:
1010
checks:

.github/workflows/pytest.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches: [main]
66
pull_request:
7-
branches: ['*']
7+
branches: ["*"]
88
workflow_dispatch: # allows you to trigger manually
99

1010
# When this workflow is queued, automatically cancel any previous running
@@ -19,37 +19,38 @@ defaults:
1919

2020
jobs:
2121
build:
22-
name: ${{ matrix.os }} ${{ matrix.python-version }} ${{ matrix.requirements }}
22+
name:
23+
${{ matrix.os }} ${{ matrix.python-version }} ${{ matrix.requirements }}
2324
runs-on: ${{ matrix.os }}-latest
2425
strategy:
2526
fail-fast: false
2627
matrix:
2728
os: [ubuntu]
28-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
29+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
2930
requirements: [latest]
3031
include:
3132
# Test on macos and windows (first and last version of python only)
3233
- os: macos
33-
python-version: '3.8'
34+
python-version: "3.8"
3435
requirements: latest
3536
- os: macos
36-
python-version: '3.12'
37+
python-version: "3.13"
3738
requirements: latest
3839
- os: windows
39-
python-version: '3.8'
40+
python-version: "3.8"
4041
requirements: latest
4142
- os: windows
42-
python-version: '3.12'
43+
python-version: "3.13"
4344
requirements: latest
4445
# Test on minimal requirements
4546
- os: ubuntu
46-
python-version: '3.8'
47+
python-version: "3.8"
4748
requirements: minimal
4849
- os: macos
49-
python-version: '3.8'
50+
python-version: "3.8"
5051
requirements: minimal
5152
- os: windows
52-
python-version: '3.8'
53+
python-version: "3.8"
5354
requirements: minimal
5455

5556
steps:
@@ -61,7 +62,6 @@ jobs:
6162
- name: Setup Conda Environment
6263
uses: conda-incubator/setup-miniconda@v3
6364
with:
64-
miniforge-variant: Mambaforge
6565
miniforge-version: latest
6666
use-mamba: true
6767
python-version: ${{ matrix.python-version }}

.pre-commit-config.yaml

Lines changed: 52 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,66 @@
11
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: check-added-large-files
6+
- id: check-case-conflict
7+
- id: check-merge-conflict
8+
- id: check-symlinks
9+
- id: check-yaml
10+
- id: debug-statements
11+
- id: end-of-file-fixer
12+
- id: mixed-line-ending
13+
# - id: name-tests-test
14+
# args: ["--pytest-test-first"]
15+
- id: requirements-txt-fixer
16+
- id: trailing-whitespace
17+
18+
- repo: https://github.com/rbubley/mirrors-prettier
19+
rev: v3.4.2
20+
hooks:
21+
- id: prettier
22+
types_or: [yaml, markdown, html, css, scss, javascript, json]
23+
args: [--prose-wrap=always]
24+
225
- repo: https://github.com/MarcoGorelli/absolufy-imports
326
rev: v0.3.1
427
hooks:
528
- id: absolufy-imports
629
name: absolufy-imports
7-
- repo: https://github.com/psf/black
8-
rev: 23.12.1
9-
hooks:
10-
- id: black
11-
language_version: python3
12-
args:
13-
- --target-version=py38
30+
1431
- repo: https://github.com/astral-sh/ruff-pre-commit
15-
rev: v0.1.14
32+
rev: v0.8.4
1633
hooks:
1734
- id: ruff
1835
args: ["--fix", "--show-fixes"]
36+
- id: ruff-format
37+
38+
- repo: https://github.com/codespell-project/codespell
39+
rev: v2.3.0
40+
hooks:
41+
- id: codespell
42+
additional_dependencies:
43+
- tomli
44+
45+
- repo: https://github.com/shellcheck-py/shellcheck-py
46+
rev: "v0.10.0.1"
47+
hooks:
48+
- id: shellcheck
49+
50+
- repo: https://github.com/abravalheri/validate-pyproject
51+
rev: v0.23
52+
hooks:
53+
- id: validate-pyproject
54+
additional_dependencies: ["validate-pyproject-schema-store[all]"]
55+
56+
- repo: https://github.com/python-jsonschema/check-jsonschema
57+
rev: "0.30.0"
58+
hooks:
59+
- id: check-dependabot
60+
- id: check-github-workflows
61+
1962
- repo: https://github.com/pre-commit/mirrors-mypy
20-
rev: v1.8.0
63+
rev: v1.14.0
2164
hooks:
2265
- id: mypy
2366
additional_dependencies:

.readthedocs.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ conda:
99
environment: ci/requirements-docs.yml
1010

1111
python:
12-
install:
13-
- method: pip
14-
path: .
12+
install:
13+
- method: pip
14+
path: .
1515

1616
sphinx:
1717
builder: html

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
pshell: get rid of all bash scripts
2-
===================================
1+
# pshell: get rid of all bash scripts
2+
33
[![doc-badge](https://github.com/crusaderky/pshell/actions/workflows/docs.yml/badge.svg)](https://github.com/crusaderky/pshell/actions)
44
[![pre-commit-badge](https://github.com/crusaderky/pshell/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/crusaderky/pshell/actions)
55
[![pytest-badge](https://github.com/crusaderky/pshell/actions/workflows/pytest.yml/badge.svg)](https://github.com/crusaderky/pshell/actions)
66
[![codecov-badge](https://codecov.io/gh/crusaderky/pshell/branch/main/graph/badge.svg)](https://codecov.io/gh/crusaderky/pshell/branch/main)
77

8-
98
Python API to completely replace bash scripting
109

1110
Full documentation at http://pshell.readthedocs.io/

ci/requirements-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: pshell-docs
22
channels:
33
- conda-forge
44
dependencies:
5-
- python=3.12
5+
- python=3.13
66
- sphinx
77
- sphinx_rtd_theme
88
- psutil

doc/_static/style.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
@import url("theme.css");
22

3-
.wy-side-nav-search>a img.logo,
4-
.wy-side-nav-search .wy-dropdown>a img.logo {
5-
width: 12rem
3+
.wy-side-nav-search > a img.logo,
4+
.wy-side-nav-search .wy-dropdown > a img.logo {
5+
width: 12rem;
66
}
77

88
.wy-side-nav-search {
99
background-color: #eee;
1010
}
1111

12-
.wy-side-nav-search>div.version {
12+
.wy-side-nav-search > div.version {
1313
display: none;
1414
}
1515

doc/_templates/layout.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
{% extends "!layout.html" %}
2-
{% set css_files = css_files + ["_static/style.css"] %}
1+
{% extends "!layout.html" %} {% set css_files = css_files +
2+
["_static/style.css"] %}

doc/api/call.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ Shell commands
66
.. autofunction:: pshell.check_output
77
.. autofunction:: pshell.real_fh
88
.. autoexception:: pshell.CalledProcessError
9-
.. autoexception:: pshell.TimeoutExpired
9+
.. autoexception:: pshell.TimeoutExpired

0 commit comments

Comments
 (0)