forked from MirrorHub/synapse
* Perfer `type(x) is int` to `isinstance(x, int)` This covered all additional instances I could see where `x` was user-controlled. The remaining cases are ``` $ rg -s 'isinstance.*[^_]int' tests/replication/_base.py 576: if isinstance(obj, int): synapse/util/caches/stream_change_cache.py 136: assert isinstance(stream_pos, int) 214: assert isinstance(stream_pos, int) 246: assert isinstance(stream_pos, int) 267: assert isinstance(stream_pos, int) synapse/replication/tcp/external_cache.py 133: if isinstance(result, int): synapse/metrics/__init__.py 100: if isinstance(calls, (int, float)): synapse/handlers/appservice.py 262: assert isinstance(new_token, int) synapse/config/_util.py 62: if isinstance(p, int): ``` which cover metrics, logic related to `jsonschema`, and replication and data streams. AFAICS these are all internal to Synapse * Changelog |
||
---|---|---|
.. | ||
.gitignore | ||
14823.feature | ||
14866.bugfix | ||
14879.misc | ||
14880.bugfix | ||
14886.misc | ||
14887.misc | ||
14904.misc | ||
14916.misc | ||
14920.misc | ||
14922.misc | ||
14927.misc | ||
14935.misc | ||
14936.misc | ||
14937.misc | ||
14938.misc | ||
14942.bugfix | ||
14945.misc |