diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-02 16:47:10 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-02 17:02:50 -0700 |
commit | 4bb25cec68f1b2613a906e416d4ee3abf9050f6d (patch) | |
tree | 59fdf081fdf841ef08f9188880399e5265f26e5c /python/fatcat_tools/workers/elasticsearch.py | |
parent | 675ecb96fe0e51f169c2d01683f02205ef327825 (diff) | |
download | fatcat-4bb25cec68f1b2613a906e416d4ee3abf9050f6d.tar.gz fatcat-4bb25cec68f1b2613a906e416d4ee3abf9050f6d.zip |
hacks to work around new pylint false positives
Diffstat (limited to 'python/fatcat_tools/workers/elasticsearch.py')
-rw-r--r-- | python/fatcat_tools/workers/elasticsearch.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/fatcat_tools/workers/elasticsearch.py b/python/fatcat_tools/workers/elasticsearch.py index 91f2796c..f411073d 100644 --- a/python/fatcat_tools/workers/elasticsearch.py +++ b/python/fatcat_tools/workers/elasticsearch.py @@ -113,13 +113,14 @@ class ElasticsearchReleaseWorker(FatcatWorker): for msg in batch: json_str = msg.value().decode('utf-8') entity = entity_from_json(json_str, self.entity_type, api_client=ac) + assert isinstance(entity, self.entity_type) if self.entity_type == ChangelogEntry: key = entity.index # might need to fetch from API - if not (entity.editgroup and entity.editgroup.editor): + if not (entity.editgroup and entity.editgroup.editor): # pylint: disable=no-member # (TODO) entity = api.get_changelog_entry(entity.index) else: - key = entity.ident + key = entity.ident # pylint: disable=no-member # (TODO) if self.entity_type != ChangelogEntry and entity.state == 'wip': print(f"WARNING: skipping state=wip entity: {self.entity_type.__name__} {entity.ident}", file=sys.stderr) |