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

resolve error when running with python -OO #18

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JohannesBuchner
Copy link
Contributor

running python with optimizations turned on strips away __doc__ and leads to an error:

python3 -OO -c 'import cosmolopy'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/mnt/data/daten/PostDoc2/home/Downloads/CosmoloPy3/cosmolopy/__init__.py", line 91, in <module>
    from . import constants as cc
  File "/mnt/data/daten/PostDoc2/home/Downloads/CosmoloPy3/cosmolopy/constants.py", line 88, in <module>
    __doc__ += "\n".join(sorted(doc.split("\n")))
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'

This PR resolves this.

Also, there is a syntaxwarning about backslash escape, which I also addressed.

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.

1 participant