Skip to content

Commit 5a12200

Browse files
ariebovenbergzsol
andauthored
[ci] add slotscheck (#615)
Co-authored-by: Zsolt Dollenstein <[email protected]>
1 parent ceac7fc commit 5a12200

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464
- run: flake8
6565
- run: ufmt check .
6666
- run: python3 -m fixit.cli.run_rules
67+
- run: python -m slotscheck libcst
6768

6869
# Run pyre typechecker
6970
typecheck:

README.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,13 @@ changes to be conformant, run the following in the root:
164164
165165
ufmt format && python -m fixit.cli.apply_fix
166166
167+
We use `slotscheck <https://slotscheck.rtfd.io>`_ to check the correctness
168+
of class ``__slots__``. To check that slots are defined properly, run:
169+
170+
.. code-block:: shell
171+
172+
python -m slotscheck libcst
173+
167174
To run all tests, you'll need to do the following in the root:
168175

169176
.. code-block:: shell

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@ exclude = "native/.*"
55
[tool.ufmt]
66
excludes = ["native/", "stubs/"]
77

8+
[tool.slotscheck]
9+
exclude-modules = '^libcst\.(testing|tests)'
10+
811
[build-system]
912
requires = ["setuptools", "wheel", "setuptools-rust"]

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ sphinx-rtd-theme>=0.4.3
1515
ufmt==1.3
1616
usort==1.0.0rc1
1717
setuptools-rust>=0.12.1
18+
slotscheck>=0.7.1

0 commit comments

Comments
 (0)