WeblateOrg / weblate

Function/method with an empty body PTC-W0049
Anti-pattern
Major
34 occurrences in this check
fixup_repo doesn't contain any code
 124        self.repo = self.clone_repo(self.tempdir)
 125        self.fixup_repo(self.repo)
 126
 127    def fixup_repo(self, repo): 128        return
 129
 130    def get_remote_repo_url(self):
merge doesn't contain any code
1252    def rebase(self, abort=False):
1253        return
1254
1255    def merge(1256        self, abort: bool = False, message: str | None = None, no_ff: bool = False
1257    ):
1258        return
rebase doesn't contain any code
1249    def reset(self):
1250        return
1251
1252    def rebase(self, abort=False):1253        return
1254
1255    def merge(
reset doesn't contain any code
1246    def push(self, branch):
1247        return
1248
1249    def reset(self):1250        return
1251
1252    def rebase(self, abort=False):
push doesn't contain any code
1243    def update_remote(self):
1244        return
1245
1246    def push(self, branch):1247        return
1248
1249    def reset(self):
update_remote doesn't contain any code
1240    def get_remote_branch_name(self):
1241        return self.branch
1242
1243    def update_remote(self):1244        return
1245
1246    def push(self, branch):
configure_remote doesn't contain any code
1232    default_branch = "main"
1233    supports_push = False
1234
1235    def configure_remote(1236        self, pull_url: str, push_url: str, branch: str, fast: bool = True
1237    ):
1238        return
unshallow doesn't contain any code
297        """Push given branch to remote repository."""
298        raise NotImplementedError
299
300    def unshallow(self):301        """Unshallow working copy."""
302        return
303
save doesn't contain any code
1240    def cache_key(self):
1241        return "stats-zero"
1242
1243    def save(self, update_parents: bool = True):1244        return
1245
1246    def load(self):
calculate_source doesn't contain any code
1001            self.language.translation_set.filter(component__in=self.component_set)
1002        )
1003
1004    def calculate_source(self, stats_obj, stats):1005        return
1006
1007    def prefetch_source(self):
calculate_source doesn't contain any code
 874            self.language.translation_set.filter(component__in=self.component_set)
 875        )
 876
 877    def calculate_source(self, stats_obj, stats): 878        return
 879
 880    def prefetch_source(self):
calculate_source doesn't contain any code
 705        super().save(update_parents=update_parents)
 706        self.save_lazy_translated_percent()
 707
 708    def calculate_source(self, stats_obj, stats): 709        return
 710
 711    def prefetch_source(self):
prefetch_source doesn't contain any code
 635        stats["source_words"] += stats_obj.all_words
 636        stats["source_strings"] += stats_obj.all
 637
 638    def prefetch_source(self): 639        return
 640
 641    @cached_property
calculate_item doesn't contain any code
 340    def load(self):
 341        return {}
 342
 343    def calculate_item(self, item): 344        return
 345
 346    def _prefetch_basic(self):
save doesn't contain any code
 334    def cache_key(self):
 335        return None
 336
 337    def save(self, update_parents: bool = True): 338        return
 339
 340    def load(self):
render_additional doesn't contain any code
145            Pango.FontDescription(f"{WIDGET_FONT} {self.font_size}"),
146        ]
147
148    def render_additional(self, ctx):149        return
150
151    def render(self, response):
clone_test_repos doesn't contain any code
278
279        super().setUpTestData()
280
281    def clone_test_repos(self):282        return
283
284    def create_project(self):
log_hook doesn't contain any code
 35class LoggerMixin(BaseURLMixin):
 36    """Mixin for models with logging."""
 37
 38    def log_hook(self, level, msg, *args): 39        return
 40
 41    def log_debug(self, msg, *args):
enable_service doesn't contain any code
213    def delete_service(self):
214        raise NotImplementedError
215
216    def enable_service(self):217        return
218
219    def get_success_url(self):
post_setup doesn't contain any code
187    def settings_dict(self):
188        raise NotImplementedError
189
190    def post_setup(self, request, kwargs):191        return
192
193    def get_initial(self):
post_setup doesn't contain any code
117            key=lambda obj: obj.name,
118        )
119
120    def post_setup(self, request, kwargs):121        return
122
123    def get_configured_services(self):
mock_response doesn't contain any code
1312    def mock_error(self):
1313        raise SkipTest("Not tested")
1314
1315    def mock_response(self):1316        pass
1317
1318    def test_translate(self, **kwargs):
mock_response doesn't contain any code
 356    def mock_empty(self):
 357        pass
 358
 359    def mock_response(self): 360        pass
 361
 362    def mock_error(self):
mock_empty doesn't contain any code
 353                        )
 354        return translation
 355
 356    def mock_empty(self): 357        pass
 358
 359    def mock_response(self):
set_state doesn't contain any code
167        self._invalidate_target()
168        self.unit.text = target
169
170    def set_state(self, state):171        """Set fuzzy /approved flag on translated unit."""
172        return
173