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

Improve NVDA's coding standards #17666

Merged
merged 8 commits into from
Mar 3, 2025
Merged

Improve NVDA's coding standards #17666

merged 8 commits into from
Mar 3, 2025

Conversation

SaschaCowley
Copy link
Member

Link to issue number:

Summary of the issue:

NVDA's coding standards are light on details regarding exactly where certain things should be documented. They also contain no information on acceptable use of language.

Description of user facing changes

The coding standards have been updated to:

  • Clarify that Python class constructors should be documented in the class's __init__, not in the class's docstring;
  • Clarify that Python class attributes should be documented immediately below where they're first declared/defined, not in the class's docstring;
  • Add a statement on types of language that should be avoided in new code submissions, with examples and alternatives.

Description of development approach

Docstrings: Looked at our current approach.

Language usage: The following resources were consulted:

Testing strategy:

Known issues with pull request:

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@coderabbitai summary

@SaschaCowley SaschaCowley requested a review from a team as a code owner January 31, 2025 04:19
@SaschaCowley SaschaCowley requested a review from seanbudd January 31, 2025 04:19
Copy link
Member

@seanbudd seanbudd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice stuff!

@nvdaes nvdaes mentioned this pull request Feb 3, 2025
5 tasks
@seanbudd seanbudd added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Feb 3, 2025
Copy link
Collaborator

@gerald-hartig gerald-hartig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @SaschaCowley

@seanbudd seanbudd merged commit 35087eb into master Mar 3, 2025
5 checks passed
@seanbudd seanbudd deleted the codingStandardsUpdate branch March 3, 2025 00:40
@github-actions github-actions bot added this to the 2025.1 milestone Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants