Clean up, modernize, and document the the Perforce codebase.
Review Request #8944 — Created May 17, 2017 and submitted
The Perforce support has been around for a very long time, and there were some warts and unused code that never got cleaned up. This change removes some methods and parameters that weren't needed anymore, rearranges some functions, removes unnecessary code, converts a static method into a normal method, and adds documentation throughout the file. It sets the stage for future work in this file.
Unit tests and real-world functionality work.
Built the docs (temporarily adding this file to the docs build -- it's
not by default) and made sure the docs were correct.
-
-
reviewboard/scmtools/perforce.py (Diff revision 1) This isn't really correct. While there is a
yield
in here, that's used by@contextmanager
. Thecontextmanager
wrapper will return a context manager, which isn't really a type in and of itself, but I think could be documented asobject
. -
Change Summary:
- Updated to use
Context
instead ofYields
. This will be available as part of a set of extensions to Sphinx that are being worked on (but renders fine even without them). - Made
connect
andrun_worker
public. - Improved the docs a bit for
connect
andrun_worker
.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+474 -134) |
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.