Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • simpy simpy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 33
    • Issues 33
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • team-simpyteam-simpy
  • simpysimpy
  • Repository
  • simpy
  • src
  • simpy
  • resources
  • base.py
Find file BlameHistoryPermalink
  • Peter Grayson's avatar
    Repair Get and Put as ContextManagers · 373d65e6
    Peter Grayson authored Apr 08, 2020 and Peter Grayson's avatar Peter Grayson committed Apr 08, 2020
    Use ContextManager with base.Get and base.Put to identify them as
    supporting the context manager protocol.
    
    https://mypy.readthedocs.io/en/latest/protocols.html#context-manager-protocols
    
    Also update __exit__() methods to:
    
     - Use BaseException instead of Exception for exc_type and exc_value args
     - Return Optional[bool] instead of None
    373d65e6