Skip to content

Commit

Permalink
fix typo in documentation from relationship attribute and all manipul…
Browse files Browse the repository at this point in the history
…ation of back populate
  • Loading branch information
AdamMusa committed Apr 5, 2023
1 parent 43a689d commit 3f5683c
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ def create_heroes():
session.add(hero_spider_boy)
session.commit()

session.refresh(hero_deadpond)
session.refresh(hero_rusty_man)
session.refresh(hero_spider_boy)

print("Created hero:", hero_deadpond)
print("Created hero:", hero_rusty_man)
print("Created hero:", hero_spider_boy)
Expand All @@ -71,7 +67,6 @@ def create_heroes():
)
session.add(team_wakaland)
session.commit()
session.refresh(team_wakaland)
print("Team Wakaland:", team_wakaland)

hero_tarantula = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32)
Expand All @@ -85,9 +80,7 @@ def create_heroes():
team_preventers.heroes.append(hero_cap)
session.add(team_preventers)
session.commit()
session.refresh(hero_tarantula)
session.refresh(hero_dr_weird)
session.refresh(hero_cap)

print("Preventers new hero:", hero_tarantula)
print("Preventers new hero:", hero_dr_weird)
print("Preventers new hero:", hero_cap)
Expand Down Expand Up @@ -138,6 +131,5 @@ def main():
select_heroes()
update_heroes()


if __name__ == "__main__":
main()
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ def create_heroes():
session.add(hero_spider_boy)
session.commit()

session.refresh(hero_deadpond)
session.refresh(hero_rusty_man)
session.refresh(hero_spider_boy)

print("Created hero:", hero_deadpond)
print("Created hero:", hero_rusty_man)
print("Created hero:", hero_spider_boy)
Expand All @@ -71,7 +67,6 @@ def create_heroes():
)
session.add(team_wakaland)
session.commit()
session.refresh(team_wakaland)
print("Team Wakaland:", team_wakaland)

hero_tarantula = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32)
Expand All @@ -85,9 +80,6 @@ def create_heroes():
team_preventers.heroes.append(hero_cap)
session.add(team_preventers)
session.commit()
session.refresh(hero_tarantula)
session.refresh(hero_dr_weird)
session.refresh(hero_cap)
print("Preventers new hero:", hero_tarantula)
print("Preventers new hero:", hero_dr_weird)
print("Preventers new hero:", hero_cap)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ def create_heroes():
session.add(hero_spider_boy)
session.commit()

session.refresh(hero_deadpond)
session.refresh(hero_rusty_man)
session.refresh(hero_spider_boy)

print("Created hero:", hero_deadpond)
print("Created hero:", hero_rusty_man)
print("Created hero:", hero_spider_boy)
Expand All @@ -71,7 +67,6 @@ def create_heroes():
)
session.add(team_wakaland)
session.commit()
session.refresh(team_wakaland)
print("Team Wakaland:", team_wakaland)

hero_tarantula = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32)
Expand All @@ -85,9 +80,6 @@ def create_heroes():
team_preventers.heroes.append(hero_cap)
session.add(team_preventers)
session.commit()
session.refresh(hero_tarantula)
session.refresh(hero_dr_weird)
session.refresh(hero_cap)
print("Preventers new hero:", hero_tarantula)
print("Preventers new hero:", hero_dr_weird)
print("Preventers new hero:", hero_cap)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ def create_heroes():
session.add(hero_spider_boy)
session.commit()

session.refresh(hero_deadpond)
session.refresh(hero_rusty_man)
session.refresh(hero_spider_boy)

print("Created hero:", hero_deadpond)
print("Created hero:", hero_rusty_man)
print("Created hero:", hero_spider_boy)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ def create_heroes():
session.add(hero_spider_boy)
session.commit()

session.refresh(hero_deadpond)
session.refresh(hero_rusty_man)
session.refresh(hero_spider_boy)

print("Created hero:", hero_deadpond)
print("Created hero:", hero_rusty_man)
print("Created hero:", hero_spider_boy)
Expand All @@ -71,7 +67,6 @@ def create_heroes():
)
session.add(team_wakaland)
session.commit()
session.refresh(team_wakaland)
print("Team Wakaland:", team_wakaland)

hero_tarantula = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32)
Expand All @@ -85,9 +80,6 @@ def create_heroes():
team_preventers.heroes.append(hero_cap)
session.add(team_preventers)
session.commit()
session.refresh(hero_tarantula)
session.refresh(hero_dr_weird)
session.refresh(hero_cap)
print("Preventers new hero:", hero_tarantula)
print("Preventers new hero:", hero_dr_weird)
print("Preventers new hero:", hero_cap)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ def create_heroes():
session.add(hero_spider_boy)
session.commit()

session.refresh(hero_deadpond)
session.refresh(hero_rusty_man)
session.refresh(hero_spider_boy)

print("Created hero:", hero_deadpond)
print("Created hero:", hero_rusty_man)
print("Created hero:", hero_spider_boy)
Expand All @@ -71,7 +67,6 @@ def create_heroes():
)
session.add(team_wakaland)
session.commit()
session.refresh(team_wakaland)
print("Team Wakaland:", team_wakaland)

hero_tarantula = Hero(name="Tarantula", secret_name="Natalia Roman-on", age=32)
Expand All @@ -85,9 +80,6 @@ def create_heroes():
team_preventers.heroes.append(hero_cap)
session.add(team_preventers)
session.commit()
session.refresh(hero_tarantula)
session.refresh(hero_dr_weird)
session.refresh(hero_cap)
print("Preventers new hero:", hero_tarantula)
print("Preventers new hero:", hero_dr_weird)
print("Preventers new hero:", hero_cap)
Expand Down
14 changes: 7 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,16 @@ skip_glob = [
[tool.mypy]
# --strict
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
warn_return_any = true
implicit_reexport = false
strict_equality = true
# --strict end
Expand Down

0 comments on commit 3f5683c

Please sign in to comment.