Skip to content

Add type hints to source modules (66% function coverage)#285

Open
Kemalau wants to merge 1 commit into
23andMe:masterfrom
Kemalau:add-type-hints
Open

Add type hints to source modules (66% function coverage)#285
Kemalau wants to merge 1 commit into
23andMe:masterfrom
Kemalau:add-type-hints

Conversation

@Kemalau

@Kemalau Kemalau commented Mar 18, 2026

Copy link
Copy Markdown

Summary

Adds parameter and return type annotations to 81 out of 122 functions across all non-test source files in the yamale package.

Files modified (10):

  • yamale/command_line.py
  • yamale/readers/yaml_reader.py
  • yamale/schema/datapath.py
  • yamale/schema/schema.py
  • yamale/schema/validationresults.py
  • yamale/syntax/parser.py
  • yamale/util.py
  • yamale/validators/base.py
  • yamale/validators/constraints.py
  • yamale/validators/validators.py

Verification

  • All 156 existing tests pass with no changes to test files
  • No runtime behavior changes — annotations only
  • +138 / -84 lines changed

Approach

Type annotations were added using an automated tool-assisted workflow with human verification. Each edit was individually tested against the full test suite before proceeding.

Addresses #284

Adds parameter and return type annotations to 81 out of 122 functions
across all non-test source files in the yamale package:

- yamale/command_line.py
- yamale/readers/yaml_reader.py
- yamale/schema/datapath.py
- yamale/schema/schema.py
- yamale/schema/validationresults.py
- yamale/syntax/parser.py
- yamale/util.py
- yamale/validators/base.py
- yamale/validators/constraints.py
- yamale/validators/validators.py
- yamale/yamale.py
- yamale/yamale_error.py

All 156 existing tests pass with no changes to test files.
No runtime behavior changes - annotations only.

Addresses 23andMe#284
@cblakkan cblakkan self-requested a review March 18, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants