You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor internal scope handling by introducing Scope enum
This replaces the internal use of string literals and "scopenum"
to a proper Scope enum, which also centralizes indexes, getting
higher scopes, get next scope in the order, etc. Another benefit
is that it helps the type checker by introducing a proper type,
and improve readability (IMHO).
This is _mostly_ an internal change, however due to historical
reasons, the API of the following _internal_ objects has
changed slightly:
* `CallSpec2`: `_arg2scopenum` renamed to `_arg2scope` for consistency.
* `FixtureRequest`:
Previously contained a `scope: str` attribute.
Changed attribute to `_scope: Scope`, with a backward compatible read-only property `scope -> str`.
This one might cause some confusion, because the internal attribute has a different type
than the public property of the same name.
* `SubRequest.__init__` parameter changed from `_Scope` to `Scope`.
0 commit comments