Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • simpy simpy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 31
    • Issues 31
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • team-simpy
  • simpysimpy
  • Repository
Switch branch/tag
  • 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

Replace base.py

Attach a file by drag & drop or click to upload


Cancel
GitLab will create a branch in your fork and start a merge request.