Skip to content
This repository was archived by the owner on Aug 16, 2024. It is now read-only.

Commit d061900

Browse files
refactor: ci & code quality (#76)
* Restructuring changes * Some more changes * Add to requirements * More changes * Fix requirements file path * update files * refactor: replace black with brunette This keeps the current single quoted format to try and keep a minimal amount of changes * tests: add version test Signed-off-by: BobDotCom <[email protected]> Signed-off-by: VincentRPS <[email protected]> Co-authored-by: VincentRPS <[email protected]>
1 parent fa6ea65 commit d061900

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+1214
-543
lines changed

.flake8

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[flake8]
2+
min_python_version = 3.10
23
count = true
34
max-line-length = 120
45
show_source = True
@@ -40,6 +41,8 @@ ignore =
4041
E722
4142
# W503: line break before binary operator
4243
W503
44+
# E203: whitespace before ':'
45+
E203
4346

4447
per-file-ignores =
4548
# imported but unused
@@ -61,4 +64,4 @@ exclude =
6164

6265
accept-encodings = utf-8
6366
max-complexity = 19
64-
docstring-convention = numpy
67+
docstring-convention = numpy

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.github/dependabot.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
version: 2
22
updates:
3-
- package-ecosystem: 'pip'
4-
directory: '/'
3+
- package-ecosystem: "pip"
4+
directory: "/"
55
schedule:
6-
interval: 'daily'
7-
- package-ecosystem: 'github-actions'
8-
directory: '/'
6+
interval: "daily"
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
99
schedule:
10-
interval: 'daily'
10+
interval: "daily"

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ test.py
1515
.nox/
1616
*.inv
1717
ci.py
18-
.env
18+
.env
19+
testing/

.pre-commit-config.yaml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.3.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- repo: https://github.com/PyCQA/autoflake
8+
rev: v1.7.7
9+
hooks:
10+
- id: autoflake
11+
# args:
12+
# - --in-place
13+
# - --remove-all-unused-imports
14+
# - --expand-star-imports
15+
# - --remove-duplicate-keys
16+
# - --remove-unused-variables
17+
- repo: https://github.com/asottile/pyupgrade
18+
rev: v3.1.0
19+
hooks:
20+
- id: pyupgrade
21+
args: [--py310-plus]
22+
- repo: https://github.com/PyCQA/isort
23+
rev: 5.10.1
24+
hooks:
25+
- id: isort
26+
- repo: https://github.com/odwyersoftware/brunette
27+
rev: 0.2.7
28+
hooks:
29+
- id: brunette
30+
# See https://github.com/psf/black/issues/2188#issuecomment-1289317647 for why we can't use the --preview flag.
31+
args: [--safe, --quiet, --single-quotes]
32+
- repo: https://github.com/Pierre-Sassoulas/black-disable-checker
33+
rev: 1.0.1
34+
hooks:
35+
- id: black-disable-checker
36+
# - repo: https://github.com/PyCQA/flake8
37+
# rev: 4.0.1
38+
# hooks:
39+
# - id: flake8
40+
# additional_dependencies: [flake8-typing-imports==1.12.0]
41+
# - repo: local
42+
# hooks:
43+
# - id: pylint
44+
# name: pylint
45+
# entry: pylint
46+
# language: system
47+
# types: [python]
48+
# args: ["-rn", "-sn", "--rcfile=.pylintrc", "--fail-on=I"]
49+
# # We define an additional manual step to allow running pylint with a spelling
50+
# # checker in CI.
51+
# - id: pylint
52+
# alias: pylint-with-spelling
53+
# name: pylint
54+
# entry: pylint
55+
# language: system
56+
# types: [python]
57+
# args: ["-rn", "-sn", "--rcfile=.pylintrc", "--fail-on=I", "--spelling-dict=en"]
58+
# stages: [manual]
59+
# - id: mypy
60+
# name: mypy
61+
# entry: mypy
62+
# language: system
63+
# types: [python]
64+
# args: ["--non-interactive"]
65+
# - repo: https://github.com/myint/rstcheck
66+
# rev: "v5.0.0"
67+
# hooks:
68+
# - id: rstcheck
69+
# args: ["--ignore-roles=func,class,mod", "--report=warning"]
70+
# types: [text]
71+
# - repo: https://github.com/pre-commit/mirrors-mypy
72+
# rev: v0.950
73+
# hooks:
74+
# - id: mypy
75+
76+
- repo: https://github.com/pre-commit/mirrors-prettier
77+
rev: v3.0.0-alpha.3
78+
hooks:
79+
- id: prettier
80+
args: [--prose-wrap=always, --print-width=88]
81+
- repo: https://github.com/DanielNoord/pydocstringformatter
82+
rev: 93b15ca # TODO: Change this when v8.0 is released
83+
hooks:
84+
- id: pydocstringformatter
85+
args:
86+
[
87+
--style=numpydoc,
88+
--no-numpydoc-name-type-spacing,
89+
--no-final-period,
90+
--no-capitalize-first-letter,
91+
]

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
proseWrap: always
2+
printWidth: 88
3+
endOfLine: auto

.readthedocs.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@ build:
66
tools:
77
python: "3.10"
88

9-
109
python:
11-
install:
12-
- method: pip
13-
path: .
14-
extra_requirements:
15-
- docs
10+
install:
11+
- method: pip
12+
path: .
13+
extra_requirements:
14+
- docs
1615

1716
sphinx:
18-
configuration: docs/conf.py
19-
fail_on_warning: false
20-
builder: html
17+
configuration: docs/conf.py
18+
fail_on_warning: false
19+
builder: html

CHANGELOG.md

Whitespace-only changes.

LICENSE

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
MIT License
22

3-
Copyright (c) 2021-present VincentRPS
43
Copyright (c) 2022-present Pycord
54

65
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -19,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1918
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2019
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2120
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22-
SOFTWARE.
21+
SOFTWARE.

MANIFEST.in

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1+
include README.rst
2+
include LICENSE
13
include requirements.txt
4+
include pycord/bin/*.dll
25
include pycord/py.typed
36
include pycord/banner.txt
4-
include pycord/bin/*.dll
7+
8+
prune .github
9+
prune docs
10+
prune examples
11+
prune tests
12+
exclude pycord/bin/COPYING
13+
exclude .flake8
14+
exclude .gitignore
15+
exclude .pre-commit-config.yaml
16+
exclude .prettierrc
17+
exclude .readthedocs.yml
18+
exclude CHANGELOG.md
19+
exclude FUNDING.yml
20+
exclude requirements-dev.txt

0 commit comments

Comments
 (0)