mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-30 22:55:24 +08:00
- Updates documentation related to previously required comment headers. - Removes all comment headers from stubs - Occasionally included a header for stubs that were noted to be incomplete or contained todo's.
This commit is contained in:
committed by
Guido van Rossum
parent
a2aa93ac29
commit
b6d08b81a3
@@ -135,9 +135,6 @@ rule is that they should be as concise as possible. Specifically:
|
||||
names, or methods and fields within a single class;
|
||||
* use a single blank line between top-level class definitions, or none
|
||||
if the classes are very small;
|
||||
* add a top-level comment followed by an empty line that makes it clear
|
||||
the file contains a stub and not the actual code for the module,
|
||||
for example `# Stubs for pathlib (Python 3.4)`;
|
||||
* do not use docstrings.
|
||||
|
||||
Imports in stubs are considered private (not part of the exported API)
|
||||
@@ -157,11 +154,6 @@ Type variables and aliases you introduce purely for legibility reasons
|
||||
should be prefixed with an underscore to make it obvious to the reader
|
||||
they are not part of the stubbed API.
|
||||
|
||||
Finally, remember to include a comment on the top of your file about the
|
||||
version of the Python language your stubs were tested against and
|
||||
version of the library they were built for. This makes it easier to
|
||||
maintain the stubs in the future.
|
||||
|
||||
NOTE: there are stubs in this repository that don't conform to the
|
||||
style described above. Fixing them is a great starting point for new
|
||||
contributors.
|
||||
|
||||
Reference in New Issue
Block a user