Skip to content

Commit ab0f746

Browse files
authored
Use poetry pinned black over GH action (#2185)
Reformat with black 23
1 parent 1490215 commit ab0f746

File tree

6 files changed

+115
-10
lines changed

6 files changed

+115
-10
lines changed

.github/workflows/CI.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ jobs:
180180
- uses: actions/setup-python@v4
181181
with:
182182
python-version: 3.9
183-
- uses: psf/[email protected]
184-
with:
185-
options: "--check"
183+
- name: Install Python Dependencies
184+
run: |
185+
pip install -r source/requirements.txt
186+
- name: Format
187+
run: |
188+
black --check .

poetry.lock

Lines changed: 102 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ description = ""
55
authors = []
66

77
[tool.poetry.dependencies]
8+
black = "==23.1.0"
89
python = ">=3.9,<3.12"
910
doc8 = "==0.11.2"
1011
docutils = "==0.18.0"

source/_extensions/controls_js_sim/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,13 @@
2727

2828

2929
def mergeAndMinify(out_folder):
30-
3130
if not os.path.isdir(out_folder):
3231
os.makedirs(out_folder)
3332

3433
outputFile = os.path.join(out_folder, "pid-tune.js")
3534

3635
with open(outputFile, "w") as outf:
3736
for folder in FOLDER_INCS:
38-
3937
jsRoot = os.path.dirname(__file__)
4038
# find all js files in the specific folder
4139
inFileNames = glob.glob(os.path.join(jsRoot, folder, "*.js"))
@@ -45,7 +43,6 @@ def mergeAndMinify(out_folder):
4543
inFileNames.sort()
4644

4745
for inFileName in inFileNames:
48-
4946
with open(inFileName, "r") as inf:
5047
if not debugJS:
5148
# Minify each file independently - again, low bar solution for now
@@ -76,7 +73,6 @@ def mergeAndMinify(out_folder):
7673

7774

7875
def setup(app: Sphinx) -> Dict[str, Any]:
79-
8076
print("Generating and adding controls javascript...")
8177

8278
# Perform controls js setup

source/_extensions/wpilib_release.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ class WpilibRelease(SphinxDirective):
1919
final_argument_whitespace = True
2020

2121
def run(self) -> List[nodes.Node]:
22-
2322
version: str = self.arguments[0]
2423

2524
release_url = f"https://api.github.com/repos/wpilibsuite/allwpilib/releases/tags/{version}"

source/requirements.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ apeye==1.3.0 ; python_version >= "3.9" and python_version < "3.12"
44
autodocsumm==0.2.9 ; python_version >= "3.9" and python_version < "3.12"
55
babel==2.11.0 ; python_version >= "3.9" and python_version < "3.12"
66
beautifulsoup4==4.11.1 ; python_version >= "3.9" and python_version < "3.12"
7+
black==23.1.0 ; python_version >= "3.9" and python_version < "3.12"
78
brotli==1.0.9 ; platform_python_implementation == "CPython" and python_version >= "3.9" and python_version < "3.12"
89
brotlicffi==1.0.9.2 ; platform_python_implementation != "CPython" and python_version >= "3.9" and python_version < "3.12"
910
cachecontrol[filecache]==0.12.11 ; python_version >= "3.9" and python_version < "3.12"
1011
certifi==2022.12.7 ; python_version >= "3.9" and python_version < "3.12"
1112
cffi==1.15.1 ; platform_python_implementation != "CPython" and python_version >= "3.9" and python_version < "3.12"
1213
charset-normalizer==2.1.1 ; python_version >= "3.9" and python_version < "3.12"
13-
colorama==0.4.6 ; python_version >= "3.9" and python_version < "3.12" and sys_platform == "win32"
14+
click==8.1.3 ; python_version >= "3.9" and python_version < "3.12"
15+
colorama==0.4.6 ; python_version >= "3.9" and python_version < "3.12" and sys_platform == "win32" or python_version >= "3.9" and python_version < "3.12" and platform_system == "Windows"
1416
contourpy==1.0.6 ; python_version >= "3.9" and python_version < "3.12"
1517
cssutils==2.6.0 ; python_version >= "3.9" and python_version < "3.12"
1618
cycler==0.11.0 ; python_version >= "3.9" and python_version < "3.12"
@@ -40,9 +42,11 @@ markdown2==2.4.6 ; python_version >= "3.9" and python_version < "3.12"
4042
markupsafe==2.1.1 ; python_version >= "3.9" and python_version < "3.12"
4143
matplotlib==3.6.2 ; python_version >= "3.9" and python_version < "3.12"
4244
msgpack==1.0.4 ; python_version >= "3.9" and python_version < "3.12"
45+
mypy-extensions==1.0.0 ; python_version >= "3.9" and python_version < "3.12"
4346
natsort==8.2.0 ; python_version >= "3.9" and python_version < "3.12"
4447
numpy==1.24.0 ; python_version >= "3.9" and python_version < "3.12"
4548
packaging==22.0 ; python_version >= "3.9" and python_version < "3.12"
49+
pathspec==0.11.0 ; python_version >= "3.9" and python_version < "3.12"
4650
pbr==5.11.0 ; python_version >= "3.9" and python_version < "3.12"
4751
pillow==9.3.0 ; python_version >= "3.9" and python_version < "3.12"
4852
platformdirs==2.6.0 ; python_version >= "3.9" and python_version < "3.12"
@@ -94,6 +98,7 @@ stevedore==4.1.1 ; python_version >= "3.9" and python_version < "3.12"
9498
tabulate==0.9.0 ; python_version >= "3.9" and python_version < "3.12"
9599
tempdir==0.7.1 ; python_version >= "3.9" and python_version < "3.12"
96100
tinycss2==1.2.1 ; python_version >= "3.9" and python_version < "3.12"
101+
tomli==2.0.1 ; python_version >= "3.9" and python_version < "3.11"
97102
typing-extensions==4.4.0 ; python_version >= "3.9" and python_version < "3.12"
98103
urllib3==1.26.13 ; python_version >= "3.9" and python_version < "3.12"
99104
webencodings==0.5.1 ; python_version >= "3.9" and python_version < "3.12"

0 commit comments

Comments
 (0)