[Enhancement]: Remove unnecessary "if statement" (#536)

Remove unnecessary "if statement".
This commit is contained in:
jason_w 2022-09-19 00:14:18 +08:00 committed by GitHub
parent 5d7527d75e
commit e56b1736c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,7 +72,7 @@ class Registry:
assert isinstance(scope, str)
self._scope = scope
else:
self._scope = self.infer_scope() if scope is None else scope
self._scope = self.infer_scope()
# See https://mypy.readthedocs.io/en/stable/common_issues.html#
# variables-vs-type-aliases for the use