Skip to content

Commit

Permalink
Start working on supporting PEP 484 type hinting
Browse files Browse the repository at this point in the history
  • Loading branch information
gb119 committed Oct 31, 2019
1 parent 8156932 commit d3bc740
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions Stoner/core/Typing.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Defines type hint types for various common types in the package
"""
import typing

from Stoner.core.setas import setas

# Column Indices
Single_Column_Index = typing.Union[str, int]
Column_Index = typing.Union[typing.Sequence[Single_Column_Index], Single_Column_Index]

# Setas
Setas_Base = typing.Sequence[str]
Setas_Dict = typing.Mapping[str, Column_Index]
Setas = typing.Union[Setas_Base, Setas_Dict, str, setas]
2 changes: 1 addition & 1 deletion doc/Stoner.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Analysis Package
:no-inheritance-diagram:
:headings: -~

:doc: Fitting Models <analysis-fitting>
:doc:`Fitting Models <analysis-fitting>`

Plot Package and Modules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit d3bc740

Please sign in to comment.