Skip to content
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

add slotscheck to CI #615

Merged
merged 6 commits into from
Jan 20, 2022
Merged
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
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
- run: flake8
- run: ufmt check .
- run: python3 -m fixit.cli.run_rules
- run: python -m slotscheck libcst

# Run pyre typechecker
typecheck:
Expand Down
7 changes: 7 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ changes to be conformant, run the following in the root:

ufmt format && python -m fixit.cli.apply_fix

We use `slotscheck <https://slotscheck.rtfd.io>`_ to check the correctness
of class ``__slots__``. To check that slots are defined properly, run:

.. code-block:: shell

python -m slotscheck libcst

To run all tests, you'll need to do the following in the root:

.. code-block:: shell
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ exclude = "native/.*"
[tool.ufmt]
excludes = ["native/", "stubs/"]

[tool.slotscheck]
exclude-modules = '^libcst\.(testing|tests)'

[build-system]
requires = ["setuptools", "wheel", "setuptools-rust"]
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ sphinx-rtd-theme>=0.4.3
ufmt==1.3
usort==1.0.0rc1
setuptools-rust>=0.12.1
slotscheck>=0.7.1