Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
in_memory_testing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Brady James Garvin
in_memory_testing
Commits
761f2f7f
Commit
761f2f7f
authored
6 years ago
by
Brady James Garvin
Browse files
Options
Downloads
Patches
Plain Diff
Updated leftover format calls to f-strings.
parent
e9eee552
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
main.py
+3
-3
3 additions, 3 deletions
main.py
with
3 additions
and
3 deletions
main.py
+
3
−
3
View file @
761f2f7f
...
@@ -24,14 +24,14 @@ class MoviesApp(App):
...
@@ -24,14 +24,14 @@ class MoviesApp(App):
budget
=
int
(
budget
)
*
1000000
budget
=
int
(
budget
)
*
1000000
gross_revenue
=
int
(
gross_revenue
)
*
1000000
gross_revenue
=
int
(
gross_revenue
)
*
1000000
except
ValueError
as
exception
:
except
ValueError
as
exception
:
self
.
root
.
ids
.
message
.
text
=
'
Formatting error: {exception}
'
.
format
(
exception
=
exception
)
self
.
root
.
ids
.
message
.
text
=
f
'
Formatting error:
{
exception
}
'
return
return
try
:
try
:
self
.
_create_movie
(
self
.
session
,
title
,
budget
,
gross_revenue
)
self
.
_create_movie
(
self
.
session
,
title
,
budget
,
gross_revenue
)
self
.
root
.
ids
.
message
.
text
=
'
Movie added!
'
self
.
root
.
ids
.
message
.
text
=
'
Movie added!
'
except
SQLAlchemyError
as
exception
:
except
SQLAlchemyError
as
exception
:
self
.
session
.
rollback
()
self
.
session
.
rollback
()
self
.
root
.
ids
.
message
.
text
=
'
Database error: {exception}
'
.
format
(
exception
=
exception
)
self
.
root
.
ids
.
message
.
text
=
f
'
Database error:
{
exception
}
'
def
main
():
def
main
():
...
@@ -40,7 +40,7 @@ def main():
...
@@ -40,7 +40,7 @@ def main():
app
.
run
()
app
.
run
()
except
SQLAlchemyError
as
exception
:
except
SQLAlchemyError
as
exception
:
print
(
'
Initial database connection failed!
'
,
file
=
stderr
)
print
(
'
Initial database connection failed!
'
,
file
=
stderr
)
print
(
'
Cause: {exception}
'
.
format
(
exception
=
exception
)
,
file
=
stderr
)
print
(
f
'
Cause:
{
exception
}
'
,
file
=
stderr
)
exit
(
1
)
exit
(
1
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment