Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit385c314

Browse files
committed
Merge branch 'sh'
2 parentsb27a89f +c2472e9 commit385c314

26 files changed

+482
-335
lines changed

‎.flake8

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,26 @@
11
[flake8]
2+
23
show-source = True
3-
count= True
4+
count= True
45
statistics = True
5-
# E265 = comment blocks like @{ section, which it can't handle
6+
67
# E266 = too many leading '#' for block comment
78
# E731 = do not assign a lambda expression, use a def
8-
# W293 = Blank line contains whitespace
9-
# W504 = Line break after operator
10-
# E704 = multiple statements in one line - used for @override
119
# TC002 = move third party import to TYPE_CHECKING
12-
# ANN = flake8-annotations
1310
# TC, TC2 = flake8-type-checking
14-
# D = flake8-docstrings
1511

1612
# select = C,E,F,W ANN, TC, TC2 # to enable code. Disabled if not listed, including builtin codes
1713
enable-extensions = TC, TC2# only needed for extensions not enabled by default
1814

19-
ignore = E265,E266,E731,E704,
20-
W293, W504,
21-
ANN0 ANN1 ANN2,
22-
TC002,
23-
TC0, TC1, TC2
24-
# B,
25-
A,
26-
D,
27-
RST, RST3
15+
ignore = E266, E731
2816

29-
exclude = .tox,.venv,build,dist,doc,git/ext/
17+
exclude = .tox,.venv,build,dist,doc,git/ext/
3018

3119
rst-roles =# for flake8-RST-docstrings
32-
attr,class,func,meth,mod,obj,ref,term,var# used by sphinx
20+
attr,class,func,meth,mod,obj,ref,term,var# used by sphinx
3321

3422
min-python-version = 3.7.0
3523

3624
# for `black` compatibility
3725
max-line-length = 120
38-
extend-ignore = E203,W503
26+
extend-ignore = E203,W503

‎.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ updates:
33
-package-ecosystem:"github-actions"
44
directory:"/"
55
schedule:
6-
interval:"weekly"
6+
interval:"weekly"

‎.github/workflows/cygwin-test.yml

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,24 @@ on: [push, pull_request, workflow_dispatch]
55
jobs:
66
build:
77
runs-on:windows-latest
8+
89
strategy:
910
fail-fast:false
11+
1012
env:
1113
CHERE_INVOKING:1
12-
SHELLOPTS:igncr
1314
TMP:"/tmp"
1415
TEMP:"/tmp"
16+
1517
defaults:
1618
run:
17-
shell:bash.exe --noprofile --norc -exo pipefail -o igncr "{0}"
19+
shell:C:\cygwin\bin\bash.exe --noprofile --norc -exo pipefail -o igncr "{0}"
1820

1921
steps:
2022
-name:Force LF line endings
21-
run:git config --global core.autocrlf input
23+
run:|
24+
git config --global core.autocrlf false # Affects the non-Cygwin git.
25+
shell:bash
2226

2327
-uses:actions/checkout@v4
2428
with:
@@ -29,36 +33,42 @@ jobs:
2933
with:
3034
packages:python39 python39-pip python39-virtualenv git
3135

32-
-name:Show python and git versions
36+
-name:Special configuration for Cygwin's git
3337
run:|
34-
/usr/bin/python --version
35-
/usr/bin/git version
36-
37-
-name:Tell git to trust this repo
38-
run:|
39-
/usr/bin/git config --global --add safe.directory "$(pwd)"
38+
git config --global --add safe.directory "$(pwd)"
39+
git config --global core.autocrlffalse
4040
4141
-name:Prepare this repo for tests
4242
run:|
43-
TRAVIS=yes./init-tests-after-clone.sh
43+
./init-tests-after-clone.sh
4444
45-
-name:Further preparegitconfigurationfor tests
45+
-name:Setgituser identity and command aliasesfor the tests
4646
run:|
47-
/usr/bin/git config --global user.email "travis@ci.com"
48-
/usr/bin/git config --global user.name "Travis Runner"
47+
git config --global user.email "travis@ci.com"
48+
git config --global user.name "Travis Runner"
4949
# If we rewrite the user's config by accident, we will mess it up
5050
# and cause subsequent tests to fail
5151
cat test/fixtures/.gitconfig >> ~/.gitconfig
5252
5353
-name:Update PyPA packages
5454
run:|
55-
/usr/bin/python -m pip install --upgrade pip setuptools wheel
55+
# Get the latest pip, wheel, and prior to Python 3.12, setuptools.
56+
python -m pip install -U pip $(pip freeze --all | grep -oF setuptools) wheel
5657
5758
-name:Install project and test dependencies
5859
run:|
59-
/usr/bin/python -m pip install ".[test]"
60+
python -m pip install ".[test]"
61+
62+
-name:Show version and platform information
63+
run:|
64+
uname -a
65+
command -v git python
66+
git version
67+
python --version
68+
python -c 'import sys; print(sys.platform)'
69+
python -c 'import os; print(os.name)'
70+
python -c 'import git; print(git.compat.is_win)'
6071
6172
-name:Test with pytest
6273
run:|
63-
set +x
64-
/usr/bin/python -m pytest
74+
python -m pytest --color=yes -p no:sugar --instafail -vv

‎.github/workflows/lint.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@ jobs:
77
runs-on:ubuntu-latest
88

99
steps:
10-
-uses:actions/checkout@v4
11-
-uses:actions/setup-python@v4
12-
with:
13-
python-version:"3.x"
14-
-uses:pre-commit/action@v3.0.0
10+
-uses:actions/checkout@v4
11+
12+
-uses:actions/setup-python@v4
13+
with:
14+
python-version:"3.x"
15+
16+
-uses:pre-commit/action@v3.0.0
17+
with:
18+
extra_args:--all-files --hook-stage manual
19+
env:
20+
SKIP:black-format

‎.github/workflows/pythonpackage.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,15 @@ permissions:
1010

1111
jobs:
1212
build:
13-
1413
runs-on:ubuntu-latest
14+
1515
strategy:
1616
fail-fast:false
1717
matrix:
1818
python-version:["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
1919
include:
20-
-experimental:false
21-
-python-version:"3.12"
22-
experimental:true
20+
-experimental:false
21+
2322
defaults:
2423
run:
2524
shell:/bin/bash --noprofile --norc -exo pipefail {0}
@@ -36,16 +35,11 @@ jobs:
3635
python-version:${{ matrix.python-version }}
3736
allow-prereleases:${{ matrix.experimental }}
3837

39-
-name:Show python and git versions
40-
run:|
41-
python --version
42-
git version
43-
4438
-name:Prepare this repo for tests
4539
run:|
46-
TRAVIS=yes./init-tests-after-clone.sh
40+
./init-tests-after-clone.sh
4741
48-
-name:Prepare gitconfigurationfor tests
42+
-name:Set gituser identity and command aliasesfor the tests
4943
run:|
5044
git config --global user.email "travis@ci.com"
5145
git config --global user.name "Travis Runner"
@@ -55,17 +49,23 @@ jobs:
5549
5650
-name:Update PyPA packages
5751
run:|
58-
python -m pip install --upgrade pip
59-
if pip freeze --all | grep --quiet '^setuptools=='; then
60-
# Python prior to 3.12 ships setuptools. Upgrade it if present.
61-
python -m pip install --upgrade setuptools
62-
fi
63-
python -m pip install --upgrade wheel
52+
# Get the latest pip, wheel, and prior to Python 3.12, setuptools.
53+
python -m pip install -U pip $(pip freeze --all | grep -oF setuptools) wheel
6454
6555
-name:Install project and test dependencies
6656
run:|
6757
pip install ".[test]"
6858
59+
-name:Show version and platform information
60+
run:|
61+
uname -a
62+
command -v git python
63+
git version
64+
python --version
65+
python -c 'import sys; print(sys.platform)'
66+
python -c 'import os; print(os.name)'
67+
python -c 'import git; print(git.compat.is_win)'
68+
6969
-name:Check types with mypy
7070
run:|
7171
mypy -p git
@@ -75,7 +75,7 @@ jobs:
7575

7676
-name:Test with pytest
7777
run:|
78-
pytest
78+
pytest --color=yes -p no:sugar --instafail -vv
7979
continue-on-error:false
8080

8181
-name:Documentation

‎.pre-commit-config.yaml

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,39 @@
11
repos:
2-
-repo:https://github.com/PyCQA/flake8
3-
rev:6.1.0
4-
hooks:
5-
-id:flake8
6-
additional_dependencies:
7-
[
8-
flake8-bugbear==23.9.16,
9-
flake8-comprehensions==3.14.0,
10-
flake8-typing-imports==1.14.0,
11-
]
12-
exclude:^doc|^git/ext/
2+
-repo:https://github.com/psf/black-pre-commit-mirror
3+
rev:23.9.1
4+
hooks:
5+
-id:black
6+
alias:black-check
7+
name:black (check)
8+
args:[--check, --diff]
9+
exclude:^git/ext/
10+
stages:[manual]
1311

14-
-repo:https://github.com/pre-commit/pre-commit-hooks
15-
rev:v4.4.0
16-
hooks:
17-
-id:check-merge-conflict
18-
-id:check-toml
19-
-id:check-yaml
12+
-id:black
13+
alias:black-format
14+
name:black (format)
15+
exclude:^git/ext/
16+
17+
-repo:https://github.com/PyCQA/flake8
18+
rev:6.1.0
19+
hooks:
20+
-id:flake8
21+
additional_dependencies:
22+
-flake8-bugbear==23.9.16
23+
-flake8-comprehensions==3.14.0
24+
-flake8-typing-imports==1.14.0
25+
exclude:^doc|^git/ext/
26+
27+
-repo:https://github.com/shellcheck-py/shellcheck-py
28+
rev:v0.9.0.5
29+
hooks:
30+
-id:shellcheck
31+
args:[--color]
32+
exclude:^git/ext/
33+
34+
-repo:https://github.com/pre-commit/pre-commit-hooks
35+
rev:v4.4.0
36+
hooks:
37+
-id:check-toml
38+
-id:check-yaml
39+
-id:check-merge-conflict

‎Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
.PHONY: all clean release force_release
1+
.PHONY: alllintclean release force_release
22

33
all:
4-
@grep -Ee'^[a-z].*:' Makefile| cut -d: -f1| grep -vF all
4+
@awk -F:'/^[[:alpha:]].*:/ && !/^all:/ {print $$1}' Makefile
5+
6+
lint:
7+
SKIP=black-format pre-commit run --all-files --hook-stage manual
58

69
clean:
710
rm -rf build/ dist/ .eggs/ .tox/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp