Skip to content

Removed self as first parameter to functions (not methods) in Guides. #1571

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

Merged
merged 4 commits into from
Nov 25, 2023
Merged

Conversation

fractal13
Copy link
Contributor

Pull Request Type

  • Feature addition
  • Bugfix
  • [x ] Documentation update
  • Code refactor
  • Tests improvement
  • CI/CD pipeline enhancement
  • Other: [Replace with a description]

Description

There were two code snippets in the Guides on creating commands where the functions must have been pulled from a class, so they still had self as the first parameter. I removed the self, from the parameter list in the snippet to make the code more copy/paste friendly.

Changes

  • removed self, from the snippet parameter list.

Related Issues

No known open issues.

Test Scenarios

Copy/paste the sample with self, in the parameter list and you'll get an error when the functions are called because the number of parameters is not correct.

Python Compatibility

  • [x ] I've ensured my code works on Python 3.10.x
  • I've ensured my code works on Python 3.11.x

Checklist

  • I've run the pre-commit code linter over all edited files
  • I've tested my changes on supported Python versions
  • I've added tests for my code, if applicable
  • [x ] I've updated / added documentation, where applicable

@i0bs i0bs changed the base branch from stable to unstable November 18, 2023 20:23
@silasary silasary merged commit ab03fb8 into interactions-py:unstable Nov 25, 2023
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.

4 participants