Bump pylint from 2.9.6 to 2.11.1 (#108)

* Bump pylint from 2.9.6 to 2.11.1

Bumps [pylint](https://github.com/PyCQA/pylint) from 2.9.6 to 2.11.1.
- [Release notes](https://github.com/PyCQA/pylint/releases)
- [Changelog](https://github.com/PyCQA/pylint/blob/main/ChangeLog)
- [Commits](https://github.com/PyCQA/pylint/compare/v2.9.6...v2.11.1)

---
updated-dependencies:
- dependency-name: pylint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Use f strings everywhere

* Add black.yml

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dave G <davegallant@gmail.com>
This commit is contained in:
dependabot[bot]
2021-09-25 13:30:01 -04:00
committed by GitHub
parent d0103f0733
commit 31ff0e480f
7 changed files with 65 additions and 32 deletions

View File

@@ -3,19 +3,22 @@ import os
from colorama import Fore, Style
from .scores import get_vote_color
class Post:
def __init__(self, body, score, user):
self.body = body
self.score = score
self.user = user
def get_terminal_width():
_, columns = os.popen("stty size", "r").read().split()
return int(columns)
def generate_posts_output(posts):
output = ""
output += ("-" * get_terminal_width())
output += "-" * get_terminal_width()
for post in posts:
output += (
" -"
@@ -23,10 +26,10 @@ def generate_posts_output(posts):
+ Fore.RESET
+ post.body
+ Fore.YELLOW
+ " ({})".format(post.user)
+ f" ({post.user})"
)
output += (Style.RESET_ALL)
output += Style.RESET_ALL
output += "\n"
output += ("-" * get_terminal_width())
output += "-" * get_terminal_width()
output += "\n"
return output