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

README: clarify code examples #47

Merged
merged 1 commit into from
Apr 8, 2021

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Apr 7, 2021

To use the functionality from the library, users can choose one of two methods to use it.

The existing code example in the readme was confusing as it used both methods in the same example, while at any time, only one method should be used.

This splits out the example into the two distinct usages.

Includes:

  • Update namespace in code samples to make it clear that the user namespace is expected.
  • Update test class name in code samples to make it clear this is an example.
  • Remove strict_types declaration.
    While this may just be my opinion, strict_types should not be used in test files as it can block the testing of unhappy paths.

To use the functionality from the library, users can choose one of two methods to use it.

The existing code example in the readme was confusing as it used both methods in the same example, while at any time, only one method should be used.

This splits out the example into the two distinct usages.

Includes:
* Update namespace in code samples to make it clear that the user namespace is expected.
* Update test class name in code samples to make it clear this is an example.
* Remove `strict_types` declaration.
    While this may just be my opinion, `strict_types` should not be used in test files as it can block the testing of unhappy paths.
@rdohms rdohms added the Documentation This issue or pull request is related to documentation and written guidelines label Apr 8, 2021
@rdohms rdohms merged commit 494da46 into rdohms:master Apr 8, 2021
@jrfnl jrfnl deleted the feature/readme-improve-code-samples branch April 8, 2021 12:18
@rdohms rdohms added this to the v0.3.0 milestone Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation This issue or pull request is related to documentation and written guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants