Skip to content

Commit d9a8f91

Browse files
committed
Fix flake8 errors
1 parent 05a8fd3 commit d9a8f91

File tree

5 files changed

+20
-13
lines changed

5 files changed

+20
-13
lines changed

.flake8

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[flake8]
2-
max-line-length = 89
2+
max-line-length = 88
33
exclude=.venv,.git
4-
ignore = W503
4+
ignore = W503,E800
55
extend-ignore =
66
# See https://github.com/PyCQA/pycodestyle/issues/373
77
E203,

django-subscriptions-rxdb/src/api/context.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ async def get_broadcast():
1919
if dbinfo.get("PORT")
2020
else dbinfo.get("HOST")
2121
)
22-
dsnstr = f"postgresql://{dbinfo.get('USER')}:{dbinfo.get('PASSWORD')}@{host}/{dbinfo.get('NAME')}"
22+
dsnstr = (
23+
f"postgresql://{dbinfo.get('USER')}:"
24+
f"{dbinfo.get('PASSWORD')}@{host}/{dbinfo.get('NAME')}"
25+
)
2326
broadcast = Broadcast(dsnstr)
2427
else:
2528
broadcast = Broadcast("memory://")

django-subscriptions-rxdb/src/api/schema.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ class Hero(HeroResolver.output_type):
3434
# updatedAt: Float
3535
# deleted: Boolean!
3636
# }
37-
# The client code expects the input type to be called "HeroInput", not "CreateHero", which is the default
38-
# We therefore need to create a new type via the strawberry.input decorator
39-
# class HeroInput(HeroResolver.create_input_type):
37+
# The client code expects the input type to be called "HeroInput",
38+
# not "CreateHero", which is the default We therefore need to create a new type
39+
# via the strawberry.input decorator
4040
@strawberry.input
4141
class HeroInput(HeroResolver.create_input_type):
4242
pass
@@ -65,11 +65,11 @@ def filterHeroes(
6565

6666
@strawberry.type
6767
class Query:
68-
## to include the auto-generated methods from strawberry-graphql-django:
69-
## - hero(id: ID!): Hero!
70-
## - heros(filters: [String!] = null): [Hero!]!
71-
## declare the class as
72-
## class Query(HeroResolver.query()):
68+
# to include the auto-generated methods from strawberry-graphql-django:
69+
# - hero(id: ID!): Hero!
70+
# - heros(filters: [String!] = null): [Hero!]!
71+
# declare the class as
72+
# class Query(HeroResolver.query()):
7373

7474
# type Query {
7575
# feedHero(id: String, updatedAt: Float, limit: Int!): [Hero!]!

django-subscriptions-rxdb/src/demo/settings.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@
6666

6767
AUTH_PASSWORD_VALIDATORS = [
6868
{
69-
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
69+
"NAME": (
70+
"django.contrib.auth.password_validation.UserAttributeSimilarityValidator"
71+
),
7072
},
7173
{
7274
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",

django-subscriptions/demo/settings.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@
8686

8787
AUTH_PASSWORD_VALIDATORS = [
8888
{
89-
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
89+
"NAME": (
90+
"django.contrib.auth.password_validation.UserAttributeSimilarityValidator"
91+
),
9092
},
9193
{
9294
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",

0 commit comments

Comments
 (0)