GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 18-22 lines in 2 locations

commands.py 2 locations

@@ 294-315 (lines=22) @@
291
        """Display an input box allowing the user to pick a package to remove."""
292
        self.window.show_quick_panel(self.environment_packages, self.remove_package)
293
294
    @property
295
    def environment_packages(self):
296
        """List each package name and version installed in the environment.
297
298
        This property had to be duplicated as the attribute from
299
        ListCondaPackageCommand could not be inherited properly.
300
        """
301
        try:
302
            environment_path = self.project_data['conda_environment']
303
            environment = self.retrieve_environment_name(environment_path)
304
305
            package_data = subprocess.check_output([self.executable, '-m', 'conda', 'list',
306
                                                    '--name', environment, '--json'],
307
                                                   startupinfo=self.startupinfo)
308
309
            packages_info = json.loads(package_data.decode())
310
            packages = [[package['name'], package['dist_name']]
311
                        for package in packages_info]
312
313
            return packages
314
        except KeyError:
315
            return ['No Active Conda Environment']
316
317
    def remove_package(self, index):
318
        """Remove the given package name via conda."""
@@ 247-264 (lines=18) @@
244
        """
245
        self.window.show_quick_panel(self.environment_packages, None)
246
247
    @property
248
    def environment_packages(self):
249
        """List each package name and version installed in the environment."""
250
        try:
251
            environment_path = self.project_data['conda_environment']
252
            environment = self.retrieve_environment_name(environment_path)
253
254
            package_data = subprocess.check_output([self.executable, '-m', 'conda', 'list',
255
                                                    '--name', environment, '--json'],
256
                                                   startupinfo=self.startupinfo)
257
258
            packages_info = json.loads(package_data.decode())
259
            packages = [[package['name'], package['dist_name']]
260
                        for package in packages_info]
261
262
            return packages
263
        except KeyError:
264
            return ['No Active Conda Environment']
265
266
267
class InstallCondaPackageCommand(CondaCommand):