Skip to content
This repository was archived by the owner on Jan 21, 2023. It is now read-only.

Commit 1373662

Browse files
yt-msMidnighter
authored andcommitted
style: fix flake8 errors in examples
1 parent ceb3b73 commit 1373662

File tree

3 files changed

+30
-14
lines changed

3 files changed

+30
-14
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
qa:
99
isort src/structurizr/ tests/ examples/ setup.py
1010
black src/structurizr/ tests/ examples/ setup.py
11+
flake8 src/structurizr/ tests/ examples/ setup.py
1112

1213
## Prepare a release by generating the automatic code documentation.
1314
release:

examples/big_bank.py

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,16 @@ def create_big_bank_workspace():
152152
single_page_application.tags.add(web_browser_tag)
153153
mobile_app = internet_banking_system.add_container(
154154
"Mobile App",
155-
"Provides a limited subset of the Internet banking functionality to customers via their mobile device.",
155+
"Provides a limited subset of the Internet banking functionality to "
156+
+ "customers via their mobile device.",
156157
"Xamarin",
157158
id="mobileApp",
158159
)
159160
mobile_app.tags.add(mobile_app_tag)
160161
web_application = internet_banking_system.add_container(
161162
"Web Application",
162-
"Delivers the static content and the Internet banking single page application.",
163+
"Delivers the static content and the Internet banking single page "
164+
+ "application.",
163165
"Java and Spring MVC",
164166
id="webApplication",
165167
)
@@ -171,7 +173,8 @@ def create_big_bank_workspace():
171173
)
172174
database = internet_banking_system.add_container(
173175
"Database",
174-
"Stores user registration information, hashed authentication credentials, access logs, etc.",
176+
"Stores user registration information, hashed authentication credentials, "
177+
+ "access logs, etc.",
175178
"Relational Database Schema",
176179
id="database",
177180
)
@@ -188,8 +191,9 @@ def create_big_bank_workspace():
188191
api_application.uses(email_system, "Sends e-mail using", technology="SMTP")
189192

190193
# components
191-
# - for a real-world software system, you would probably want to extract the components using
192-
# - static analysis/reflection rather than manually specifying them all
194+
# - for a real-world software system, you would probably want to extract the
195+
# components using static analysis/reflection rather than manually specifying
196+
# them all
193197

194198
signin_controller = api_application.add_component(
195199
name="Sign In Controller",
@@ -211,7 +215,8 @@ def create_big_bank_workspace():
211215
)
212216
security_component = api_application.add_component(
213217
name="Security Component",
214-
description="Provides functionality related to signing in, changing passwords, etc.",
218+
description="Provides functionality related to signing in, changing passwords, "
219+
+ "etc.",
215220
technology="Spring Bean",
216221
id="securityComponent",
217222
)
@@ -353,7 +358,8 @@ def create_big_bank_workspace():
353358
secondary_database_server.tags.add(failover_tag)
354359
secondary_database = secondary_database_server.add_container(database)
355360

356-
# # model.Relationships.Where(r=>r.Destination.Equals(secondary_database)).ToList().ForEach(r=>r.tags.add(failover_tag))
361+
# model.Relationships.Where(r=>r.Destination.Equals(secondary_database)).ToList()
362+
# .ForEach(r=>r.tags.add(failover_tag))
357363
data_replication_relationship = primary_database_server.uses(
358364
secondary_database_server, "Replicates data to"
359365
)
@@ -400,7 +406,8 @@ def create_big_bank_workspace():
400406
component_view.add(email_system)
401407
component_view.paper_size = PaperSize.A5_Landscape
402408

403-
# systemLandscapeView.AddAnimation(internet_banking_system, customer, mainframe_banking_system, emailSystem)
409+
# systemLandscapeView.AddAnimation(internet_banking_system, customer,
410+
# mainframe_banking_system, emailSystem)
404411
# systemLandscapeView.AddAnimation(atm)
405412
# systemLandscapeView.AddAnimation(customerServiceStaff, back_office_staff)
406413

@@ -418,20 +425,24 @@ def create_big_bank_workspace():
418425

419426
# componentView.AddAnimation(singlePageApplication, mobile_app)
420427
# componentView.AddAnimation(signinController, securityComponent, database)
421-
# componentView.AddAnimation(accountsSummaryController, mainframe_banking_systemFacade, mainframe_banking_system)
428+
# componentView.AddAnimation(accountsSummaryController,
429+
# mainframe_banking_systemFacade, mainframe_banking_system)
422430
# componentView.AddAnimation(resetPasswordController, emailComponent, database)
423431

424432
# # dynamic diagrams and deployment diagrams are not available with the Free Plan
425-
# DynamicView dynamicView = views.CreateDynamicView(apiApplication, "SignIn", "Summarises how the sign in feature works in the single-page application.")
433+
# DynamicView dynamicView = views.CreateDynamicView(apiApplication, "SignIn",
434+
# "Summarises how the sign in feature works in the single-page application.")
426435
# dynamicView.Add(singlePageApplication, "Submits credentials to", signinController)
427436
# dynamicView.Add(signinController, "Calls isAuthenticated() on", securityComponent)
428-
# dynamicView.Add(securityComponent, "select * from users where username = ?", database)
437+
# dynamicView.Add(securityComponent, "select * from users where username = ?",
438+
# database)
429439
# dynamicView.PaperSize = PaperSize.A5_Landscape
430440

431441
development_deployment_view = views.create_deployment_view(
432442
software_system=internet_banking_system,
433443
key="DevelopmentDeployment",
434-
description="An example development deployment scenario for the Internet Banking System.",
444+
description="An example development deployment scenario for the Internet "
445+
+ "Banking System.",
435446
environment="Development",
436447
)
437448
development_deployment_view.add(developer_laptop)
@@ -440,7 +451,8 @@ def create_big_bank_workspace():
440451
live_deployment_view = views.create_deployment_view(
441452
software_system=internet_banking_system,
442453
key="LiveDeployment",
443-
description="An example live deployment scenario for the Internet Banking System.",
454+
description="An example live deployment scenario for the Internet Banking "
455+
+ "System.",
444456
environment="Live",
445457
)
446458
live_deployment_view += big_bank_data_center

examples/financial_risk_system.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ def main() -> Workspace:
127127
contextView = views.create_system_context_view(
128128
software_system=financial_risk_system,
129129
key="Context",
130-
description="An example System Context diagram for the Financial Risk System architecture kata.",
130+
description=(
131+
"An example System Context diagram for the Financial Risk System "
132+
"architecture kata."
133+
),
131134
)
132135
contextView.add_all_software_systems()
133136
contextView.add_all_people()

0 commit comments

Comments
 (0)