WeblateOrg / weblate

Missing module/function docstring PY-D0003
Documentation
Minor
34 occurrences in this check
Docstring missing for get_absolute_url
1707    def __str__(self) -> str:
1708        return f"{self.component}{self.language}"
1709
1710    def get_absolute_url(self) -> None:1711        return None
Docstring missing for validate_new_unit_data
1626                skip_existing=True,
1627            )
1628
1629    def validate_new_unit_data(1630        self,
1631        context: str,
1632        source: str | list[str],
Docstring missing for sync_terminology
1606            self.handle_store_change(request, user, previous_revision)
1607
1608    @transaction.atomic
1609    def sync_terminology(self) -> None:1610        if not self.is_source or not self.component.manage_units:
1611            return
1612        expected_count = self.component.translation_set.count()
Docstring missing for delete_unit
1548        )
1549
1550    @transaction.atomic
1551    def delete_unit(self, request, unit) -> None:1552        from weblate.auth.models import get_anonymous
1553
1554        component = self.component
Docstring missing for notify_deletion
1536            component_post_update.send(sender=self.__class__, component=component)
1537        return result
1538
1539    def notify_deletion(self, unit, user) -> None:1540        self.change_set.create(
1541            action=Change.ACTION_STRING_REMOVE,
1542            user=user,
Docstring missing for add_unit
1370        return result
1371
1372    @transaction.atomic
1373    def add_unit(  # noqa: C9011374        self,
1375        request,
1376        context: str,
Docstring missing for get_store_change_translations
1360        # Trigger post-update signal
1361        self.component.trigger_post_update(previous_revision, False)
1362
1363    def get_store_change_translations(self):1364        component = self.component
1365        result = []
1366        if self.is_source:
Docstring missing for handle_store_change
1344            author=user,
1345        )
1346
1347    def handle_store_change(1348        self, request, user, previous_revision: str, change=None
1349    ) -> None:
1350        self.drop_store_cache()
Docstring missing for invalidate_keys
1306    def keys_cache_key(self) -> str:
1307        return f"translation-keys-{self.pk}"
1308
1309    def invalidate_keys(self) -> None:1310        cache.delete(self.keys_cache_key)
1311
1312    def get_export_url(self):
Docstring missing for _invalidate_triger
1289            if orig_user:
1290                request.user = orig_user
1291
1292    def _invalidate_triger(self) -> None:1293        self._invalidate_scheduled = False
1294        self.stats.update_stats()
1295        self.component.invalidate_glossary_cache()
Docstring missing for handle_add_upload
1145
1146        return (0, 0, self.unit_set.count(), len(store2.content_units))
1147
1148    def handle_add_upload(self, request, store, fuzzy: str = ""):1149        component = self.component
1150        has_template = component.has_template()
1151        skipped = 0
Docstring missing for drop_store_cache
1023
1024        return (not_found, skipped, accepted, len(store.content_units))
1025
1026    def drop_store_cache(self) -> None:1027        if "store" in self.__dict__:
1028            del self.__dict__["store"]
1029        if self.is_source:
Docstring missing for enable_review
 815        return self.component.project.project_languages[self.language].workflow_settings
 816
 817    @cached_property
 818    def enable_review(self): 819        project = self.component.project
 820        project_review = (
 821            project.source_review if self.is_source else project.translation_review
Docstring missing for workflow_settings
 811        store.save()
 812
 813    @cached_property
 814    def workflow_settings(self): 815        return self.component.project.project_languages[self.language].workflow_settings
 816
 817    @cached_property
Docstring missing for filenames
 638        return self.component.repo_needs_push()
 639
 640    @cached_property
 641    def filenames(self): 642        if not self.filename:
 643            return []
 644        if self.component.file_format_cls.simple_filename:
Docstring missing for repo_needs_push
 634    def repo_needs_merge(self):
 635        return self.component.repo_needs_merge()
 636
 637    def repo_needs_push(self): 638        return self.component.repo_needs_push()
 639
 640    @cached_property
Docstring missing for repo_needs_merge
 631        """Check whether there are some not committed changes."""
 632        return self.count_pending_units > 0
 633
 634    def repo_needs_merge(self): 635        return self.component.repo_needs_merge()
 636
 637    def repo_needs_push(self):
Docstring missing for has_push_configuration
 510    def can_push(self):
 511        return self.component.can_push()
 512
 513    def has_push_configuration(self): 514        return self.component.has_push_configuration()
 515
 516    def get_hash_filenames(self):
Docstring missing for can_push
 507    def do_file_scan(self, request=None):
 508        return self.component.do_file_scan(request)
 509
 510    def can_push(self): 511        return self.component.can_push()
 512
 513    def has_push_configuration(self):
Docstring missing for do_file_scan
 504    def do_file_sync(self, request=None):
 505        return self.component.do_file_sync(request)
 506
 507    def do_file_scan(self, request=None): 508        return self.component.do_file_scan(request)
 509
 510    def can_push(self):
Docstring missing for do_file_sync
 501    def do_cleanup(self, request=None):
 502        return self.component.do_cleanup(request)
 503
 504    def do_file_sync(self, request=None): 505        return self.component.do_file_sync(request)
 506
 507    def do_file_scan(self, request=None):
Docstring missing for do_cleanup
 498    def do_reset(self, request=None):
 499        return self.component.do_reset(request)
 500
 501    def do_cleanup(self, request=None): 502        return self.component.do_cleanup(request)
 503
 504    def do_file_sync(self, request=None):
Docstring missing for do_reset
 495    def do_push(self, request=None):
 496        return self.component.do_push(request)
 497
 498    def do_reset(self, request=None): 499        return self.component.do_reset(request)
 500
 501    def do_cleanup(self, request=None):
Docstring missing for do_push
 492    def do_update(self, request=None, method=None):
 493        return self.component.do_update(request, method=method)
 494
 495    def do_push(self, request=None): 496        return self.component.do_push(request)
 497
 498    def do_reset(self, request=None):
Docstring missing for do_update
 489        Change.objects.bulk_create(self.update_changes, batch_size=500)
 490        self.update_changes = []
 491
 492    def do_update(self, request=None, method=None): 493        return self.component.do_update(request, method=method)
 494
 495    def do_push(self, request=None):