Skip to content

Commit bbfc09b

Browse files
committed
remove unused global to fix F824
1 parent c7b445a commit bbfc09b

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

docs/en/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ You can connect your APIs by open this link: [https://ops.utilmeta.com/localhost
141141

142142
Click **API** and your will see the generated API document, you can debug your API here
143143
<img src="https://utilmeta.com/assets/image/connect-local-api.png" href="https://ops.utilmeta.com" target="_blank" width="800"/>
144+
144145
With your local API connected, you can use these features
145146

146147
* **Data**: Manage database data (CRUD), in this example, you can add `user` and `article` instance

docs/zh/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ UtilMeta OperationsAPI loaded at http://127.0.0.1:8080/ops, connect your APIs at
144144
点击左侧 **API** 板块即可看到生成的 API 文档
145145

146146
<img src="https://utilmeta.com/assets/image/connect-local-api.png" href="https://ops.utilmeta.com" target="_blank" width="800"/>
147+
147148
本地 API 在连接平台后可以使用以下功能
148149

149150
* **Data**: 数据管理 CRUD,比如在上面的例子中,你可以进入添加 `user``article` 实例

utilmeta/core/orm/schema.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ class Schema(utype.Schema):
3434
__model__ = None
3535

3636
def __class_getitem__(cls: T, item) -> T:
37-
global __caches__
3837
k = (cls, item)
3938
if k in __caches__:
4039
return __caches__[k]
@@ -147,7 +146,6 @@ def _get_relational_update_cls(cls, field: str, mode: Union[str, utype.Options])
147146
# owner_id: int = orm.Field(no_input='aw')
148147
# members: List[MemberSchema] = orm.Field(mode='rwa') ---- field: project_id
149148

150-
global __caches__
151149
options = mode if isinstance(mode, utype.Options) else utype.Options(mode=mode)
152150
mode = mode.mode if isinstance(mode, utype.Options) else str(mode)
153151
origin_cls = getattr(cls, '__origin_cls__', cls)

utilmeta/ops/log.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,8 @@ def setup_locals(config: Operations, close_conn: bool = False):
241241
from .models import Resource, Worker, Supervisor
242242
from utilmeta import service
243243

244-
global _worker, _version, _supervisor, _instance, _server, _endpoints_map, _openapi, _endpoints_patterns, _path_prefix, _databases, _caches
244+
global _worker, _supervisor, _instance, _server, _endpoints_map, \
245+
_openapi, _endpoints_patterns, _path_prefix, _databases, _caches
245246
# node_id = config.node_id
246247
_supervisor = Supervisor.current().first()
247248
# reset supervisor
@@ -486,7 +487,6 @@ def process_response(self, response: Response):
486487
if response.success and logger.vacuum:
487488
return response.close()
488489

489-
global _responses_queue
490490
_responses_queue.append(response)
491491

492492
if len(_responses_queue) >= self.config.max_backlog:

0 commit comments

Comments
 (0)