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

Bootcamp: Changeset 4 #93

Closed
dgasmith opened this issue Aug 12, 2019 · 1 comment · Fixed by #100
Closed

Bootcamp: Changeset 4 #93

dgasmith opened this issue Aug 12, 2019 · 1 comment · Fixed by #100
Labels
Documentation Unclear or incorrect documentation help wanted Extra attention is needed

Comments

@dgasmith
Copy link
Collaborator

diff --git a/qcelemental/physical_constants/context.py b/qcelemental/physical_constants/context.py
index 22a1911..71b58e4 100644
--- a/qcelemental/physical_constants/context.py
+++ b/qcelemental/physical_constants/context.py
@@ -106,7 +106,7 @@ class PhysicalConstantsContext:
             callname = qca.label.translate(self._transtable)
             setattr(self, callname, float(qca.data))

-    def __str__(self):
+    def __str__(self) -> str:
         return "PhysicalConstantsContext(context='{}')".format(self.name)

     @property
@@ -238,7 +238,7 @@ class PhysicalConstantsContext:

         return print_variables(self.pc)

-    def run_comparison(self):
+    def run_comparison(self) -> None:
         """Compare the existing physical constant information for Psi4 (in checkup_data folder) to `self`. Specialized use."""

         try:
@@ -270,8 +270,19 @@ class PhysicalConstantsContext:
                     print('Physical Constant {} ratio differs by {:12.8f}: {} (this) vs {} (psi)'.format(
                         pc, rat, ref, val))

-    def _get_pi(self, from_scratch=False):
-        """Get pi to 36 digits (or more with mpmath)."""
+    def _get_pi(self, from_scratch: bool = False) -> 'Decimal':
+        """Get pi to 36 digits (or more with mpmath).
+
+        Parameters
+        ----------
+        from_scratch : bool, optional
+            If True, recomputes Pi from mpmath.
+
+        Returns
+        -------
+        Decimal
+            A representation of Pi
+        """

         if from_scratch:  # pragma: no cover
             from mpmath import mp
@dgasmith dgasmith added help wanted Extra attention is needed Documentation Unclear or incorrect documentation labels Aug 12, 2019
@hannahbrucemacdonald
Copy link
Contributor

I'll take this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Unclear or incorrect documentation help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants