From d96569c40d2b01543cb2e2373fd44c1b61312dad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Clgen=20Sar=C4=B1kavak?= Date: Mon, 7 Feb 2022 17:46:56 +0300 Subject: [PATCH] Update unicode literals https://github.com/asottile/pyupgrade#unicode-literals --- docs/conf.py | 16 ++++++++-------- graphene_django/tests/models.py | 4 ++-- .../utils/tests/test_str_converters.py | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index a485d5b..b83e0f0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -60,18 +60,18 @@ source_suffix = ".rst" master_doc = "index" # General information about the project. -project = u"Graphene Django" -copyright = u"Graphene 2017" -author = u"Syrus Akbary" +project = "Graphene Django" +copyright = "Graphene 2017" +author = "Syrus Akbary" # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = u"1.0" +version = "1.0" # The full version, including alpha/beta/rc tags. -release = u"1.0.dev" +release = "1.0.dev" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -276,7 +276,7 @@ latex_elements = { # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, "Graphene.tex", u"Graphene Documentation", u"Syrus Akbary", "manual") + (master_doc, "Graphene.tex", "Graphene Documentation", "Syrus Akbary", "manual") ] # The name of an image file (relative to this directory) to place at the top of @@ -317,7 +317,7 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, "graphene_django", u"Graphene Django Documentation", [author], 1) + (master_doc, "graphene_django", "Graphene Django Documentation", [author], 1) ] # If true, show URL addresses after external links. @@ -334,7 +334,7 @@ texinfo_documents = [ ( master_doc, "Graphene-Django", - u"Graphene Django Documentation", + "Graphene Django Documentation", author, "Graphene Django", "One line description of project.", diff --git a/graphene_django/tests/models.py b/graphene_django/tests/models.py index 659cf6d..7b76cd3 100644 --- a/graphene_django/tests/models.py +++ b/graphene_django/tests/models.py @@ -50,7 +50,7 @@ class Reporter(models.Model): "Reporter Type", null=True, blank=True, - choices=[(1, u"Regular"), (2, u"CNN Reporter")], + choices=[(1, "Regular"), (2, "CNN Reporter")], ) def __str__(self): # __unicode__ on Python 2 @@ -109,7 +109,7 @@ class Article(models.Model): "Importance", null=True, blank=True, - choices=[(1, u"Very important"), (2, u"Not as important")], + choices=[(1, "Very important"), (2, "Not as important")], ) def __str__(self): # __unicode__ on Python 2 diff --git a/graphene_django/utils/tests/test_str_converters.py b/graphene_django/utils/tests/test_str_converters.py index 24064b2..fc466f6 100644 --- a/graphene_django/utils/tests/test_str_converters.py +++ b/graphene_django/utils/tests/test_str_converters.py @@ -7,4 +7,4 @@ def test_to_const(): def test_to_const_unicode(): - assert to_const(u"Skoða þetta unicode stöff") == "SKODA_THETTA_UNICODE_STOFF" + assert to_const("Skoða þetta unicode stöff") == "SKODA_THETTA_UNICODE_STOFF"