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

fixing flake8 _io.StringIO issue #337

Merged
merged 1 commit into from
Jan 12, 2022
Merged

fixing flake8 _io.StringIO issue #337

merged 1 commit into from
Jan 12, 2022

Conversation

modernNeo
Copy link
Member

Description

Implementing a temporary fix for

_________________________________ FLAKE8-check _________________________________
/usr/local/lib/python3.8/site-packages/pluggy/_hooks.py:265: in __call__
    return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
/usr/local/lib/python3.8/site-packages/pluggy/_manager.py:80: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
/usr/local/lib/python3.8/site-packages/_pytest/runner.py:170: in pytest_runtest_call
    raise e
/usr/local/lib/python3.8/site-packages/_pytest/runner.py:162: in pytest_runtest_call
    item.runtest()
/usr/local/lib/python3.8/site-packages/pytest_flake8.py:120: in runtest
    found_errors, out, err = call(
/usr/local/lib/python3.8/site-packages/py/_io/capture.py:150: in call
    res = func(*args, **kwargs)
/usr/local/lib/python3.8/site-packages/pytest_flake8.py:222: in check_file
    app.report_errors()
/usr/local/lib/python3.8/site-packages/flake8/main/application.py:309: in report_errors
    results = self.file_checker_manager.report()
/usr/local/lib/python3.8/site-packages/flake8/checker.py:249: in report
    results_reported += self._handle_results(filename, results)
/usr/local/lib/python3.8/site-packages/flake8/checker.py:155: in _handle_results
    reported_results_count += style_guide.handle_error(
/usr/local/lib/python3.8/site-packages/flake8/style_guide.py:429: in handle_error
    return guide.handle_error(
/usr/local/lib/python3.8/site-packages/flake8/style_guide.py:581: in handle_error
    self.formatter.handle(error)
/usr/local/lib/python3.8/site-packages/flake8/formatting/base.py:100: in handle
    self.write(line, source)
/usr/local/lib/python3.8/site-packages/flake8/formatting/base.py:203: in write
    self._write(line)
/usr/local/lib/python3.8/site-packages/flake8/formatting/base.py:187: in _write
    sys.stdout.buffer.write(output.encode() + self.newline.encode())
E   AttributeError: '_io.StringIO' object has no attribute 'buffer'

PR Checklist

These are the things you need to ensure are covered in your PR, otherwise the CODEOWNERS will not approve your PR, not matter how much you ping them to do so on the Discord

  1. The description in the PR is a fair representation of what the PR is about.
  2. The PR is fixing one thing and one thing only.
  3. Logging. if you have N variables initialzed/used in your function, you should print all of them out to the log using logging module at least once or have a good reason why you arent.
  4. If your PR is doing something like adding a new line or removing a new line, CODEOWNERS reserve the right to ask that you undo that change unless it was for a specific reason.
  5. If you are adding a new command....document. Document the following things on help.json and the README.md
    1. The purpose of the command
    2. If the argument is called with any arguments.
      1. If it is called with any arguments, please either provide a good enough explanation of the arg that a user can tell what it will do before using the command. adding an example of how to call it with the args is not necessary but good practice.
  6. If you are making a new Class of commands, add the class to bot.json following the convention already there.
  7. Evidence of Testing. This one needs to be completed after the PR is opened. At that point, you will go on the channel on the CSSS Wall-E Test Server that was automatically created when the PR was opened and then test the following functionality. Once you had done so, you can leave a comment on the PR stating that you had done the necessary testing.
  8. Please provide ways to test whatever you just modified on the bot in the Test Cases section so that future PRs can be tested to ensure they dont break your code when merging to master

@modernNeo modernNeo requested a review from a team as a code owner January 12, 2022 20:18
@modernNeo modernNeo merged commit 9bb4d8f into master Jan 12, 2022
@modernNeo modernNeo deleted the flake8-patch branch February 5, 2022 08:39
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