File tree 12 files changed +163
-166
lines changed
12 files changed +163
-166
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ name : pre-commit
3
+
4
+ on :
5
+ push :
6
+ branches :
7
+ - master
8
+ pull_request :
9
+ branches :
10
+ - master
11
+
12
+ jobs :
13
+ pre-commit :
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - uses : actions/checkout@v2
17
+ - uses : actions/setup-python@v2
18
+ -
uses :
pre-commit/[email protected]
Original file line number Diff line number Diff line change
1
+ ---
2
+ # This workflow will upload a Python Package using Twine when a release is
3
+ # created
4
+ # For more information see:
5
+ # https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
6
+
7
+ name : Upload Python Package
8
+
9
+ on :
10
+ release :
11
+ types : [created]
12
+
13
+ jobs :
14
+ deploy :
15
+
16
+ runs-on : ubuntu-latest
17
+
18
+ steps :
19
+ - uses : actions/checkout@v2
20
+ - name : Set up Python
21
+ uses : actions/setup-python@v2
22
+ with :
23
+ python-version : 3.x
24
+ - name : Install dependencies
25
+ run : |
26
+ python -m pip install --upgrade pip
27
+ pip install setuptools wheel twine
28
+ - name : Build and publish
29
+ env :
30
+ TWINE_USERNAME : __token__
31
+ TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
32
+ run : |
33
+ python setup.py sdist bdist_wheel
34
+ twine upload dist/*
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ ---
2
+ # This workflow will install Python dependencies, run tests and lint with a
3
+ # variety of Python versions
4
+ # For more information see:
5
+ # https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
6
+
7
+ name : Python package
8
+
9
+ on :
10
+ push :
11
+ branches :
12
+ - master
13
+ pull_request :
14
+ branches :
15
+ - master
16
+
17
+ jobs :
18
+ build :
19
+
20
+ runs-on : ubuntu-latest
21
+ strategy :
22
+ matrix :
23
+ python-version :
24
+ - " 3.5"
25
+ - " 3.6"
26
+ - " 3.7"
27
+ - " 3.8"
28
+ - " 3.9"
29
+ - " 3.10"
30
+
31
+ steps :
32
+ - uses : actions/checkout@v2
33
+ - name : Set up Python ${{ matrix.python-version }}
34
+ uses : actions/setup-python@v2
35
+ with :
36
+ python-version : ${{ matrix.python-version }}
37
+ - name : Install dependencies
38
+ run : |
39
+ python -m pip install --upgrade pip
40
+ python -m pip install -r requirements-test.txt
41
+ - name : Test with pytest
42
+ run : |
43
+ pytest
Original file line number Diff line number Diff line change
1
+ ---
1
2
repos :
2
- - repo : https://github.com/PyCQA/isort.git
3
- rev : 5.7.0
3
+ - repo : https://github.com/adrienverge/yamllint
4
+ rev : v1.26.3
4
5
hooks :
5
- - id : isort
6
+ - name : check YAML format
7
+ id : yamllint
6
8
- repo : https://github.com/psf/black
7
- rev : 20.8b1
9
+ rev : 22.1.0
8
10
hooks :
9
- - id : black
10
- language_version : python3
11
- args :
12
- - -l
13
- - " 119"
11
+ - name : re-format with black
12
+ id : black
13
+ language_version : python3
14
+
15
+ - repo : https://github.com/pre-commit/pre-commit-hooks
16
+ rev : v4.1.0
17
+ hooks :
18
+ - name : remove whitespaces
19
+ id : trailing-whitespace
20
+
14
21
- repo : https://gitlab.com/pycqa/flake8
15
- rev : 6de8252c035844f1e679f509b5f37340b44d5c39
22
+ rev : 21d3c70d676007470908d39b73f0521d39b3b997
16
23
hooks :
17
- - id : flake8
24
+ - name : check-format with flake8
25
+ id : flake8
26
+ args :
27
+ - --show-source
28
+ - --statistics
29
+ - --count
30
+ - --max-complexity=12
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ extends : default
2
+
3
+ rules :
4
+ truthy :
5
+ ignore : |
6
+ .github/workflows/*
7
+ indentation :
8
+ spaces : 2
Original file line number Diff line number Diff line change 1
- all : flakes test
1
+ all : precommit test
2
2
3
3
test :
4
4
python setup.py test
5
5
6
- analysis :: flakes
7
-
8
- flakes :
9
- @echo Searching for static errors...
10
- @flake8 --statistics --count readchar
11
-
12
- coveralls ::
13
- coveralls
6
+ precommit ::
7
+ pre-commit run -a
14
8
15
9
publish :
16
10
@python setup.py bdist_wheel upload
Original file line number Diff line number Diff line change 8
8
ESC = "\x1b "
9
9
10
10
# CTRL
11
- CTRL_A = ' \x01 '
12
- CTRL_B = ' \x02 '
13
- CTRL_C = ' \x03 '
14
- CTRL_D = ' \x04 '
15
- CTRL_E = ' \x05 '
16
- CTRL_F = ' \x06 '
17
- CTRL_G = ' \x07 '
18
- CTRL_H = ' \x08 '
19
- CTRL_I = ' \t '
20
- CTRL_J = ' \n '
21
- CTRL_K = ' \x0b '
22
- CTRL_L = ' \x0c '
23
- CTRL_M = ' \r '
24
- CTRL_N = ' \x0e '
25
- CTRL_O = ' \x0f '
26
- CTRL_P = ' \x10 '
27
- CTRL_Q = ' \x11 '
28
- CTRL_R = ' \x12 '
29
- CTRL_S = ' \x13 '
30
- CTRL_T = ' \x14 '
31
- CTRL_U = ' \x15 '
32
- CTRL_V = ' \x16 '
33
- CTRL_W = ' \x17 '
34
- CTRL_X = ' \x18 '
35
- CTRL_Y = ' \x19 '
36
- CTRL_Z = ' \x1a '
11
+ CTRL_A = " \x01 "
12
+ CTRL_B = " \x02 "
13
+ CTRL_C = " \x03 "
14
+ CTRL_D = " \x04 "
15
+ CTRL_E = " \x05 "
16
+ CTRL_F = " \x06 "
17
+ CTRL_G = " \x07 "
18
+ CTRL_H = " \x08 "
19
+ CTRL_I = " \t "
20
+ CTRL_J = " \n "
21
+ CTRL_K = " \x0b "
22
+ CTRL_L = " \x0c "
23
+ CTRL_M = " \r "
24
+ CTRL_N = " \x0e "
25
+ CTRL_O = " \x0f "
26
+ CTRL_P = " \x10 "
27
+ CTRL_Q = " \x11 "
28
+ CTRL_R = " \x12 "
29
+ CTRL_S = " \x13 "
30
+ CTRL_T = " \x14 "
31
+ CTRL_U = " \x15 "
32
+ CTRL_V = " \x16 "
33
+ CTRL_W = " \x17 "
34
+ CTRL_X = " \x18 "
35
+ CTRL_Y = " \x19 "
36
+ CTRL_Z = " \x1a "
37
37
38
38
# ALT
39
39
ALT_A = "\x1b \x61 "
Original file line number Diff line number Diff line change 53
53
20960 : key .PAGE_DOWN ,
54
54
18400 : key .HOME ,
55
55
20448 : key .END ,
56
- 18432 : key .UP , # 72 * 256
57
- 20480 : key .DOWN , # 80 * 256
58
- 19200 : key .LEFT , # 75 * 256
59
- 19712 : key .RIGHT , # 77 * 256
56
+ 18432 : key .UP , # 72 * 256
57
+ 20480 : key .DOWN , # 80 * 256
58
+ 19200 : key .LEFT , # 75 * 256
59
+ 19712 : key .RIGHT , # 77 * 256
60
60
}
61
61
62
62
def readkey (getchar_fn = None ):
@@ -79,7 +79,6 @@ def readkey(getchar_fn=None):
79
79
else :
80
80
return ch .decode ()
81
81
82
-
83
82
else :
84
83
85
84
def readkey (getchar_fn = None ):
Original file line number Diff line number Diff line change 7
7
from setuptools import find_packages , setup
8
8
from setuptools .command .test import test as TestCommand
9
9
10
- version = "2.0.1"
11
10
github_ref = os .getenv ("GITHUB_REF" )
12
11
if github_ref and github_ref .startswith ("refs/tags" ):
13
12
version = github_ref [10 :]
13
+ else :
14
+ version = "0.0.0-local"
14
15
15
16
16
17
def read_description ():
@@ -81,7 +82,5 @@ def run_tests(self):
81
82
"wheel" ,
82
83
],
83
84
install_requires = [],
84
- setup_requires = [
85
- "flake8" ,
86
- ],
85
+ setup_requires = [],
87
86
)
You can’t perform that action at this time.
0 commit comments