Skip to content

Add pyproject.toml to include black settings #677

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
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion junction/devices/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ class Device(TimeAuditModel):
)

def __unicode__(self):
return u"uuid: {}, is_verified: {}".format(self.uuid, self.is_verified)
return "uuid: {}, is_verified: {}".format(self.uuid, self.is_verified)
6 changes: 2 additions & 4 deletions junction/schedule/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class ScheduleItem(AuditModel):
conference = models.ForeignKey(Conference, on_delete=models.CASCADE)

def __unicode__(self):
return u"{} - {} on {} from {} to {} in {}".format(
return "{} - {} on {} from {} to {} in {}".format(
self.conference,
self.name,
self.event_date,
Expand Down Expand Up @@ -90,9 +90,7 @@ def to_response(self, request):
}
if self.session:
session = self.session
author = u"{} {}".format(
session.author.first_name, session.author.last_name
)
author = "{} {}".format(session.author.first_name, session.author.last_name)
data["session"] = {
"id": session.id,
"title": session.title,
Expand Down
2 changes: 1 addition & 1 deletion junction/tickets/management/commands/explara.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Explara(object):

def __init__(self, access_token):
self.access_token = access_token
self.headers = {"Authorization": u"Bearer " + self.access_token}
self.headers = {"Authorization": "Bearer " + self.access_token}
self.base_url = "https://www.explara.com/api/e/{0}"

def get_events(self):
Expand Down
20 changes: 20 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[tool.black]
line-length = 88
target-version = ['py35', 'py36', 'py37']
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| settings
| docs
|
)/
'''
4 changes: 2 additions & 2 deletions tests/integrations/test_feedback_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ def test_feedback_with_wrong_choice_value(self):
self.client.credentials(HTTP_AUTHORIZATION="Token " + str(self.device.uuid))
res = self.client.post("/api/v1/feedback/", data, format="json")

msg = u"The multiple choice value isn't associated with question"
msg = "The multiple choice value isn't associated with question"

assert res.status_code == status.HTTP_400_BAD_REQUEST
assert res.data == {"choices": [{u"non_field_errors": [msg]}]}
assert res.data == {"choices": [{"non_field_errors": [msg]}]}

def test_feedback_with_missing_required_text_data(self):
choice = [
Expand Down