Skip to content

Typechecking improvements #1738

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@ makefile text
*.ttf binary
*.mp3 binary
*.gif binary
*.wav binary
*.wav binary

# Tell github that pyrightconfig.json is JSONC and allows comments
pyrightconfig.json linguist-language=JSONC
15 changes: 12 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,21 @@ jobs:
run: |
python -m pip install -U pip wheel setuptools
- name: wheel
id: wheel
run: |
python -m pip install -e .[dev]
- name: code-inspection
- name: "code-inspection: mypy"
if: ${{ (success() || failure()) && steps.wheel.outcome == 'success' }}
run: |
mypy arcade
ruff arcade
python ./make.py mypy
- name: "code-inspection: pyright"
if: ${{ (success() || failure()) && steps.wheel.outcome == 'success' }}
run: |
python ./make.py pyright
- name: "code-inspection: ruff"
if: ${{ (success() || failure()) && steps.wheel.outcome == 'success' }}
run: |
python ./make.py ruff
- name: build-docs
run: |
sphinx-build doc build -W
Expand Down
133 changes: 133 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# DO NOT EDIT BY HAND: is automatically re-generated by make.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this.

We had auto-generated parts before, specifically __init__.py. If I remember correctly, we removed auto-generation in large part due to constant confusion over what needed to be updated.

.PHONY: default
default:
python ./make.py --help

.PHONY: clean
clean:
python ./make.py clean

.PHONY: html
html:
python ./make.py html

.PHONY: serve
serve:
python ./make.py serve

.PHONY: dirhtml
dirhtml:
python ./make.py dirhtml

.PHONY: singlehtml
singlehtml:
python ./make.py singlehtml

.PHONY: pickle
pickle:
python ./make.py pickle

.PHONY: json
json:
python ./make.py json

.PHONY: htmlhelp
htmlhelp:
python ./make.py htmlhelp

.PHONY: qthelp
qthelp:
python ./make.py qthelp

.PHONY: applehelp
applehelp:
python ./make.py applehelp

.PHONY: devhelp
devhelp:
python ./make.py devhelp

.PHONY: epub
epub:
python ./make.py epub

.PHONY: latex
latex:
python ./make.py latex

.PHONY: latexpdf
latexpdf:
python ./make.py latexpdf

.PHONY: latexpdfja
latexpdfja:
python ./make.py latexpdfja

.PHONY: text
text:
python ./make.py text

.PHONY: man
man:
python ./make.py man

.PHONY: texinfo
texinfo:
python ./make.py texinfo

.PHONY: info
info:
python ./make.py info

.PHONY: gettext
gettext:
python ./make.py gettext

.PHONY: changes
changes:
python ./make.py changes

.PHONY: linkcheck
linkcheck:
python ./make.py linkcheck

.PHONY: doctest
doctest:
python ./make.py doctest

.PHONY: coverage
coverage:
python ./make.py coverage

.PHONY: xml
xml:
python ./make.py xml

.PHONY: pseudoxml
pseudoxml:
python ./make.py pseudoxml

.PHONY: lint
lint:
python ./make.py lint

.PHONY: ruff
ruff:
python ./make.py ruff

.PHONY: mypy
mypy:
python ./make.py mypy

.PHONY: pyright
pyright:
python ./make.py pyright

.PHONY: test_full
test_full:
python ./make.py test_full

.PHONY: test
test:
python ./make.py test

101 changes: 101 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# DO NOT EDIT BY HAND: is automatically re-generated by make.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the comment on Makefile: if a line like this has to exist, it seems like a problem.

Copy link
Collaborator Author

@cspotcode cspotcode Apr 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could just .gitignore them. So anyone who wants the convenience of make will get it right after they run make.py for the first time.

The only benefit of versioning it in git is that it exists before the first time you run make.py. After that, you're constantly re-running make.py -- even via make -- which is constantly re-emitting the makefile.

set shell := ["python", "./make.py"]
default:
@{{"--help"}}

clean:
@clean

html:
@html

serve:
@serve

dirhtml:
@dirhtml

singlehtml:
@singlehtml

pickle:
@pickle

json:
@json

htmlhelp:
@htmlhelp

qthelp:
@qthelp

applehelp:
@applehelp

devhelp:
@devhelp

epub:
@epub

latex:
@latex

latexpdf:
@latexpdf

latexpdfja:
@latexpdfja

text:
@text

man:
@man

texinfo:
@texinfo

info:
@info

gettext:
@gettext

changes:
@changes

linkcheck:
@linkcheck

doctest:
@doctest

coverage:
@coverage

xml:
@xml

pseudoxml:
@pseudoxml

lint:
@lint

ruff:
@ruff

mypy:
@mypy

pyright:
@pyright

test_full:
@test_full

test:
@test

Loading