Skip to content

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