Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
wpilib: Remove CANJaguar and CANTalon stubs
Browse files Browse the repository at this point in the history
These have been in our wpilib package for long enough that I think teams
know that they don't exist here any more.

Also turns out that the Notifier and SendableBuilder classes don't have
docstrings - they don't have any JavaDoc comments upstream either.
Add a test checking whether classes have docstrings anyway.
  • Loading branch information
auscompgeek committed Feb 23, 2018
1 parent 2909a2d commit 8c4607a
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -6,6 +6,7 @@ __pycache__
htmlcov
*,cover
.cache
.pytest_cache/

build
dist
Expand Down
4 changes: 0 additions & 4 deletions docs/regen.py
Expand Up @@ -76,10 +76,6 @@ def gen_package(mod):
classes = []

for clsname, cls in inspect.getmembers(mod, inspect.isclass):
# Skip undocumented classes - only stubs will be undocumented.
if not cls.__doc__:
continue

fname = join(docdir, '%s.rst' % clsname)
clsmodname = cls.__module__
write_if_changed(
Expand Down
18 changes: 18 additions & 0 deletions wpilib/tests/test_documented.py
@@ -0,0 +1,18 @@
import inspect


def test_all_classes_documented(wpilib):
expected_undocumented = {
wpilib: {'Notifier', 'SendableBuilder'},
wpilib.buttons: set(),
wpilib.command: set(),
wpilib.drive: set(),
wpilib.interfaces: set(),
}

for package, expected_class_names in expected_undocumented.items():
actual_undocumented = set()
for name, cls in inspect.getmembers(package, inspect.isclass):
if not cls.__doc__:
actual_undocumented.add(name)
assert actual_undocumented == expected_class_names
2 changes: 0 additions & 2 deletions wpilib/wpilib/__init__.py
Expand Up @@ -16,8 +16,6 @@
from .analogtriggeroutput import *
from .builtinaccelerometer import *
from .cameraserver import *
from .canjaguar import *
from .cantalon import *
from .compressor import *
from .controllerpower import *
from .counter import *
Expand Down
10 changes: 0 additions & 10 deletions wpilib/wpilib/canjaguar.py

This file was deleted.

10 changes: 0 additions & 10 deletions wpilib/wpilib/cantalon.py

This file was deleted.

0 comments on commit 8c4607a

Please sign in to comment.