8000 clean python 2 compat codes by auvipy · Pull Request #136 · flask-api/flask-api · GitHub
[go: up one dir, main page]

Skip to content

clean python 2 compat codes #136

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 1 commit into from
Sep 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions flask_api/renderers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# coding: utf8
from __future__ import unicode_literals
from flask import request, render_template, current_app
from flask.globals import _request_ctx_stack
from flask_api.mediatypes import MediaType
Expand Down Expand Up @@ -35,7 +33,7 @@ def convert_to_title(name):
return name.capitalize()


class BaseRenderer(object):
class BaseRenderer:
media_type = None
charset = 'utf-8'
handles_empty_responses = False
Expand All @@ -60,7 +58,7 @@ def render(self, data, media_type, **options):
return json.dumps(data, cls=current_app.json_encoder, ensure_ascii=False, indent=indent)


class HTMLRenderer(object):
class HTMLRenderer:
media_type = 'text/html'
charset = 'utf-8'

Expand Down
0