-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add linting, formatting #2
Conversation
.pylintrc
Outdated
overgeneral-exceptions=BaseException, | ||
Exception |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pylint: Command line or configuration file:1: UserWarning: 'BaseException' is not a proper value for the 'overgeneral-exceptions' option. Use fully qualified name (maybe 'builtins.BaseException' ?) instead. This will cease to be checked at runtime when the configuration upgrader is released.
pylint: Command line or configuration file:1: UserWarning: 'Exception' is not a proper value for the 'overgeneral-exceptions' option. Use fully qualified name (maybe 'builtins.Exception' ?) instead. This will cease to be checked at runtime when the configuration upgrader is released.
.github/workflows/test.yaml
Outdated
continue-on-error: true | ||
- name: Static type checking | ||
run: | | ||
poetry run mypy atheneum #'${{github.workspace}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to run this on our tests, too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking not, actually. If we're writing tests that are typing-complicated, we have bigger problems. But I guess I don't mind either way.
atheneum/atheneum.py
Outdated
def __init__(self) -> None: | ||
pass | ||
|
||
def answer(self, exclamation_str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hungarian notation???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sarcasm is unbecoming.
atheneum/atheneum.py
Outdated
""" | ||
Return the answer to Life, the Universe, and Everything. | ||
|
||
:param exclamation_str: Print how you feel about the answer | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At some point we'll want to standardize how we do API documentation. I assume this is a standard syntax for something like sphynx?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is ReStructured Text that sphinx uses. Tthis looks like a pointless function signature, but I wanted to contrive an example to use the RST comments...
This branch contains CI actions for checking pylint output and mypy output.
An example of ReStructured Text (sphinx) comment style is also included in a source file.